Class VisibleProperties is intended to contain all visible properties of an object including Wireframe/Surface Shading-Quality,. More...
#include <VisibleProperties.h>
Public Types | |
enum | DisplayPreference { None = 0, WireFrame = 1, SolidFill = 2, FlatShaded = 3, GouraudShaded = 4, PhongShaded = 5, BoundingBox = 6 } |
Public Member Functions | |
VisibleProperties () | |
Default constructor. | |
VisibleProperties (const std::string &aFileName) | |
VisibleProperties (const XMLDocument *aDocument) | |
Construct an object from a document. | |
VisibleProperties (const VisibleProperties &aVisibleProperties) | |
Copy constructor. | |
virtual | ~VisibleProperties () |
Destructor. | |
Object * | copy () const |
virtual copy constructor | |
VisibleProperties & | operator= (const VisibleProperties &aVisibleProperties) |
Assign this object to the values of another. | |
bool | operator== (const VisibleProperties &aObject) |
Determine if two objects are equal. | |
void | setDisplayPreference (const DisplayPreference aDisplayPreference) |
setDisplayPreference: Wireframe, shaded, . | |
DisplayPreference | getDisplayPreference () const |
getDisplayPreference: Wireframe, shaded, . | |
void | setShowNormals (const bool showNormals) |
setShowNormals flag | |
bool | getShowNormals () const |
getShowNormals flag | |
void | setShowAxes (const bool showAxes) |
setShowAxes flag | |
bool | getShowAxes () const |
getShowAxes flag | |
void | setMaterialName (const char *matName) |
set the name of the material associated with object | |
const char * | getMaterialName () const |
get the name of the material associated with object | |
void | getColor (double aColor[3]) |
void | setColor (double aColor[3]) |
Class VisibleProperties is intended to contain all visible properties of an object including Wireframe/Surface Shading-Quality,.
VisibleProperties::VisibleProperties | ( | ) |
Default constructor.
OpenSim::VisibleProperties::VisibleProperties | ( | const std::string & | aFileName | ) |
VisibleProperties::VisibleProperties | ( | const XMLDocument * | aDocument | ) |
Construct an object from a document.
The document is copied and this object, including its derived classes, are constructed based on the nodes within the document.
VisibleProperties::VisibleProperties | ( | const VisibleProperties & | aObject | ) |
Copy constructor.
Copy constructors for all VisibleProperties's only copy the non-XML variable members of the object; that is, the object's DOMnode and XMLDocument are not copied but set to NULL. The reason for this is that for the object and all its derived classes to establish the correct connection to the XML document nodes, the the object would need to reconstruct based on the XML document not the values of the object's member variables.
There are three proper ways to generate an XML document for an VisibleProperties:
1) Construction based on XML file (
2) Construction by VisibleProperties(const XMLDocument *aDocument). This constructor explictly requests construction based on an XML document. In this way the proper connection between an object's node and the corresponding node within the XML document is established. This constructor is a copy constructor of sorts because all essential VisibleProperties member variables should be held within the XML document. The advantage of this style of construction is that nodes within the XML document, such as comments that may not have any associated VisibleProperties member variable, are preserved.
3) A call to generateXMLDocument(). This method generates an XML document for the VisibleProperties from scratch. Only the essential document nodes are created (that is, nodes that correspond directly to member variables.).
aObject | Object to be copied. |
VisibleProperties::~VisibleProperties | ( | ) | [virtual] |
Destructor.
Object * VisibleProperties::copy | ( | ) | const [virtual] |
virtual copy constructor
Reimplemented from OpenSim::Object.
void OpenSim::VisibleProperties::getColor | ( | double | aColor[3] | ) | [inline] |
VisibleProperties::DisplayPreference VisibleProperties::getDisplayPreference | ( | ) | const |
getDisplayPreference: Wireframe, shaded, .
..
const char * VisibleProperties::getMaterialName | ( | ) | const |
get the name of the material associated with object
bool VisibleProperties::getShowAxes | ( | ) | const |
getShowAxes flag
bool VisibleProperties::getShowNormals | ( | ) | const |
getShowNormals flag
VisibleProperties & VisibleProperties::operator= | ( | const VisibleProperties & | aObject | ) |
Assign this object to the values of another.
Reimplemented from OpenSim::Object.
bool VisibleProperties::operator== | ( | const VisibleProperties & | aObject | ) |
Determine if two objects are equal.
void OpenSim::VisibleProperties::setColor | ( | double | aColor[3] | ) | [inline] |
void VisibleProperties::setDisplayPreference | ( | const DisplayPreference | aDisplayPreference | ) |
setDisplayPreference: Wireframe, shaded, .
..
void VisibleProperties::setMaterialName | ( | const char * | matName | ) |
set the name of the material associated with object
void VisibleProperties::setShowAxes | ( | const bool | showAxes | ) |
setShowAxes flag
void VisibleProperties::setShowNormals | ( | const bool | showNormals | ) |
setShowNormals flag