In file /home/blah/darwin2k/src/dyno/mechanism/dyno.h:

class dynamicSystem

container class for multiple mechanisms, influences, and other simulation objects.

Public Fields

[more]int stateSize
the state size for all mechanisms in the system
[more]int numDOFs
the number of degrees of freedom for all mechanisms in the system
[more]int verboseLevel
indicates the desired level of debugging output
[more]int ticksPerSecond
the number of clock ticks per second for dynoTimers.
[more]ptrList mechs
a list of all mechanisms in the system
[more]ptrList parentMechs
a list of parent mechanisms in the system
[more]ptrList objects
a list of all objects in the system

Public Methods

[more] dynamicSystem(void)
constructor
[more]virtual ~dynamicSystem(void)
destructor
[more]int readParams(paramParser* p)
reads parameters from the current context of a paramParser.
[more]int reset(void)
resets all state, including current time
[more]inline int setMode(systemMode newMode)
sets the simulation mode to KINEMATIC or DYNAMIC.
[more]inline int getMode(void)
returns the current simulation mode
[more]inline int useDynamics(void)
returns 1 if dynamic simluation is being used, and 0 otherwise
[more]int addMechanism(mechanism* mech)
adds a mechanism to the system.
[more]int removeMechanism(mechanism* mech)
removes a mechanism from the system
[more]int addObject(dynoObject* obj)
adds a dynoObject to the system.
[more]int deleteObject(dynoObject* obj)
removes the object from the system and deletes it
[more]int getState(double* state)
copies the position and velocity of all mechanisms into 'state'
[more]int setState(const double* state)
sets the position and velocity of all mechanisms from 'state'
[more]int getState(vector &state)
saves the state (position and velocity) of all mechanisms into 'state', resizing it if necessary to stateSize
[more]int setState(const vector &state)
sets the state of all mechanisms from the supplied state vector, returning 0 if 'state' was the wrong size or if an error occurred
[more]inline double currentTime(void)
returns the current simulation time
[more]double stepForward(double dt, int* error = NULL)
integrates the motion of all mechanisms for the indicated time period.
[more]inline dynoSolver* getSolver(void) const
retuns the dynoSolver used for state integration
[more]inline int numMechs(void) const
returns the number of mechanisms
[more]inline int numParents(void) const
returns the number of parent mechanisms
[more]inline int numObjects(void) const
returns the number of objects
[more]inline mechanism* getMech(int i)
returns the i'th mechanism
[more]inline mechanism* getParent(int i)
returns the i'th parent mechanism
[more]inline dynoObject* getObject(int i)
returns the i'th object
[more]dynoObject* getObjectByClassID(int classID, int derivedOk = 1)
returns the first dynoObject having the given classID, or if derivedOk = 1 having the classID of a subclass.
[more]int getObjectsByClassID(int classID, ptrList* l, int derivedOk = 1)
adds all dynoObjects having the given classID (or classID of a derived class, if derivedOk is 1) to l.

Public Members

[more]enum systemMode
indicates whether kinematic or dynamic simulation is used.
[more]#define getDynoObjectByType(ds, classname, derivedOk)
A cover for getDynoObjectByClassID that uses the classID for the supplied class name and typecasts the returned result.
[more]#define getDynoObjectsByType(classname, l, derivedOk)
A cover for getDynoObjectsByClassID that uses the classID for the supplied class name.

Protected Methods

[more]inline int numInfluences(void) const
returns the number of influences
[more]inline int numTimers(void) const
returns the number of timers
[more]inline int numLimiters(void) const
returns the number of limiters
[more]inline int numComponents(void) const
returns the number of dynoComponents
[more]inline dynoInfluence* getInfluence(int i)
returns the i'th influence
[more]inline dynoTimer* getTimer(int i)
returns the i'th timer
[more]inline dynoLimiter* getLimiter(int i)
returns the i'th limiter
[more]dynoComponent* getComponent(int i)
returns the i'th component
[more]int addConstraint(constraint* c)
adds a constraint to the system.
[more]int deleteConstraint(constraint* c)
removes a constraint from the system and deletes it
[more]int addInfluence(dynoInfluence* inf)
Adds an influence to the system.
[more]int deleteInfluence(dynoInfluence* inf)
removes the indicated influence from system and deletes it
[more]int addLimiter(dynoLimiter* lim)
adds a limiter to the system.
[more]int deleteLimiter(dynoLimiter* lim)
removes the indicated limiter from system and deletes it
[more]int addTimer(dynoTimer* timer)
adds a timer to the system.
[more]int deleteTimer(dynoTimer* timer)
removes the indicated timer from system and deletes it
[more]int addComponent(dynoComponent* comp)
adds a dynoComponent to the system.
[more]int deleteComponent(dynoComponent* comp)
removes the indicated component from system and deletes it


Documentation

container class for multiple mechanisms, influences, and other simulation objects.

Use addMechanism and removeMechanism to add and remove mechanisms from the system.

dynoConstraints, dynoInfluences, dynoComponents, dynoTimers, and dynoLimiters can be added to the system with addInfluence(), etc. To temporarily deactivate them, set their 'active' member to 0, rather than using deleteInfluence() et al, which deallocates the objects.

At some point, these interfaces may be made more consistent, but for the time being they're being kept separate.

oenum systemMode
indicates whether kinematic or dynamic simulation is used.

oint stateSize
the state size for all mechanisms in the system

oint numDOFs
the number of degrees of freedom for all mechanisms in the system

oint verboseLevel
indicates the desired level of debugging output

oint ticksPerSecond
the number of clock ticks per second for dynoTimers. This is the resolution used for scheduling timer updates.

optrList mechs
a list of all mechanisms in the system

optrList parentMechs
a list of parent mechanisms in the system

optrList objects
a list of all objects in the system

o dynamicSystem(void)
constructor

ovirtual ~dynamicSystem(void)
destructor

oint readParams(paramParser* p)
reads parameters from the current context of a paramParser. The variables read by the dynamicSystem are: All of these variables are optional and have reasonable default values.

oint reset(void)
resets all state, including current time

oinline int setMode(systemMode newMode)
sets the simulation mode to KINEMATIC or DYNAMIC. in KINEMATIC simulation, each mechanism's acceleration vector can be set arbitrarily, while in DYNAMIC simulation the mechanism's acceleration is computed from the forces applied to the mechanism.

oinline int getMode(void)
returns the current simulation mode

oinline int useDynamics(void)
returns 1 if dynamic simluation is being used, and 0 otherwise

oint addMechanism(mechanism* mech)
adds a mechanism to the system. The mechanism will be deleted by the system if it is not removed before the system is deleted.

oint removeMechanism(mechanism* mech)
removes a mechanism from the system

oint addObject(dynoObject* obj)
adds a dynoObject to the system. The object will be deleted by the dynamicSystem by ~dynamicSystem if it has not been deleted by deleteObject(). To temporarily disable an object without deleting it, set the object's active member to zero.

oint deleteObject(dynoObject* obj)
removes the object from the system and deletes it

oint getState(double* state)
copies the position and velocity of all mechanisms into 'state'

oint setState(const double* state)
sets the position and velocity of all mechanisms from 'state'

oint getState(vector &state)
saves the state (position and velocity) of all mechanisms into 'state', resizing it if necessary to stateSize

oint setState(const vector &state)
sets the state of all mechanisms from the supplied state vector, returning 0 if 'state' was the wrong size or if an error occurred

oinline double currentTime(void)
returns the current simulation time

odouble stepForward(double dt, int* error = NULL)
integrates the motion of all mechanisms for the indicated time period. returns the actual amount of time stepped forward, which is usually equal to the requested time. if error is non-NULL, it will be set to a non-zero value if any errors are detected.

oinline dynoSolver* getSolver(void) const
retuns the dynoSolver used for state integration

oinline int numMechs(void) const
returns the number of mechanisms

oinline int numParents(void) const
returns the number of parent mechanisms

oinline int numObjects(void) const
returns the number of objects

oinline mechanism* getMech(int i)
returns the i'th mechanism

oinline mechanism* getParent(int i)
returns the i'th parent mechanism

oinline dynoObject* getObject(int i)
returns the i'th object

odynoObject* getObjectByClassID(int classID, int derivedOk = 1)
returns the first dynoObject having the given classID, or if derivedOk = 1 having the classID of a subclass.

oint getObjectsByClassID(int classID, ptrList* l, int derivedOk = 1)
adds all dynoObjects having the given classID (or classID of a derived class, if derivedOk is 1) to l. Returns 1 if any matching dynoObjects were found, or 0 otherwise.

o#define getDynoObjectByType(ds, classname, derivedOk)
A cover for getDynoObjectByClassID that uses the classID for the supplied class name and typecasts the returned result.

o#define getDynoObjectsByType(classname, l, derivedOk)
A cover for getDynoObjectsByClassID that uses the classID for the supplied class name.

oinline int numInfluences(void) const
returns the number of influences

oinline int numTimers(void) const
returns the number of timers

oinline int numLimiters(void) const
returns the number of limiters

oinline int numComponents(void) const
returns the number of dynoComponents

oinline dynoInfluence* getInfluence(int i)
returns the i'th influence

oinline dynoTimer* getTimer(int i)
returns the i'th timer

oinline dynoLimiter* getLimiter(int i)
returns the i'th limiter

odynoComponent* getComponent(int i)
returns the i'th component

oint addConstraint(constraint* c)
adds a constraint to the system. The constraint will be deleted by the system if it is not removed before the system is deleted.

oint deleteConstraint(constraint* c)
removes a constraint from the system and deletes it

oint addInfluence(dynoInfluence* inf)
Adds an influence to the system. The influence will be deleted by the system if it is not removed before the system is deleted.

oint deleteInfluence(dynoInfluence* inf)
removes the indicated influence from system and deletes it

oint addLimiter(dynoLimiter* lim)
adds a limiter to the system. The limiter will be deleted by the system if it is not removed before the system is deleted.

oint deleteLimiter(dynoLimiter* lim)
removes the indicated limiter from system and deletes it

oint addTimer(dynoTimer* timer)
adds a timer to the system. The timer will be deleted by the system if it is not removed before the system is deleted.

oint deleteTimer(dynoTimer* timer)
removes the indicated timer from system and deletes it

oint addComponent(dynoComponent* comp)
adds a dynoComponent to the system. The dynoComponent will be deleted by the system if it is not removed before the system is deleted.

oint deleteComponent(dynoComponent* comp)
removes the indicated component from system and deletes it


This class has no child classes.
Friends:
dynoSolver
mechanism
constraint
dynoInfluence
dynoObject
dynoTimer
dynoLimiter
dynoComponent
constraintSolver

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.