ContactGeometry Class Reference
A ContactGeometry object describes the physical shape of a body.
More...
#include <ContactGeometry.h>
List of all members.
Detailed Description
A ContactGeometry object describes the physical shape of a body.
It is used with GeneralContactSubsystem for doing collision detection and contact modeling.
Constructor & Destructor Documentation
Member Function Documentation
Vec3 findNearestPoint |
( |
const Vec3 & |
position, |
|
|
bool & |
inside, |
|
|
UnitVec3 & |
normal | |
|
) |
| | const |
Given a point, find the nearest point on the surface of this object.
If multiple points on the surface are equally close to the specified point, this may return any of them.
- Parameters:
-
| position | the point in question |
| inside | on exit, this is set to true if the specified point is inside this object, false otherwise |
| normal | on exit, this contains the surface normal at the returned point |
- Returns:
- the point on the surface of the object which is closest to the specified point
Reimplemented in TriangleMesh.
void getBoundingSphere |
( |
Vec3 & |
center, |
|
|
Real & |
radius | |
|
) |
| | const |
Get a bounding sphere which completely encloses this object.
- Parameters:
-
| center | on exit, this contains the location of the center of the bounding sphere |
| radius | on exit, this contains the radius of the bounding sphere |
const std::string& getType |
( |
|
) |
const |
Get a string which uniquely identifies the type of geometry this object represents.
Typically each subclass of ContactGeometry defines its own value.
ContactGeometryTypeId getTypeId |
( |
|
) |
const |
int getTypeIndex |
( |
|
) |
const |
Get an integer which uniquely identifies the type of geometry this object represents.
A unique index is generated automatically for each unique type value as returned by getType().
bool hasImpl |
( |
|
) |
const [inline] |
bool intersectsRay |
( |
const Vec3 & |
origin, |
|
|
const UnitVec3 & |
direction, |
|
|
Real & |
distance, |
|
|
UnitVec3 & |
normal | |
|
) |
| | const |
Determine whether this object intersects a ray, and if so, find the intersection point.
- Parameters:
-
| origin | the position at which the ray begins |
| direction | the ray direction |
| distance | if an intersection is found, the distance from the ray origin to the intersection point is stored in this. Otherwise, it is left unchanged. |
| normal | if an intersection is found, the surface normal of the intersection point is stored in this. Otherwise, it is left unchanged. |
- Returns:
- true if an intersection is found, false otherwise
Reimplemented in TriangleMesh.
bool isEmptyHandle |
( |
|
) |
const |
bool isOwnerHandle |
( |
|
) |
const |
Copy assignment makes a deep copy.
Member Data Documentation
The documentation for this class was generated from the following file: