panda3d.core.TransformBlendTable

class TransformBlendTable

Bases: CopyOnWriteObject

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.

Inheritance diagram

Inheritance diagram of TransformBlendTable

__init__() → None
__init__(copy: TransformBlendTable) → None
assign(copy: TransformBlendTable) → TransformBlendTable
Return type

TransformBlendTable

getNumBlends() → size_t

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

Return type

size_t

getBlend(n: size_t) → TransformBlend

Returns the nth blend in the table.

Return type

TransformBlend

getModified(current_thread: Thread) → UpdateSeq

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

Return type

UpdateSeq

setBlend(n: size_t, blend: TransformBlend) → None

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

removeBlend(n: size_t) → None

Removes the blend at the nth position.

addBlend(blend: TransformBlend) → size_t

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.

Return type

size_t

getNumTransforms() → int

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.getMaxVertexTransformIndices().

getMaxSimultaneousTransforms() → int

Returns the maximum number of unique VertexTransform objects that are applied to any one vertex simultaneously. This is the same limit reflected by GraphicsStateGuardian.getMaxVertexTransforms().

setRows(rows: SparseArray) → None

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

getRows() → SparseArray

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

Return type

SparseArray

modifyRows() → SparseArray

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

Return type

SparseArray

write(out: ostream, indent_level: int) → None
static getClassType() → TypeHandle
Return type

TypeHandle

getBlends() → list
property blends
Getter

Returns the nth blend in the table.

Setter

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

Return type

Sequence[TransformBlend]

property modified

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

Return type

UpdateSeq

property num_transforms

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.getMaxVertexTransformIndices().

Return type

int

property max_simultaneous_transforms

Returns the maximum number of unique VertexTransform objects that are applied to any one vertex simultaneously. This is the same limit reflected by GraphicsStateGuardian.getMaxVertexTransforms().

Return type

int

property rows
Getter

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

Setter

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

Return type

SparseArray