Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Member Functions | Static Public Member Functions
TransformBlendTable Class Reference

This 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. More...

Inheritance diagram for TransformBlendTable:
CopyOnWriteObject CachedTypedWritableReferenceCount TypedWritableReferenceCount TypedWritable ReferenceCount TypedObject

List of all members.

Public Member Functions

 TransformBlendTable ()
 TransformBlendTable (TransformBlendTable const copy)
int addBlend (TransformBlend const blend)
 Adds a new blend to the table, and returns its index number.
TransformBlend const getBlend (int n)
 Returns the nth blend in the table.
list getBlends ()
int getMaxSimultaneousTransforms ()
 Returns the maximum number of unique VertexTransform objects that are applied to any one vertex simultaneously.
UpdateSeq getModified (Thread current_thread)
 Returns a counter which is guaranteed to increment at least when any TransformBlends within the table have changed.
int getNumBlends ()
 Returns the total number of different blend combinations in the table.
int getNumTransforms ()
 Returns the number of unique VertexTransform objects represented in the table.
SparseArray const getRows ()
 Returns the subset of rows (vertices) in the associated GeomVertexData that this TransformBlendTable actually affects.
SparseArray modifyRows ()
 Returns a modifiable reference to the SparseArray that specifies the subset of rows (vertices) in the associated GeomVertexData that this TransformBlendTable actually affects.
TransformBlendTable operator= (TransformBlendTable const copy)
 removeBlend (int n)
 Removes the blend at the nth position.
 setBlend (int n, TransformBlend const blend)
 Replaces the blend at the nth position with the indicated value.
 setRows (SparseArray const rows)
 Specifies the subset of rows (vertices) in the associated GeomVertexData that this TransformBlendTable actually affects.
 write (ostream out, int indent_level)

Static Public Member Functions

static TypeHandle getClassType ()

Detailed Description

This 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 GeomVertexData set up to compute its dynamic vertices on the CPU. See TransformTable for one set up to compute its dynamic vertices on the graphics card.


Constructor & Destructor Documentation


Member Function Documentation

int addBlend ( 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 getBlend ( int  n)

Returns the nth blend in the table.

list getBlends ( )
static TypeHandle getClassType ( ) [static]

Reimplemented from CopyOnWriteObject.

Returns the maximum number of unique VertexTransform objects that are applied to any one vertex simultaneously.

This is the same limit reflected by GraphicsStateGuardian::get_max_vertex_transforms().

UpdateSeq getModified ( Thread  current_thread)

Returns a counter which is guaranteed to increment at least when any TransformBlends within the table have changed.

Returns the total number of different blend combinations in the table.

Returns the number of unique VertexTransform objects represented in the table.

This will correspond to the size of the TransformTable object that would represent the same table. This is also the same limit reflected by GraphicsStateGuardian::get_max_vertex_transform_indices().

SparseArray const getRows ( )

Returns the subset of rows (vertices) in the associated GeomVertexData that this TransformBlendTable actually affects.

Returns a modifiable reference to the SparseArray that specifies the subset of rows (vertices) in the associated GeomVertexData that this TransformBlendTable actually affects.

TransformBlendTable operator= ( TransformBlendTable const  copy)
removeBlend ( int  n)

Removes the blend at the nth position.

setBlend ( int  n,
TransformBlend const  blend 
)

Replaces the blend at the nth position with the indicated value.

setRows ( SparseArray const  rows)

Specifies the subset of rows (vertices) in the associated GeomVertexData that this TransformBlendTable actually affects.

write ( ostream  out,
int  indent_level 
)
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties