Hole Geometries

To create a hollow shape, Vortex® supports three special kinds of shape geometries: sphere holes, cylinder holes, and box holes.

These hole geometries are placed inside their regular (non-hole) counterparts to create an arbitrary hollow volume.

To set up a hollow shape, you need to create a Vx::VxCompositeCollisionGeometry and then add the hole geometry and the larger geometry that will contain it like so:

Vx::VxBox* cgbox = new Vx::VxBox(4.0, 4.0, 4.0);
Vx::VxBoxHole* cgboxhole = new Vx::VxBoxHole(1.0, 1.0, 1.0);

VxCompositeCollisionGeometry* cgcomposite = new VxCompositeCollisionGeometry();

In order to produce the correct behaviour of a hollow structure created by using a hole within a collision geometry and avoid unrealistic behaviour, follow these guidelines:

In order to help with face alignment, a call to Vx::VxCompositeCollisionGeometry::snapHoleSurfaces() helps positioning, orienting and dimensioning the hole volume so that its surface gets perfectly aligned with the nearest surface on the containing volume:


The flat faces in the box and cylinder holes may be turned off. A removed face should be aligned with a face of the collision geometry in which the hole is contained. All non-removed surface should be well within the primitive volume to minimize interference between contacts on the primitives and holes. Collision detection robustness will be affected by thin surfaces between primitives and holes as well as usage of soft contact material allowing deep volume interpenetration.

Collision detection inside a hole is only supported for the primitive volumes for and not for triangle meshes (non-primitives). However, holes in triangle meshes can be explicitly modeled via the mesh triangulation (by a 3D modeler).