DGKC Control Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Licensing
Collapse ModelsModels
Collapse DG Kernel ControlDG Kernel Control
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Support
Skip Navigation Links Go to ActiveX docs Search Documentation


Collision Path Sample

Collision Path sample demonstrates programming of Path Collision Detection.

See also: IPathCollisionDetector_DG, Collision Sample, Metrics Sample, All samples.

Running the application

The application expects the model to have at least two top level objects. Names of the first and the second objects are displayed on the right hand side of the form. Each object has an associated  Movement defined by an array of frames

When Path check box is on, a red line in 3D shows path of movement of the current object. Turn off Objects check box and turn on Points to see a clearer picture. Path of the second object is not visible by default when the current object has changed to 1 because the second object only rotates around its constant location.

On click of the Animate button the application calculates collision moment and will move along paths defined by the Path group of controls until the collision is reached. If there was no collision, the objects will run full length of the path and will stop at the end.

The top Up Down control in the Current Object group changes between objects in the model. When Static check box is on the objects will not move so its path does not have to be defined.

Path of the current object is defined by an array of frames, which can be edited using the Path group. Size of the array can be increased with the Frame Count control, so a smoother or more complicated movement can be defined. The current frame is rendered in 3D when the "Current Frame" check box is on.

The Quadratic Interpolation option in the Interpolation group makes the path a smooth curve fit into location points, which are origins of frames from the frame array. Turn on Points check box to see the point set.

Reset button restores display to the initial position of the movement after the previous animation.