TransformBlendTable
-
class TransformBlendTable
Bases:
CopyOnWriteObjectThis structure collects together the different combinations of transforms and blend amounts used by a
GeomVertexData, to facilitate computing dynamic vertices on the CPU at runtime. Each vertex has a pointer to exactly one of the entries in this table, and each entry defines a number of transform/blend combinations.This structure is used for a
GeomVertexDataset up to compute its dynamic vertices on the CPU. SeeTransformTablefor one set up to compute its dynamic vertices on the graphics card.Inheritance diagram
-
TransformBlendTable(void)
-
TransformBlendTable(TransformBlendTable const ©)
-
std::size_t add_blend(TransformBlend const &blend)
Adds a new blend to the table, and returns its index number. If there is already an identical blend in the table, simply returns that number instead.
-
TransformBlend const &get_blend(std::size_t n) const
Returns the nth blend in the table.
-
static TypeHandle get_class_type(void)
-
int get_max_simultaneous_transforms(void) const
Returns the maximum number of unique
VertexTransformobjects that are applied to any one vertex simultaneously. This is the same limit reflected byGraphicsStateGuardian::get_max_vertex_transforms().
-
UpdateSeq get_modified(Thread *current_thread = Thread::get_current_thread()) const
Returns a counter which is guaranteed to increment at least when any
TransformBlendswithin the table have changed.
-
std::size_t get_num_blends(void) const
Returns the total number of different blend combinations in the table.
-
int get_num_transforms(void) const
Returns the number of unique
VertexTransformobjects represented in the table. This will correspond to the size of theTransformTableobject that would represent the same table. This is also the same limit reflected byGraphicsStateGuardian::get_max_vertex_transform_indices().
-
SparseArray const &get_rows(void) const
Returns the subset of rows (vertices) in the associated
GeomVertexDatathat thisTransformBlendTableactually affects.
-
SparseArray &modify_rows(void)
Returns a modifiable reference to the
SparseArraythat specifies the subset of rows (vertices) in the associatedGeomVertexDatathat thisTransformBlendTableactually affects.
-
void remove_blend(std::size_t n)
Removes the blend at the nth position.
-
void set_blend(std::size_t n, TransformBlend const &blend)
Replaces the blend at the nth position with the indicated value.
-
void set_rows(SparseArray const &rows)
Specifies the subset of rows (vertices) in the associated
GeomVertexDatathat thisTransformBlendTableactually affects.
-
void write(std::ostream &out, int indent_level) const
-
TransformBlendTable(void)
