This class implements a brute force approach for collision detection. More...
#include <CCollisionBrute.h>

Public Member Functions | |
| cCollisionBrute (cGenericArrayPtr a_entities) | |
| Constructor of cCollisionBrute. More... | |
| virtual | ~cCollisionBrute () |
| Destructor of cCollisionBrute. More... | |
| virtual bool | computeCollision (cGenericObject *a_object, cVector3d &a_segmentPointA, cVector3d &a_segmentPointB, cCollisionRecorder &a_recorder, cCollisionSettings &a_settings) |
| This method computes all collisions between a segment passed as argument and the attributed 3D object. More... | |
Public Member Functions inherited from chai3d::cGenericCollision | |
| cGenericCollision () | |
| Constructor of cGenericCollision. More... | |
| virtual | ~cGenericCollision () |
| Destructor of cGenericCollision. More... | |
| virtual void | update () |
| This methods updates the collision detector and should be called if the 3D model it represents is modified. More... | |
| virtual void | render (cRenderOptions &a_options) |
| This method renders a visual representation of the collision tree. More... | |
| double | getBoundaryRadius () const |
| This method returns the radius of the boundary shell that covers every triangles. More... | |
| void | setDisplayDepth (const int a_depth) |
| This method sets the level of the collision tree to display. More... | |
| double | getDisplayDepth () const |
| This method returns the level inside the collision tree being displayed. (root = 0). More... | |
Protected Attributes | |
| cGenericArrayPtr | m_elements |
| Pointer to the list of elements (points, segments, triangles). More... | |
Protected Attributes inherited from chai3d::cGenericCollision | |
| int | m_displayDepth |
| double | m_radiusAroundElements |
Additional Inherited Members | |
Public Attributes inherited from chai3d::cGenericCollision | |
| cColorf | m_color |
| Color property used to render the collision detector graphically. More... | |
This class implements a brute force approach to check for all intersections between a line segment and an object composedcpoints, segments, or triangles.
| chai3d::cCollisionBrute::cCollisionBrute | ( | cGenericArrayPtr | a_elements | ) |
Constructor of cCollisionBrute.
| a_elements | List of geometry elements. |
|
inlinevirtual |
|
virtual |
This method checks if the given line segment intersects any element of the object. This method is called "brute force" because all elements are checked by invoking their collision-detection methods. This method is simple but very inefficient.
| a_object | Object for which collision detector is being used. |
| a_segmentPointA | Initial point of segment. |
| a_segmentPointB | End point of segment. |
| a_recorder | Recorder which stores all collision events. |
| a_settings | Structure which contains some rules about how the collision detection should be performed. |
Reimplemented from chai3d::cGenericCollision.
|
protected |