Workspace 6.21.5
|
Defines state info for an object. More...
#include <Mesh/DataStructures/state.h>
Public Member Functions | |
State (unsigned stateSize, unsigned integerDataSize) | |
~State () | |
void | addToIntegerData (int index, long val) |
void | addToState (int index, const Vector3d &v) |
void | addToState (int index, double val) |
void | copyIntegerData (int index, const State &s) |
void | copyState (int index, const State &s) |
void | copyStateVector (int index, const State &s) |
long | getIntegerData (int index) const |
double | getState (int index) const |
Vector3d | getStateVector (int index) const |
void | setIntegerData (int index, long val) |
void | setState (int index, const Vector3d &v) |
void | setState (int index, double val) |
Deprecated functions | |
void | CopyIntegerData (int index, const State &s) |
void | AddToIntegerData (int index, long val) |
void | SetIntegerData (int index, long val) |
long | GetIntegerData (int index) const |
void | CopyStateVector (int index, const State &s) |
void | CopyState (int index, const State &s) |
void | AddToState (int index, const Vector3d &v) |
void | AddToState (int index, double val) |
double | GetState (int index) const |
Vector3d | GetStateVector (int index) const |
void | SetState (int index, double val) |
void | SetState (int index, const Vector3d &v) |
Some classes use this as a base class. This behaviour can be thought of as turning the subclass into a stateful object.
State | ( | unsigned | stateSize, |
unsigned | integerDataSize | ||
) |
stateSize | The size of the state_ double array. |
integerDataSize | The size of the integerData_ integer array. |
The constructor requires the sizes to use for the double and integer arrays. Only a StateControl subclass should be allocating state objects since they are the ones who control what stateSize and integerDataSize are.
~State | ( | ) |
The destructor deallocates the state arrays.
|
inline |
index | The index of the integer state to add to. |
val | The value to add to the specified integer state. |
|
inline |
|
inline |
index | The index of the vector state to add to. |
v | The value to add to the specified vector state. |
|
inline |
|
inline |
index | The index of the scalar state to add to. |
val | The value to add to the specified scalar state. |
|
inline |
|
inline |
index | The index of the integer state to copy. This must be the same for both the source and destination of the copy. |
s | The state to copy the integer state from. |
It is assumed that s is managed by the same StateControl as this object, so the layout of the integerData_ array will be the same.
|
inline |
|
inline |
index | The index of the scalar state to copy. This must be the same for both the source and destination of the copy. |
s | The state to copy the scalar state from. |
It is assumed that s is managed by the same StateControl as this object, so the layout of the state_ array will be the same.
|
inline |
|
inline |
index | The index of the vector state to copy. This must be the same for both the source and destination of the copy. |
s | The state to copy the vector state from. |
It is assumed that s is managed by the same StateControl as this object, so the layout of the state_ array will be the same.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
index | The index of the integer state to set. |
val | The value to set the specified integer state to. |
|
inline |
|
inline |
index | The index of the vector state to set. |
v | The value to set the specified vector state to. |
|
inline |
|
inline |
index | The index of the scalar state to set. |
val | The value to set the specified scalar state to. |
|
inline |