# cCollisionBrute Class Reference
[Collision Detection]

cCollisionBrute provides methods to check for the intersection of a line segment with a mesh by checking all triangles in the mesh. More...

`#include <CCollisionBrute.h>`

Inheritance diagram for cCollisionBrute:

[legend]

List of all members.

## Public Member Functions
| cCollisionBrute (vector< cTriangle > *a_triangles)
| Constructor of cCollisionBrute.
virtual | ~cCollisionBrute ()
| Destructor of cCollisionBrute.
virtual void | initialize (double a_radius=0)
| No initialization is necessary for the brute force method.
virtual void | render ()
| There isn't really a useful "visualization" of "check all triangles".
bool | computeCollision (cVector3d &a_segmentPointA, cVector3d &a_segmentPointB, cCollisionRecorder &a_recorder, cCollisionSettings &a_settings)
| Return the triangles intersected by the given segment, if any.
## Protected Attributes
vector< cTriangle > * | m_triangles
| Pointer to the list of triangles in the mesh.

## Detailed Description

cCollisionBrute provides methods to check for the intersection of a line segment with a mesh by checking all triangles in the mesh.

## Member Function Documentation

bool cCollisionBrute::computeCollision | ( | cVector3d & | a_segmentPointA,
|  | cVector3d & | a_segmentPointB,
|  | cCollisionRecorder & | a_recorder,
|  | cCollisionSettings & | a_settings |
| ) |  |  | `[virtual]`

Return the triangles intersected by the given segment, if any.

Check if the given line segment intersects any triangle of the mesh. This method is called "brute force" because all triangles are checked by invoking their collision-detection methods. This method is simple but very inefficient.

Parameters:

  | a_segmentPointA | Initial point of segment.
  | a_segmentPointB | End point of segment.
  | a_recorder | Returns pointer to nearest collided object.
  | a_settings | Structure which contains some rules about how the collision detection should be performed.

Returns:
  Return true if the line segment intersects one or more triangles.

Reimplemented from cGenericCollision.

The documentation for this class was generated from the following files:

- D:/CHAI3D/build-2-0-0/2.0.0/win32/src/collisions/CCollisionBrute.h
- D:/CHAI3D/build-2-0-0/2.0.0/win32/src/collisions/CCollisionBrute.cpp

CHAI3D 2.0.0 documentation
Please address any questions to support@chai3d.org
(C) 2003-2009 - CHAI 3D
All Rights Reserved.