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

class dynoCollisionDetector

This class performs collision detection and, optionally, intersection calculation for cdBodies and their derived classes.

Inheritance:


Public Fields

[more]int currentTriId
the ID that will be assigned to the next triangle added to the system
[more]int numCollisions
the number of collisions detected in the most recent call to checkCollisions().
[more]dynoSelfCollisionLevel checkSelfCollisions
the desired level of intra-mechanism collision detection
[more]int checkMultiLink
indicates whether any links should be checked for collisions with any other links.
[more]int countContactCollisions
indicates whether the collisions detect as part of contact computations should be counted (added to numCollisions).
[more]int createITris
indicates whether iTris should be created for each object, enabling polyhedra intersections to be computed.
[more]ptrList* links
objects that are part of mechanisms
[more]ptrList* obstacles
all other objects
[more]ptrList* objects
combined list of objects (union of links and obstacles)
[more]ptrList* contactPairs
the list of pairs of objects for which contacts should be computed by computeIntersections()
[more]ptrList* checkPairs
the list of pairs of objects that should be checked for collisions by checkCollisions()

Public Methods

[more] dynoCollisionDetector(void)
constructor
[more] ~dynoCollisionDetector(void)
destructor
[more]int cleanup(void)
deallocates memory
[more]int checkCollisions(int onlyFirst = 0)
computes the number of colliding polyhedra.
[more]ptrList* computeIntersections(void)
returns a list of cdObjectIntersections for each pair of intersectin objects, or NULL if no intersections were found
[more]cdBody* addLinkModel(link* l, int flags, ptrList* whichParts = NULL, void* userData = NULL)
adds a cdBody for the specified link.
[more]inline int addObstacle(cdPolyhedronObstacle* o)
adds 'o' to the list of obstacles
[more]int removeObject(cdObject* o)
removes 'o' from the list of objects
[more]int createLinkObstaclePairs(void)
creates the cdPairs for checking links against obstacles.
[more]int createPairs(void)
creates the cdPairs for checking links against obstacles and other links.
[more]inline cdPolyhedronObstacle* getObstacle(int i)
returns the i'th obstacle
[more]inline cdObject* getObject(int i)
returns the i'th object
[more]void freeIntersectionList(ptrList* oiList)
convenience function for freeing the oiList returned by computeIntersections.


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

This class performs collision detection and, optionally, intersection calculation for cdBodies and their derived classes. The main use of of this class within Dyno is to detect contacts between objects so that contact forces can be computed by a dynoContactor. Users can also use it for more general collision detection needs.
oint currentTriId
the ID that will be assigned to the next triangle added to the system

oint numCollisions
the number of collisions detected in the most recent call to checkCollisions().

odynoSelfCollisionLevel checkSelfCollisions
the desired level of intra-mechanism collision detection

oint checkMultiLink
indicates whether any links should be checked for collisions with any other links. When 0, only link-obstacle collisions are checked for.

oint countContactCollisions
indicates whether the collisions detect as part of contact computations should be counted (added to numCollisions).

oint createITris
indicates whether iTris should be created for each object, enabling polyhedra intersections to be computed.

optrList* links
objects that are part of mechanisms

optrList* obstacles
all other objects

optrList* objects
combined list of objects (union of links and obstacles)

optrList* contactPairs
the list of pairs of objects for which contacts should be computed by computeIntersections()

optrList* checkPairs
the list of pairs of objects that should be checked for collisions by checkCollisions()

o dynoCollisionDetector(void)
constructor

o ~dynoCollisionDetector(void)
destructor

oint cleanup(void)
deallocates memory

oint checkCollisions(int onlyFirst = 0)
computes the number of colliding polyhedra. Returns it and stores it in numCollisions. Returns -1 on error.

optrList* computeIntersections(void)
returns a list of cdObjectIntersections for each pair of intersectin objects, or NULL if no intersections were found

ocdBody* addLinkModel(link* l, int flags, ptrList* whichParts = NULL, void* userData = NULL)
adds a cdBody for the specified link. The cdBody is returned for the caller's reference, but will be freed by the dynoCollisionDetector when it is deleted. If whichParts is non-NULL, then any of l's mpolys that are do not belong to a part in whichParts will be ignored when creating collision detection models. This is useful when, for example, wheel-terrain contacts are being computed and parts of the wheel link that are not on the rim of the wheel should be ignored. 'flags' indicates what collision/contact operations are desired; see dynoCollisionOperation for definitions of the values that can be bitwise or'd for 'flags'.

oinline int addObstacle(cdPolyhedronObstacle* o)
adds 'o' to the list of obstacles

oint removeObject(cdObject* o)
removes 'o' from the list of objects

oint createLinkObstaclePairs(void)
creates the cdPairs for checking links against obstacles. This method does not normally need to be called by users.

oint createPairs(void)
creates the cdPairs for checking links against obstacles and other links. This method does not normally need to be called by users.

oinline cdPolyhedronObstacle* getObstacle(int i)
returns the i'th obstacle

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

ovoid freeIntersectionList(ptrList* oiList)
convenience function for freeing the oiList returned by computeIntersections.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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