Model Class Reference
[Server]
#include <Model.hh>
Inheritance diagram for Model:
Detailed Description
A modelPublic Member Functions | |
Model () | |
virtual | ~Model () |
int | Load (XMLConfigNode *node) |
int | Init () |
int | Update (UpdateParams ¶ms) |
int | Fini () |
void | Reset () |
void | SetType (const std::string &type) |
const std::string & | GetType () const |
void | SetXMLConfigNode (XMLConfigNode *node) |
XMLConfigNode * | GetXMLConfigNode () const |
void | SetInitPose (const Pose3d &pose) |
const Pose3d & | GetInitPose () const |
void | SetPose (const Pose3d &pose) |
const Pose3d & | GetPose () const |
Body * | CreateBody () |
Joint * | CreateJoint (Joint::Type type) |
Joint * | GetJoint (std::string name) |
Body * | GetBody () |
void | Attach () |
Body * | GetCanonicalBody () |
Protected Member Functions | |
virtual int | LoadChild (XMLConfigNode *) |
virtual int | InitChild () |
virtual int | UpdateChild () |
virtual int | FiniChild () |
Protected Attributes | |
std::map < std::string, Body * > | bodies |
std::map < std::string, Joint * > | joints |
std::map < std::string, Controller * > | controllers |
Constructor & Destructor Documentation
Model | ( | ) |
Constructor
virtual ~Model | ( | ) | [virtual] |
Destructor
Member Function Documentation
int Load | ( | XMLConfigNode * | node | ) |
Load the model
int Init | ( | ) |
Initialize the model
int Update | ( | UpdateParams & | params | ) |
Update the model
- Parameters:
-
params Update parameters
int Fini | ( | ) |
Finalize the model
void Reset | ( | ) |
Reset the model
virtual int LoadChild | ( | XMLConfigNode * | ) | [inline, protected, virtual] |
Load the child model
virtual int InitChild | ( | ) | [inline, protected, virtual] |
Initialize the child model
virtual int UpdateChild | ( | ) | [inline, protected, virtual] |
Update the child model
virtual int FiniChild | ( | ) | [inline, protected, virtual] |
Finilaize thie child model
void SetType | ( | const std::string & | type | ) |
Set the type of the model
const std::string& GetType | ( | ) | const |
Get the type of the model
void SetXMLConfigNode | ( | XMLConfigNode * | node | ) |
Set the XMLConfig node this model was loaded from
XMLConfigNode* GetXMLConfigNode | ( | ) | const |
Get the XML Conig node this model was loaded from
void SetInitPose | ( | const Pose3d & | pose | ) |
Set the initial pose
const Pose3d& GetInitPose | ( | ) | const |
Get the initial pose
void SetPose | ( | const Pose3d & | pose | ) |
Set the current pose
const Pose3d& GetPose | ( | ) | const |
Get the current pose
Body* CreateBody | ( | ) |
Create and return a new body
- Returns:
- Pointer to a new body.
Joint* CreateJoint | ( | Joint::Type | type | ) |
Create and return a new joint
- Parameters:
-
type Type of the joint.
- Returns:
- Pointer to a new joint.
Joint* GetJoint | ( | std::string | name | ) |
Get a joint
- Parameters:
-
name The name of the joint, specified in the world file
- Returns:
- Pointer to the joint
Body* GetBody | ( | ) |
Get the default body
- Returns:
- The default body
void Attach | ( | ) |
Attach this model to its parent
Body* GetCanonicalBody | ( | ) |
Get the canonical body. Used for connected Model heirarchies
- Returns:
- Pointer to the body
Member Data Documentation
std::map<std::string, Controller* > controllers [protected] |
Map of the controllers
The documentation for this class was generated from the following file: