TransformTable
-
class TransformTable
Bases:
TypedWritableReferenceCount
Stores the total set of
VertexTransforms
that the vertices in a particularGeomVertexData
object might depend on.This structure is used for a
GeomVertexData
set up to compute its dynamic vertices on the graphics card. SeeTransformBlendTable
for one set up to compute its dynamic vertices on the CPU.Inheritance diagram
-
TransformTable(void)
-
TransformTable(TransformTable const ©)
-
std::size_t add_transform(VertexTransform const *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 TypeHandle get_class_type(void)
-
UpdateSeq get_modified(Thread *current_thread = Thread::get_current_thread()) const
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 aVertexTransform
changes.)
-
std::size_t get_num_transforms(void) const
Returns the number of transforms in the table.
-
VertexTransform const *get_transform(std::size_t n) const
Returns the nth transform in the table.
-
void insert_transform(std::size_t n, VertexTransform const *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 is_registered(void) const
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.
-
ConstPointerTo<TransformTable> register_table(TransformTable const *table)
Registers a
TransformTable
for use. This is similar toGeomVertexFormat::register_format()
. Once registered, aTransformTable
may no longer be modified (although the individualVertexTransform
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.
-
void remove_transform(std::size_t n)
Removes the nth transform. Only valid for unregistered tables.
-
void set_transform(std::size_t n, VertexTransform const *transform)
Replaces the nth transform. Only valid for unregistered tables.
-
void write(std::ostream &out) const
-
TransformTable(void)