OpenSceneGraph
|
Public Types | |
enum | Type { UNKNOWN, INTEGER, DOUBLE, STRING } |
ShapeAttribute data type. | |
Public Member Functions | |
ShapeAttribute (const char *name) | |
ShapeAttribute (const char *name, int value) | |
ShapeAttribute (const char *name, double value) | |
ShapeAttribute (const char *name, const char *value) | |
Note, ShapeAttribute takes a copy of both name and value, the calling code should manage its own clean up of the original strings. More... | |
ShapeAttribute (const ShapeAttribute &sa) | |
ShapeAttribute & | operator= (const ShapeAttribute &sa) |
int | compare (const osgSim::ShapeAttribute &sa) const |
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. More... | |
bool | operator== (const osgSim::ShapeAttribute &sa) const |
bool | operator!= (const osgSim::ShapeAttribute &sa) const |
bool | operator< (const osgSim::ShapeAttribute &sa) const |
const std::string & | getName () const |
Get the attribute name. | |
void | setName (const std::string &name) |
Set the attribute name. | |
Type | getType () const |
Get the attribute data type. | |
int | getInt () const |
Get the attribute data as an int. | |
double | getDouble () const |
Get the attribute data as a double. | |
const char * | getString () const |
Get the attribute data as a string. | |
void | setValue (int value) |
Set an integer attribute data. | |
void | setValue (double value) |
Set a double attribute data. | |
void | setValue (const char *value) |
Set a string attribute data. | |
osgSim::ShapeAttribute::ShapeAttribute | ( | const char * | name, |
const char * | value | ||
) |
Note, ShapeAttribute takes a copy of both name and value, the calling code should manage its own clean up of the original strings.
int osgSim::ShapeAttribute::compare | ( | const osgSim::ShapeAttribute & | sa | ) | const |
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.