OpenSceneGraph
3.4.0
|
Public Types | |
enum | Type { UNKNOWN, INTEGER, DOUBLE, STRING } |
ShapeAttribute data type. More... | |
Public Member Functions | |
ShapeAttribute () | |
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. | |
ShapeAttribute (const ShapeAttribute &sa) | |
~ShapeAttribute () | |
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. | |
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. |
ShapeAttribute data type.
osgSim::ShapeAttribute::ShapeAttribute | ( | const char * | name | ) |
osgSim::ShapeAttribute::ShapeAttribute | ( | const char * | name, |
int | value | ||
) |
osgSim::ShapeAttribute::ShapeAttribute | ( | const char * | name, |
double | value | ||
) |
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.
osgSim::ShapeAttribute::ShapeAttribute | ( | const ShapeAttribute & | sa | ) |
int osgSim::ShapeAttribute::compare | ( | const osgSim::ShapeAttribute & | sa | ) | const |
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
double osgSim::ShapeAttribute::getDouble | ( | ) | const [inline] |
Get the attribute data as a double.
int osgSim::ShapeAttribute::getInt | ( | ) | const [inline] |
Get the attribute data as an int.
const std::string& osgSim::ShapeAttribute::getName | ( | ) | const [inline] |
Get the attribute name.
const char* osgSim::ShapeAttribute::getString | ( | ) | const [inline] |
Get the attribute data as a string.
Type osgSim::ShapeAttribute::getType | ( | ) | const [inline] |
Get the attribute data type.
bool osgSim::ShapeAttribute::operator!= | ( | const osgSim::ShapeAttribute & | sa | ) | const [inline] |
bool osgSim::ShapeAttribute::operator< | ( | const osgSim::ShapeAttribute & | sa | ) | const [inline] |
ShapeAttribute& osgSim::ShapeAttribute::operator= | ( | const ShapeAttribute & | sa | ) |
bool osgSim::ShapeAttribute::operator== | ( | const osgSim::ShapeAttribute & | sa | ) | const [inline] |
void osgSim::ShapeAttribute::setName | ( | const std::string & | name | ) | [inline] |
Set the attribute name.
void osgSim::ShapeAttribute::setValue | ( | int | value | ) | [inline] |
Set an integer attribute data.
void osgSim::ShapeAttribute::setValue | ( | double | value | ) | [inline] |
Set a double attribute data.
void osgSim::ShapeAttribute::setValue | ( | const char * | value | ) |
Set a string attribute data.
![]() | Generated at Tue Dec 8 2015 00:16:49 for the OpenSceneGraph by doxygen 1.7.6.1. |