While mesh objects are incredibly versatile, the amount of computation required for performing collision detection between the tool and the object can become substantial when the number of polygons becomes large. To address this problem CHAI3D offers a selection of primitives that can be used to model simple shapes such as spheres, cylinders, boxes, etc... Instead of computing collisions with large sets of triangles, implicit models are used to quickly compute if a tool is located inside or outside of the shape. By combining these models with haptic effects we can substantially reduce the amount of computation necessary to compute interactive force between the haptic device and the environment.
The following example illustrates how to create a box object and assign a surface haptic effect.
The following example illustrates how to create a sphere object and assign a surface haptic effect.
The following example illustrates how to create a cylinder object and assign a surface haptic effect.
The following example illustrates how to create a torus object and assign a surface haptic effect.
The following example illustrates how to create a line object and assign a magnetic haptic effect.