MJointFactory Class Reference

#include <MJointFactory.h>

Collaboration diagram for MJointFactory:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual MJointcreateJoint (const wxXmlNode &node, const MWorld &world)

Static Public Member Functions

static MJointFactoryfactory ()
static void factory (MJointFactory *factory)

Static Protected Attributes

static MJointFactorytheFactory = NULL

Detailed Description

Creates the correct joint type from the XML file. This exists so that the MWorld or the MJoint doesn't have to know about all the different joint types
Author:
Chad Weisshaar
Date:
2005

Definition at line 15 of file MJointFactory.h.


Member Function Documentation

MJoint * MJointFactory::createJoint const wxXmlNode &  node,
const MWorld world
[virtual]
 

The main function. Build a joint of the correct type based on the given <joint> node.

Parameters:
worldId The world that the joint will be added to added to. I don't do the adding, the joint construtors need this

Definition at line 33 of file MJointFactory.cpp.

References MObject::body(), XMLUtil::findChildWithName(), XMLUtil::findPropertyWithName(), MWorld::getObject(), traceId, verboseMsg, and warnMsg.

Referenced by MWorld::handleJointNode().

Here is the call graph for this function:

void MJointFactory::factory MJointFactory factory  )  [static]
 

Set the "official" factory. Used by MWorld to build joints. See theFactory

Definition at line 17 of file MJointFactory.cpp.

References theFactory, and traceId.

MJointFactory * MJointFactory::factory  )  [static]
 

Get the "official" factory. Used by MWorld to build joints. See theFactory

Definition at line 24 of file MJointFactory.cpp.

References theFactory, and traceId.

Referenced by MWorld::handleJointNode().


Member Data Documentation

MJointFactory * MJointFactory::theFactory = NULL [static, protected]
 

This pointer is used by MWorld to create joints. Assign this to an instance of a joint factory before loading a model from an xml file. If you derive a new type of MJointFactory, you can setup the "official" factory to point to your specialized factory

Definition at line 36 of file MJointFactory.h.

Referenced by factory().


The documentation for this class was generated from the following files:
Generated on Sat Dec 3 10:48:11 2005 for Robotics by  doxygen 1.4.5