Panda3D
|
Stores the total set of VertexTransforms that the vertices in a particular GeomVertexData object might depend on. More...
#include <pandadoc.hpp>
Public Member Functions | |
__init__ () | |
__init__ (const TransformTable copy) | |
int | addTransform (const VertexTransform transform) |
Adds a new transform to the table and returns the index number of the new transform. | |
UpdateSeq | getModified (Thread current_thread) |
Returns a sequence number that's guaranteed to change at least when any VertexTransforms in the table change. | |
int | getNumTransforms () |
Returns the number of transforms in the table. | |
const VertexTransform | getTransform (int n) |
Returns the nth transform in the table. | |
list | getTransforms () |
insertTransform (int n, const VertexTransform transform) | |
Inserts a new transform to the table at the given index position. | |
bool | isRegistered () |
Returns true if this table has been registered. | |
TransformTable | operator= (const TransformTable copy) |
removeTransform (int n) | |
Removes the nth transform. | |
setTransform (int n, const VertexTransform transform) | |
Replaces the nth transform. | |
write (Ostream out) | |
![]() | |
object | __reduce__ () |
object | __reduce_persist__ (object pickler) |
VectorUchar | encodeToBamStream () |
Converts the TypedWritable object into a single stream of data using a BamWriter, and returns that data as a bytes object. | |
bool | encodeToBamStream (VectorUchar data, BamWriter writer) |
Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string. | |
fillin (DatagramIterator scan, BamReader manager) | |
This internal function is intended to be called by each class's make_from_bam() method to read in all of the relevant data from the BamFile for the new object. | |
UpdateSeq | getBamModified () |
Returns the current bam_modified counter. | |
markBamModified () | |
Increments the bam_modified counter, so that this object will be invalidated and retransmitted on any open bam streams. | |
![]() | |
TypeHandle | getType () |
int | getTypeIndex () |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
bool | isExactType (TypeHandle handle) |
Returns true if the current object is the indicated type exactly. | |
bool | isOfType (TypeHandle handle) |
Returns true if the current object is or derives from the indicated type. | |
![]() | |
int | getRefCount () |
Returns the current reference count. | |
ref () | |
Explicitly increments the reference count. | |
bool | testRefCountIntegrity () |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
bool | testRefCountNonzero () |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. | |
bool | unref () |
Explicitly decrements the reference count. | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
static const TransformTable | registerTable (const TransformTable table) |
Registers a TransformTable for use. | |
![]() | |
static TypedWritableReferenceCount | decodeFromBamStream (VectorUchar data, BamReader reader) |
Reads the bytes created by a previous call to encode_to_bam_stream(), and extracts and returns the single object on those bytes. | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
Public Attributes | |
UpdateSeq | modified |
Returns a sequence number that's guaranteed to change at least when any VertexTransforms in the table change. | |
bool | registered |
Returns true if this table has been registered. | |
const VertexTransform | transforms [] |
Returns the nth transform in the table. | |
![]() | |
TypeHandle | type |
Returns the TypeHandle representing this object's type. | |
![]() | |
int | ref_count |
The current reference count. | |
Stores the total set of VertexTransforms that the vertices in a particular GeomVertexData object might depend on.
This structure is used for a GeomVertexData set up to compute its dynamic vertices on the graphics card. See TransformBlendTable for one set up to compute its dynamic vertices on the CPU.
__init__ | ( | ) |
__init__ | ( | const TransformTable | copy | ) |
int addTransform | ( | const VertexTransform | transform | ) |
Adds a new transform to the table and returns the index number of the new transform.
Only valid for unregistered tables.
This does not automatically uniquify the pointer; if the transform is already present in the table, it will be added twice.
|
static |
Returns a sequence number that's guaranteed to change at least when any VertexTransforms in the table change.
(However, this is only true for a registered table. An unregistered table may or may not reflect an update here when a VertexTransform changes.)
int getNumTransforms | ( | ) |
Returns the number of transforms in the table.
const VertexTransform getTransform | ( | int | n | ) |
Returns the nth transform in the table.
list getTransforms | ( | ) |
insertTransform | ( | int | n, |
const VertexTransform | transform ) |
Inserts a new transform to the table at the given index position.
If the index is beyond the end of the table, appends it to the end. Only valid for unregistered tables.
This does not automatically uniquify the pointer; if the transform is already present in the table, it will be added twice.
bool isRegistered | ( | ) |
Returns true if this table has been registered.
Once it has been registered, the set of transforms in a TransformTable may not be further modified; but it must be registered before it can be assigned to a Geom.
TransformTable operator= | ( | const TransformTable | copy | ) |
|
static |
Registers a TransformTable for use.
This is similar to GeomVertexFormat::register_format(). Once registered, a TransformTable may no longer be modified (although the individual VertexTransform objects may modify their reported transforms).
This must be called before a table may be used in a Geom. After this call, you should discard the original pointer you passed in (which may or may not now be invalid) and let its reference count decrement normally; you should use only the returned value from this point on.
removeTransform | ( | int | n | ) |
Removes the nth transform.
Only valid for unregistered tables.
setTransform | ( | int | n, |
const VertexTransform | transform ) |
Replaces the nth transform.
Only valid for unregistered tables.
write | ( | Ostream | out | ) |
UpdateSeq modified |
Returns a sequence number that's guaranteed to change at least when any VertexTransforms in the table change.
(However, this is only true for a registered table. An unregistered table may or may not reflect an update here when a VertexTransform changes.)
bool registered |
Returns true if this table has been registered.
Once it has been registered, the set of transforms in a TransformTable may not be further modified; but it must be registered before it can be assigned to a Geom.
const VertexTransform transforms[] |
Returns the nth transform in the table.