Klamp't
0.8.1
|
An ODE collision geometry. More...
#include <ODEGeometry.h>
Public Member Functions | |
void | Create (AnyCollisionGeometry3D *geom, dSpaceID space, Vector3 offset=Vector3(0.0), bool useCustomMesh=true) |
void | Clear () |
Deletes the geometry and removes it from the space. | |
void | DrawGL () |
Debugging: draws the points of the trimesh (only works if useCustomMesh=false) | |
void | SetPadding (Real outerMargin) |
Sets the boundary layer thickness for this geometry. | |
Real | GetPadding () |
Returns the boundadry layer thickness for this geometry. | |
AnyCollisionGeometry3D * | SetPaddingWithPreshrink (Real outerMargin, bool inplace=false) |
dGeomID | geom () const |
dTriMeshDataID | triMeshData () const |
ODESurfaceProperties & | surf () |
An ODE collision geometry.
The pointer to the AnyCollisionGeometry3D passed into Create must live throughout the duration of the use of this geometry.
AnyCollisionGeometry3D* ODEGeometry::SetPaddingWithPreshrink | ( | Real | outerMargin, |
bool | inplace = false |
||
) |
Sets the boundary layer thickness AND shrinks the original geometry. May lead to closer contact behavior to the original mesh. If inplace is set to true, then the original geometry is actually modified (this may help verify whether the geometry was shrunk correctly)
Note: does not work with point clouds (never) or geometric primitives (not at the moment, but may be supported in the future). Interpenetrating meshes may be created because a relatively naive method is used to shrink the geometry. Do this only with small margins or else you risk creating artifacts (a good rule of thumb is no smaller than half the width of your smallest triangle)
Note: destroys the collisionGeometry pointer and rebuilds the geometry.
Returns the new geometry.