Model Class Reference

#include <Model.hh>

Inheritance diagram for Model:

Entity List of all members.

Detailed Description

A model.

Public Member Functions

 Model (Model *parent)
virtual ~Model ()
int Load (XMLConfigNode *node)
 Load the model.
void Save ()
 Save the model.
void Test ()
int Init ()
 Initialize the model.
int Update (UpdateParams &params)
 Update the model.
int Fini ()
 Finalize the model.
void Reset ()
 Reset the model.
const std::string & GetType () const
 Get the type of the model.
void SetInitPose (const Pose3d &pose)
 Set the initial pose.
const Pose3dGetInitPose () const
 Get the initial pose.
void SetPose (const Pose3d &pose)
 Set the current pose.
const Pose3dGetPose () const
 Get the current pose.
BodyCreateBody ()
 Create and return a new body.
JointCreateJoint (Joint::Type type)
 Create and return a new joint.
JointGetJoint (std::string name)
 Get a joint.
BodyGetBody ()
 Get the default body.
BodyGetBody (const std::string &name)
 Get a body by name.
void Attach (XMLConfigNode *node)
 Attach this model to its parent.
BodyGetCanonicalBody ()
 Get the canonical body.

Protected Member Functions

virtual int LoadChild (XMLConfigNode *)
 Load the child model.
virtual int InitChild ()
 Initialize the child model.
virtual int UpdateChild ()
 Update the child model.
virtual int FiniChild ()
 Finilaize thie child model.

Protected Attributes

std::map< std::string, Body * > bodies
 Map of the bodies. std::string == body_name.
std::map< std::string, Joint * > joints
 Map of the joints.
std::map< std::string, Controller * > controllers
 Map of the controllers.

Member Function Documentation

int Update ( UpdateParams params  ) 

Update the model.

params Update parameters

Body* CreateBody (  ) 

Create and return a new body.

Pointer to a new body.

Joint* CreateJoint ( Joint::Type  type  ) 

Create and return a new joint.

type Type of the joint.
Pointer to a new joint.

Joint* GetJoint ( std::string  name  ) 

Get a joint.

name The name of the joint, specified in the world file
Pointer to the joint

Body* GetBody (  ) 

Get the default body.

The default body

Body* GetBody ( const std::string &  name  ) 

Get a body by name.

Pointer to the body

Body* GetCanonicalBody (  ) 

Get the canonical body.

Used for connected Model heirarchies

Pointer to the body

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

Last updated Aug 04 2007