#include <BlueprintManager.h>
Public Member Functions | |
BlueprintManager () | |
virtual | ~BlueprintManager () |
virtual void OPAL_CALL | loadFile (Blueprint &bp, const std::string &filename) |
Private Member Functions | |
SolidData * | loadSolid (const TiXmlNode *nodePtr, const std::string &filename) |
JointData * | loadJoint (const TiXmlNode *nodePtr, const Blueprint &bp, const std::string &filename) |
MotorData * | loadMotor (const TiXmlNode *nodePtr, const Blueprint &bp, const std::string &filename) |
AttractorMotorData * | loadAttractorMotor (const TiXmlNode *nodePtr, const Blueprint &bp, const std::string &filename) |
GearedMotorData * | loadGearedMotor (const TiXmlNode *nodePtr, const Blueprint &bp, const std::string &filename) |
ServoMotorData * | loadServoMotor (const TiXmlNode *nodePtr, const Blueprint &bp, const std::string &filename) |
SpringMotorData * | loadSpringMotor (const TiXmlNode *nodePtr, const Blueprint &bp, const std::string &filename) |
ThrusterMotorData * | loadThrusterMotor (const TiXmlNode *nodePtr, const Blueprint &bp, const std::string &filename) |
SensorData * | loadSensor (const TiXmlNode *nodePtr, const Blueprint &bp, const std::string &filename) |
AccelerationSensorData * | loadAccelerationSensor (const TiXmlNode *nodePtr, const Blueprint &bp, const std::string &filename) |
InclineSensorData * | loadInclineSensor (const TiXmlNode *nodePtr, const Blueprint &bp, const std::string &filename) |
RaycastSensorData * | loadRaycastSensor (const TiXmlNode *nodePtr, const Blueprint &bp, const std::string &filename) |
VolumeSensorData * | loadVolumeSensor (const TiXmlNode *nodePtr, const Blueprint &bp, const std::string &filename) |
ShapeData * | loadShape (const TiXmlNode *nodePtr, const std::string &filename) |
void | loadOffset (Matrix44r &offset, const TiXmlNode *nodePtr, const std::string &filename) |
real | getAttributeReal (const TiXmlNode *nodePtr, const std::string &name) const |
std::string | getAttributeString (const TiXmlNode *nodePtr, const std::string &name) const |
Definition at line 52 of file BlueprintManager.h.
|
Definition at line 64 of file BlueprintManager.cpp. |
|
Definition at line 67 of file BlueprintManager.cpp. |
|
Helper function; returns 0 if the attribute doesn't exist. |
|
Helper function; returns an empty string if the attribute doesn't exist. |
|
Helper function for parsing AccelerationSensor XML elements. Allocates and returns a pointer to a new AccelerationSensorData object. Returns NULL if the element could not be loaded. |
|
Helper function for parsing AttractorMotor XML elements. Allocates and returns a pointer to a new AttractorMotorData object. Returns NULL if the element could not be loaded. |
|
Loads a Blueprint from an OPAL XML file. The file should contain a single OpalBlueprint element (additional ones will be ignored). The Blueprint can contain any number of Solids, Joints, Motors, and Sensors. Most of the object parameters are optional, in which case the usual default values will be used. The only required parameters are object types and references to other objects (i.e. the "References" elements in an XML file). For example, a Joint refers to two Solids; if either of those Solids are not in the file, the Joint will be ignored. The exception is Sensors' references to Solids; these aren't required because Sensors don't have to be attached to a Solid. For a particular element that does exist in the XML file, all attributes are always required. All object names, if used, must be unique. |
|
Helper function for parsing GearedMotor XML elements. Allocates and returns a pointer to a new GearedMotorData object. Returns NULL if the element could not be loaded. |
|
Helper function for parsing InclineSensor XML elements. Allocates and returns a pointer to a new InclineSensorData object. Returns NULL if the element could not be loaded. |
|
Helper function for parsing Joint XML elements. Allocates and returns a pointer to a new JointData object. Returns NULL if the element could not be loaded. |
|
Helper function for parsing Motor XML elements. Allocates and returns a pointer to a new MotorData object. Returns NULL if the element could not be loaded. |
|
Helper function for parsing offset XML elements.
|
|
Helper function for parsing RaycastSensor XML elements. Allocates and returns a pointer to a new RaycastSensorData object. Returns NULL if the element could not be loaded. |
|
Helper function for parsing Sensor XML elements. Allocates and returns a pointer to a new SensorData object. Returns NULL if the element could not be loaded. |
|
Helper function for parsing ServoMotor XML elements. Allocates and returns a pointer to a new ServoMotorData object. Returns NULL if the element could not be loaded. |
|
Helper function for parsing Shape XML elements. Allocates and returns a pointer to a new ShapeData object. Returns NULL if the element could not be loaded. |
|
Saves a Blueprint to an OPAL XML file. Helper function for parsing Solid XML elements. Allocates and returns a pointer to a new SolidData object. Returns NULL if the element could not be loaded. |
|
Helper function for parsing SpringMotor XML elements. Allocates and returns a pointer to a new SpringMotorData object. Returns NULL if the element could not be loaded. |
|
Helper function for parsing ThrusterMotor XML elements. Allocates and returns a pointer to a new ThrusterMotorData object. Returns NULL if the element could not be loaded. |
|
Helper function for parsing VolumeSensor XML elements. Allocates and returns a pointer to a new VolumeSensorData object. Returns NULL if the element could not be loaded. |