SliderTable
from panda3d.core import SliderTable
- class SliderTable
Bases:
Bases:
TypedWritableReferenceCountStores the total set of
VertexSlidersthat the vertices in a particularGeomVertexDataobject might depend on.This is similar to a
TransformTable, but it storesVertexSlidersinstead ofVertexTransforms, and it stores them by name instead of by index number. Also, it is only used when animating vertices on the CPU, since GPU’s don’t support morphs at this point in time.Inheritance diagram
- __init__()
- __init__(copy: SliderTable)
- addSlider(slider: VertexSlider, rows: SparseArray) int
Adds a new slider to the table, and returns the index number of the new slider. Only valid for unregistered tables.
- assign(copy: SliderTable) SliderTable
- findSliders(name: InternalName) SparseArray
Returns a list of slider indices that represent the list of sliders with the indicated name, or an empty
SparseArrayif no slider in the table has that name.
- static getClassType() TypeHandle
- getModified(current_thread: Thread) UpdateSeq
Returns a sequence number that’s guaranteed to change at least when any
VertexSlidersin the table change. (However, this is only true for a registered table. An unregistered table may or may not reflect an update here when aVertexSliderchanges.)
- getSlider(n: int) VertexSlider
Returns the nth slider in the table.
- getSliderRows(n: int) SparseArray
Returns the set of rows (vertices) governed by the nth slider in the table.
- hasSlider(name: InternalName) bool
Returns true if the table has at least one slider by the indicated name, false otherwise.
- isRegistered() bool
Returns true if this table has been registered. Once it has been registered, the set of sliders in a
SliderTablemay not be further modified; but it must be registered before it can be assigned to a Geom.
- property modified UpdateSeq
Returns a sequence number that’s guaranteed to change at least when any
VertexSlidersin the table change. (However, this is only true for a registered table. An unregistered table may or may not reflect an update here when aVertexSliderchanges.)
- static registerTable(table: SliderTable) SliderTable
Registers a
SliderTablefor use. This is similar toGeomVertexFormat.registerFormat(). Once registered, aSliderTablemay no longer be modified (although the individualVertexSliderobjects may modify their reported sliders).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.
- setSlider(n: int, slider: VertexSlider)
Replaces the nth slider. Only valid for unregistered tables.
- setSliderRows(n: int, rows: SparseArray)
Replaces the rows affected by the nth slider. Only valid for unregistered tables.
