OpenSim::VisibleProperties Class Reference

Class VisibleProperties is intended to contain all visible properties of an object including Wireframe/Surface Shading-Quality,. More...

#include <VisibleProperties.h>

Inheritance diagram for OpenSim::VisibleProperties:
OpenSim::Object

List of all members.

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.
Objectcopy () const
 virtual copy constructor
VisiblePropertiesoperator= (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])

Detailed Description

Class VisibleProperties is intended to contain all visible properties of an object including Wireframe/Surface Shading-Quality,.

Version:
1.0
Author:
Ayman Habib

Member Enumeration Documentation

Enumerator:
None 
WireFrame 
SolidFill 
FlatShaded 
GouraudShaded 
PhongShaded 
BoundingBox 

Constructor & Destructor Documentation

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 (

See also:
VisibleProperties(const char *aFileName)). In this case, the XML document is created by parsing the 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.).

Parameters:
aObject Object to be copied.
See also:
VisibleProperties(const XMLDocument *aDocument)
VisibleProperties(const char *aFileName)
generateXMLDocument()
VisibleProperties::~VisibleProperties (  )  [virtual]

Destructor.


Member Function Documentation

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.

Returns:
Reference to this object.

Reimplemented from OpenSim::Object.

bool VisibleProperties::operator== ( const VisibleProperties aObject  ) 

Determine if two objects are equal.

Returns:
True if the two objects are equal, false otherwise.
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


The documentation for this class was generated from the following files:

Generated on Wed Dec 16 15:03:43 2009 for OpenSim by  doxygen 1.6.1