In file /home/blah/darwin2k/src/dyno/mechanism/dynoCollision.h:This class performs collision detection and, optionally, intersection calculation for cdBodies and their derived classes.
Inheritance:
Public Fields
-
int currentTriId
- the ID that will be assigned to the next triangle added to the system
-
int numCollisions
- the number of collisions detected in the most recent call to checkCollisions().
-
dynoSelfCollisionLevel checkSelfCollisions
- the desired level of intra-mechanism collision detection
-
int checkMultiLink
- indicates whether any links should be checked for collisions with any other links.
-
int countContactCollisions
- indicates whether the collisions detect as part of contact computations should be counted (added to numCollisions).
-
int createITris
- indicates whether iTris should be created for each object, enabling polyhedra intersections to be computed.
-
ptrList* links
- objects that are part of mechanisms
-
ptrList* obstacles
- all other objects
-
ptrList* objects
- combined list of objects (union of links and obstacles)
-
ptrList* contactPairs
- the list of pairs of objects for which contacts should be computed by computeIntersections()
-
ptrList* checkPairs
- the list of pairs of objects that should be checked for collisions by checkCollisions()
Public Methods
-
dynoCollisionDetector(void)
- constructor
-
~dynoCollisionDetector(void)
- destructor
-
int cleanup(void)
- deallocates memory
-
int checkCollisions(int onlyFirst = 0)
- computes the number of colliding polyhedra.
-
ptrList* computeIntersections(void)
- returns a list of cdObjectIntersections for each pair of intersectin objects, or NULL if no intersections were found
-
cdBody* addLinkModel(link* l, int flags, ptrList* whichParts = NULL, void* userData = NULL)
- adds a cdBody for the specified link.
-
inline int addObstacle(cdPolyhedronObstacle* o)
- adds 'o' to the list of obstacles
-
int removeObject(cdObject* o)
- removes 'o' from the list of objects
-
int createLinkObstaclePairs(void)
- creates the cdPairs for checking links against obstacles.
-
int createPairs(void)
- creates the cdPairs for checking links against obstacles and other links.
-
inline cdPolyhedronObstacle* getObstacle(int i)
- returns the i'th obstacle
-
inline cdObject* getObject(int i)
- returns the i'th object
-
void freeIntersectionList(ptrList* oiList)
- convenience function for freeing the oiList returned by computeIntersections.
Public Fields
-
static int staticClassID
-
int objectID
-
int verboseLevel
Public Methods
-
virtual const char* className(void) const
-
virtual synObject* copy(void) const
-
virtual int isOfType(int typeNum, int derivedOk)
-
static int setStaticClassID(void)
-
virtual 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.
- int currentTriId
- the ID that will be assigned to the next triangle added to the system
- int numCollisions
- the number of collisions detected in the most recent call to
checkCollisions().
- dynoSelfCollisionLevel checkSelfCollisions
- the desired level of intra-mechanism collision detection
- int checkMultiLink
- indicates whether any links should be checked for collisions
with any other links. When 0, only link-obstacle collisions
are checked for.
- int countContactCollisions
- indicates whether the collisions detect as part of contact computations
should be counted (added to numCollisions).
- int createITris
- indicates whether iTris should be created for each object, enabling
polyhedra intersections to be computed.
- ptrList* links
- objects that are part of mechanisms
- ptrList* obstacles
- all other objects
- ptrList* objects
- combined list of objects (union of links and obstacles)
- ptrList* contactPairs
- the list of pairs of objects for which contacts should be computed
by computeIntersections()
- ptrList* checkPairs
- the list of pairs of objects that should be checked for collisions
by checkCollisions()
- dynoCollisionDetector(void)
- constructor
- ~dynoCollisionDetector(void)
- destructor
- int cleanup(void)
- deallocates memory
- int checkCollisions(int onlyFirst = 0)
- computes the number of colliding polyhedra. Returns it and stores
it in numCollisions. Returns -1 on error.
- ptrList* computeIntersections(void)
- returns a list of cdObjectIntersections for each pair of intersectin
objects, or NULL if no intersections were found
- cdBody* 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'.
- inline int addObstacle(cdPolyhedronObstacle* o)
- adds 'o' to the list of obstacles
- int removeObject(cdObject* o)
- removes 'o' from the list of objects
- int createLinkObstaclePairs(void)
- creates the cdPairs for checking links against obstacles.
This method does not normally need to be called by users.
- int createPairs(void)
- creates the cdPairs for checking links against obstacles and other
links. This method does not normally need to be called by users.
- inline cdPolyhedronObstacle* getObstacle(int i)
- returns the i'th obstacle
- inline cdObject* getObject(int i)
- returns the i'th object
- void 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++.