Main Page | Modules | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

CDLInterface Class Reference

#include <CDLInterface.hh>

Inherits Singleton< CDLInterface >.

List of all members.


Detailed Description

Interface class for all CDL functionality.

The CDLInterface class is the entry point to all functionality in the CDL. It includes methods for reading creature files, querying active simulation objects, modifying simulation functions, and a host of other tools.


Public Member Functions

bool readCreature (const char *filename)
ObjectfindObject (const char *name)
ObjectfindObject (const DeObject *obj)
JointfindJoint (const char *name)
JointfindJoint (const DeJointDOF1 *joint)
SurfacefindSurface (const char *name)
void add (Object *o)
void add (Joint *j)
void add (Surface *s)
void add (DeBaseNode *n)
DeWorld * getWorld (void)
DeTime updateStep (void)
DeTime displayStep (void)
DeTime integrationStep (void)
DeTime collisionStep (void)
DeTime backupLimit (void)
double geomError (void)
void updateStep (DeTime step)
void displayStep (DeTime step)
void integrationStep (DeTime step)
void collisionStep (DeTime step)
void backupLimit (DeTime step)
void geomError (double error)
DeTime simTime (void)
bool startSimulation (void)
bool updateSimulation (void)
void gravity (DeFloat x, DeFloat y, DeFloat z)
char * uniqueId (const char *prefix)
bool addFunction (CDLFunction *)
bool addVariable (const char *, double)
bool addVariable (const char *, const char *)
CDLFunctiongetFunction (const char *)
CDLVariable * getVariable (const char *)
bool destroyLists (void)
void pushObject (Object *)
ObjectpopObject (void)
void pushFunction (CDLFunction *)
CDLFunctionpopFunction (void)
ObjectstackObject (void)
CDLFunctionstackFunction (void)
bool addConstraint (Constraint *)

Public Attributes

ObjectlookObject
ObjectcameraObject
DeVector3 cameraPosition
FILE * outputFile
bool render
DeTime rendertime
char renderName [128]


Member Function Documentation

bool CDLInterface::addFunction CDLFunction  ) 
 

This method is normally called automatically by a CDLFunction object from within its constructor. It is, however, possible, to define additional functions from outside the SimLib source, and add them here.

bool CDLInterface::addVariable const char *  ,
const char * 
 

This method is used by the CDL to setup an active variable when parsing a variable file.

bool CDLInterface::addVariable const char *  ,
double 
 

This method is used by the CDL to setup an active variable when parsing a variable file.

bool CDLInterface::destroyLists void   ) 
 

This method is for internal use only, as it cleans up the items pointed at within the linked lists stored in private memory.

CDLFunction* CDLInterface::getFunction const char *   ) 
 

This method returns a pointer to the function whose name is supplied. It returns 0 on failure.

CDLVariable* CDLInterface::getVariable const char *   ) 
 

This method returns a pointer to the function whose name is supplied. It returns 0 on failure.

void CDLInterface::pushObject Object  ) 
 

These methods are used when reading CDL files to maintain stack-like memories of parent objects and function calls.

Object* CDLInterface::stackObject void   ) 
 

These methods return the top of each of the stacks

bool CDLInterface::startSimulation void   ) 
 

This method will initialize a world for the simulation, and set up all necessary constructs.

char* CDLInterface::uniqueId const char *  prefix  )  [inline]
 

This method returns a unique identifier, prefixed by the specified string. It internally allocates memory for the returned string.

bool CDLInterface::updateSimulation void   ) 
 

This method updates the active simulation by the rate described by updateStep. Note that this may be different from integrationStep, which is the internal rate of the simulation;


SimLib Reference Documentation