In file /home/blah/darwin2k/src/d2k/terrain/terrain.h:

class terrainModel

Class for managing terrain and locomotor module objects.

Inheritance:


Public Fields

[more]dynoContactor* dc
The dynoContactor being used for computing contacts
[more]terrainMaterial* defaultSoil
default soil material
[more]terrainMaterial* defaultRock
default rock material
[more]double tol
Tolerance used by dc
[more]char terrainFilename[200]
The filename containing terrain polyhedra
[more]ptrList terrainRecs
A list of objects that are part of the terrain
[more]int checkLinkCollisions
Indicates whether DYNO_CHECK_LINK_COLLISIONS should be set when adding locomotorModules to dynoContactor.

Public Methods

[more]int addTerrainFromFile(const char* fname, terrainMaterial* m = NULL)
Reads terrain objects from a file, in the format used by daReadObstacles()
[more]int addTerrainShape(mpoly* mp, double muS, double muD, terrainMaterial* m = NULL)
Adds an mpoly to the terrain
[more]int removeTerrainShape(mpoly* mp)
Removes an mpoly from the terrain
[more]int clearTerrain(void)
Removes all terrain objects
[more]inline cdPolyhedronObstacle* getTerrainObj(int i)
Returns the cdPolyhedonObstacle corresponding to the i'th terrain object
[more]inline cdRecord* getTerrainRec(int i)
Returns the cdRecord for the i'th terrain object


Inherited from d2kComponent:

Public Fields

od2kSimulator* sim
oconfiguration* cfg
oconst char* label
oint active

Public Methods

ovirtual int minCfgs(void) const
ovirtual int maxCfgs(void) const
ovirtual const char* getCfgName(int i)
ovirtual int readParams(paramParser* parser)
ovirtual int setVariables(const ptrList* taskParamRecs)
ovirtual int simInit(d2kSimulator* Sim)
ovirtual int init(ptrList* Cfgs)
ovirtual int forceCfgResolution(void)
ovirtual int cleanup(void)
ovirtual int update(int &violated)
ovirtual const cfgLabelRecord* getLabelRec(int i) const


Inherited from synObject:

Public Fields

ostatic int staticClassID
oint objectID
oint verboseLevel

Public Methods

ovirtual const char* className(void) const
ovirtual synObject* copy(void) const
ovirtual int isOfType(int typeNum, int derivedOk)
ostatic int setStaticClassID(void)
ovirtual int classID(void) const


Documentation

Class for managing terrain and locomotor module objects. The terrain model adds both terrain objects and locomotor module objects to a dynoContactor. locomotor modules have special callback functions for creating and updating contact influences and constraints, some of which depend on terrain properties. Thus, the terrain model also serves as a repository for terrain-specific information such as soil mechanical properties. The terrainGenerator only adds locomotor modules to the dynoContactor that computes contacts, via toolModule::addContactInfo. For more general-purpose collision checking and contact simulation, the collisionDetector class can be used.

odynoContactor* dc
The dynoContactor being used for computing contacts

oterrainMaterial* defaultSoil
default soil material

oterrainMaterial* defaultRock
default rock material

odouble tol
Tolerance used by dc

ochar terrainFilename[200]
The filename containing terrain polyhedra

optrList terrainRecs
A list of objects that are part of the terrain

oint checkLinkCollisions
Indicates whether DYNO_CHECK_LINK_COLLISIONS should be set when adding locomotorModules to dynoContactor. This is only used if there is no collisionDetector among the d2kSimulator's list of d2kComponents.

oint addTerrainFromFile(const char* fname, terrainMaterial* m = NULL)
Reads terrain objects from a file, in the format used by daReadObstacles()

oint addTerrainShape(mpoly* mp, double muS, double muD, terrainMaterial* m = NULL)
Adds an mpoly to the terrain

oint removeTerrainShape(mpoly* mp)
Removes an mpoly from the terrain

oint clearTerrain(void)
Removes all terrain objects

oinline cdPolyhedronObstacle* getTerrainObj(int i)
Returns the cdPolyhedonObstacle corresponding to the i'th terrain object

oinline cdRecord* getTerrainRec(int i)
Returns the cdRecord for the i'th terrain object


This class has no child classes.
See Also:
collisionDetector
dynoContactor
locomotion.h

Alphabetic index HTML hierarchy of classes or Java



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