Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# SliderTable Class Reference

Stores the total set of VertexSliders that the vertices in a particular GeomVertexData object might depend on. More...

Inheritance diagram for SliderTable:

List of all members.

## Public Member Functions
| SliderTable ()
| SliderTable (SliderTable const copy)
int | addSlider (VertexSlider const slider, SparseArray const rows)
| Adds a new slider to the table, and returns the index number of the new slider.
SparseArray const | findSliders (InternalName const name)
| Returns a list of slider indices that represent the list of sliders with the indicated name, or an empty SparseArray if no slider in the table has that name.
UpdateSeq | getModified (Thread current_thread)
| Returns a sequence number that's guaranteed to change at least when any VertexSliders in the table change.
int | getNumSliders ()
| Returns the number of sliders in the table.
VertexSlider const | getSlider (int n)
| Returns the nth slider in the table.
SparseArray const | getSliderRows (int n)
| Returns the set of rows (vertices) governed by the nth slider in the table.
list | getSliders ()
bool | hasSlider (InternalName const name)
| Returns true if the table has at least one slider by the indicated name, false otherwise.
bool | isEmpty ()
| Returns true if the table has no sliders, false if it has at least one.
bool | isRegistered ()
| Returns true if this table has been registered.
SliderTable | operator= (SliderTable const copy)
| removeSlider (int n)
| Removes the nth slider.
| setSlider (int n, VertexSlider const slider)
| Replaces the nth slider.
| setSliderRows (int n, SparseArray const rows)
| Replaces the rows affected by the nth slider.
| write (ostream out)
## Static Public Member Functions
static TypeHandle | getClassType ()
static SliderTable const | registerTable (SliderTable const table)
| Registers a SliderTable for use.

## Detailed Description

Stores the total set of VertexSliders that the vertices in a particular GeomVertexData object might depend on.

This is similar to a TransformTable, but it stores VertexSliders instead of VertexTransforms, 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.

## Constructor & Destructor Documentation

SliderTable | ( |  | ) |

SliderTable | ( | SliderTable const | copy | ) |

## Member Function Documentation

int addSlider | ( | VertexSlider const | slider,
|  | SparseArray const | rows
| ) |  |

Adds a new slider to the table, and returns the index number of the new slider.

Only valid for unregistered tables.

SparseArray const findSliders | ( | InternalName const | name | ) |

Returns a list of slider indices that represent the list of sliders with the indicated name, or an empty SparseArray if no slider in the table has that name.

static TypeHandle getClassType | ( |  | ) | `[static]`

Reimplemented from TypedWritableReferenceCount.

UpdateSeq getModified | ( | Thread | current_thread | ) |

Returns a sequence number that's guaranteed to change at least when any VertexSliders 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 a VertexSlider changes.)

int getNumSliders | ( |  | ) |

Returns the number of sliders in the table.

VertexSlider const getSlider | ( | int | n | ) |

Returns the nth slider in the table.

SparseArray const getSliderRows | ( | int | n | ) |

Returns the set of rows (vertices) governed by the nth slider in the table.

list getSliders | ( |  | ) |

bool hasSlider | ( | InternalName const | name | ) |

Returns true if the table has at least one slider by the indicated name, false otherwise.

bool isEmpty | ( |  | ) |

Returns true if the table has no sliders, false if it has at least one.

bool isRegistered | ( |  | ) |

Returns true if this table has been registered.

Once it has been registered, the set of sliders in a SliderTable may not be further modified; but it must be registered before it can be assigned to a Geom.

SliderTable operator= | ( | SliderTable const | copy | ) |

static SliderTable const registerTable | ( | SliderTable const | table | ) | `[static]`

Registers a SliderTable for use.

This is similar to GeomVertexFormat.register_format(). Once registered, a SliderTable may no longer be modified (although the individual VertexSlider objects 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.

removeSlider | ( | int | n | ) |

Removes the nth slider.

Only valid for unregistered tables.

setSlider | ( | int | n,
|  | VertexSlider const | slider
| ) |  |

Replaces the nth slider.

Only valid for unregistered tables.

setSliderRows | ( | int | n,
|  | SparseArray const | rows
| ) |  |

Replaces the rows affected by the nth slider.

Only valid for unregistered tables.

write | ( | ostream | out | ) |

All Classes Namespaces Functions Variables Enumerations Enumerator Properties