OpenSim::VisibleObject Class Reference
Class VisibleObject is intended to be used as the base class for all Visible objects that subclass Object.
More...
#include <VisibleObject.h>
List of all members.
Detailed Description
Class VisibleObject is intended to be used as the base class for all Visible objects that subclass Object.
It provides a common object from which to derive and also some basic functionality, such as maintaining geometry
- Version:
- 1.0
- Author:
- Ayman Habib
Constructor & Destructor Documentation
VisibleObject::VisibleObject |
( |
|
) |
|
OpenSim::VisibleObject::VisibleObject |
( |
const std::string & |
aFileName |
) |
|
Copy constructor.
Copy constructors for all VisibleObject'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 VisibleObject:
1) Construction based on XML file (
- See also:
- VisibleObject(const char *aFileName)). In this case, the XML document is created by parsing the XML file.
2) Construction by VisibleObject(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 VisibleObject 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 VisibleObject member variable, are preserved.
3) A call to generateXMLDocument(). This method generates an XML document for the VisibleObject from scratch. Only the essential document nodes are created (that is, nodes that correspond directly to member variables.).
- Parameters:
-
- See also:
- VisibleObject(const XMLDocument *aDocument)
-
VisibleObject(const char *aFileName)
-
generateXMLDocument()
VisibleObject::~VisibleObject |
( |
|
) |
[virtual] |
Member Function Documentation
void OpenSim::VisibleObject::addDependent |
( |
VisibleObject * |
aChild |
) |
[inline] |
void OpenSim::VisibleObject::addGeometry |
( |
Geometry * |
aGeometry |
) |
[inline] |
Object * VisibleObject::copy |
( |
|
) |
const [virtual] |
int OpenSim::VisibleObject::countDependents |
( |
|
) |
[inline] |
int OpenSim::VisibleObject::countGeometry |
( |
|
) |
[inline] |
void OpenSim::VisibleObject::freeGeometry |
( |
|
) |
[inline] |
const Geometry* OpenSim::VisibleObject::getDefaultGeometry |
( |
|
) |
[inline] |
VisibleObject* OpenSim::VisibleObject::getDependent |
( |
int |
i |
) |
[inline] |
Geometry* OpenSim::VisibleObject::getGeometry |
( |
int |
i |
) |
[inline] |
const std::string & VisibleObject::getGeometryFileName |
( |
int |
i |
) |
const |
Get the name of ith geometry files associated with visible object.
const int VisibleObject::getNumGeometryFiles |
( |
|
) |
const |
Get the number of geometry files associated with visible object.
Object* OpenSim::VisibleObject::getOwner |
( |
|
) |
[inline] |
void OpenSim::VisibleObject::getScaleFactors |
( |
double |
aScaleFactors[] |
) |
const [inline] |
void VisibleObject::getScaleFactors |
( |
SimTK::Vec3 & |
aScaleFactors |
) |
const |
Get Scale factors for geometry.
const SimTK::Transform& OpenSim::VisibleObject::getTransform |
( |
|
) |
[inline] |
void OpenSim::VisibleObject::getTransformAsDouble16 |
( |
double |
flatList[] |
) |
[inline] |
Retrieve the visible properties of a visible object.
bool OpenSim::VisibleObject::hasDependent |
( |
VisibleObject * |
aChild |
) |
[inline] |
Assign this object to the values of another.
- Returns:
- Reference to this object.
Reimplemented from OpenSim::Object.
bool VisibleObject::operator== |
( |
const VisibleObject & |
aObject |
) |
[virtual] |
Determine if two objects are equal.
- Returns:
- True if the two objects are equal, false otherwise.
void OpenSim::VisibleObject::removeDependent |
( |
VisibleObject * |
aChild |
) |
[inline] |
void OpenSim::VisibleObject::removeGeometry |
( |
Geometry * |
aGeometry |
) |
[inline] |
void OpenSim::VisibleObject::setGeometryFileName |
( |
int |
i, |
|
|
const std::string & |
aGeometryFileName | |
|
) |
| | |
void VisibleObject::setNumGeometryFiles |
( |
int |
n |
) |
|
set the number of geometry files associated with visible object
void OpenSim::VisibleObject::setOwner |
( |
Object * |
aObject |
) |
[inline] |
void OpenSim::VisibleObject::setScaleFactors |
( |
const double |
aScaleFactors[] |
) |
[inline] |
void VisibleObject::setScaleFactors |
( |
const SimTK::Vec3 & |
aScaleFactors |
) |
|
void OpenSim::VisibleObject::setTransform |
( |
const SimTK::Transform & |
aTransform |
) |
[inline] |
void VisibleObject::setupProperties |
( |
void |
|
) |
|
void VisibleObject::setVisibleProperties |
( |
const VisibleProperties & |
aVisibleProperties |
) |
|
set the visible properties of a visible object
void OpenSim::VisibleObject::translate |
( |
const SimTK::Vec3 & |
t |
) |
[inline] |
virtual void OpenSim::VisibleObject::updateGeometry |
( |
|
) |
[inline, protected, virtual] |
SimTK::Transform& OpenSim::VisibleObject::updTransform |
( |
|
) |
[inline] |
Member Data Documentation
The documentation for this class was generated from the following files:
- OpenSim/Common/VisibleObject.h
- OpenSim/Common/VisibleObject.cpp