DCAtomicField¶
from panda3d.direct import DCAtomicField
-
class
DCAtomicField
¶ Bases:
DCField
A single atomic field of a Distributed Class, as read from a .dc file. This defines an interface to the Distributed Class, and is always implemented as a remote procedure method.
Inheritance diagram
-
getElement
(n: int) → DCParameter¶ Returns the parameter object describing the nth element.
-
getElementDefault
(n: int) → bytes¶ Returns the pre-formatted default value associated with the nth element of the field. This is only valid if
hasElementDefault()
returns true, in which case this string represents the bytes that should be assigned to the field as a default value.If the element is an array-type element, the returned value will include the two-byte length preceding the array data.
Deprecated: use
getElement()
instead.
-
getElementDivisor
(n: int) → int¶ Returns the divisor associated with the nth element of the field. This implements an implicit fixed-point system; floating-point values are to be multiplied by this value before encoding into a packet, and divided by this number after decoding.
This method is deprecated; use get_element()->get_divisor() instead.
-
getElementName
(n: int) → str¶ Returns the name of the nth element of the field. This name is strictly for documentary purposes; it does not generally affect operation. If a name is not specified, this will be the empty string.
Deprecated: use get_element()->get_name() instead.
-
getElementType
(n: int) → DCSubatomicType¶ Returns the numeric type of the nth element of the field. This method is deprecated; use
getElement()
instead.
-
hasElementDefault
(n: int) → bool¶ Returns true if the nth element of the field has a default value specified, false otherwise.
Deprecated: use
getElement()
instead.
-