|  | overview |  | wiki |  | api reference |  | download

- Main Page
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Functions Variables Typedefs Enumerations Enumerator
Public Member Functions
gameplay::PhysicsController::HitFilter Class Reference

`#include <PhysicsController.h>`

List of all members.

## Public Member Functions

| HitFilter ()
virtual | ~HitFilter ()
virtual bool | filter (PhysicsCollisionObject *object)
virtual bool | hit (const HitResult &result)

## Detailed Description

Class that can be overridden to provide custom hit test filters for ray and sweep tests.

The default implementation of this class returns only the closest object that intersects a ray of volume.

## Constructor & Destructor Documentation

gameplay::PhysicsController::HitFilter::HitFilter | ( |  | ) |

Constructor.

virtual gameplay::PhysicsController::HitFilter::~HitFilter | ( |  | ) | `[virtual]`

Virtual destructor.

## Member Function Documentation

virtual bool gameplay::PhysicsController::HitFilter::filter | ( | PhysicsCollisionObject * | object | ) | `[virtual]`

Called before performing a hit test with an object to determine whether or not the object should be tested.

Parameters:

  object | Object to be queried.

Returns:
  True if the object should be filtered out, or false to include the object in the test (default).

virtual bool gameplay::PhysicsController::HitFilter::hit | ( | const HitResult & | result | ) | `[virtual]`

Called when a ray or sweep test collides with a collision object.

Each collision object that is hit during the ray or sweep test is passed to this method, along with details of the hit result. Returning true to this method will continue with normal hit test processing, where only closer objects are returned. Returning false results in this method being called for all objects that intersect the ray or volume.

Parameters:

  result | HitResult object containing information about the hit.

Returns:
  True (default) to continue with default behavior where closer objects are processed, false to process all intersecting objects.

All Classes Functions Variables Typedefs Enumerations Enumerator