## Public API Reference

- Main Page
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# iPcCollisionDetection Struct Reference

This property class controls collision detection of an entity with the world map and other meshes. More...

`#include <propclass/colldet.h>`

List of all members.

## Public Member Functions

virtual bool | AdjustForCollisions (csVector3 &oldpos, csVector3 &newpos, csVector3 &vel, float delta, iMovable *movable)=0
| This function takes a position vector, checks against all known colliders, and returns the adjusted position in the same variable.
virtual bool | Init (const csVector3 &body, const csVector3 &legs, const csVector3 &shift)=0
| Initialize CD box for the object.
virtual bool | IsOnGround () const =0
| Check if mesh is on ground.
virtual void | SetOnGround (bool flag)=0
| Set on Ground flag.

## Detailed Description

This property class controls collision detection of an entity with the world map and other meshes.

It should be used in combination with iPcLinearMovement but otherwise doesn't depend on any other property classes. So in that sense it is unrelated to the other movement property classes.

Definition at line 43 of file colldet.h.

## Member Function Documentation

virtual bool iPcCollisionDetection::AdjustForCollisions | ( | csVector3 & | oldpos,
|  | csVector3 & | newpos,
|  | csVector3 & | vel,
|  | float | delta,
|  | iMovable * | movable
| ) | `[pure virtual]`

| This function takes a position vector, checks against all known colliders, and returns the adjusted position in the same variable.

virtual bool iPcCollisionDetection::Init | ( | const csVector3 & | body,
|  | const csVector3 & | legs,
|  | const csVector3 & | shift
| ) | `[pure virtual]`

| Initialize CD box for the object. The two parameters are the dimensions of the body and the legs collider boxes. The 'shift' vector is used to shift the box. By default (with shift equal to the 0 vector) the colliders are created assuming the 0,0,0 origin is at the bottom center of the actor.

virtual bool iPcCollisionDetection::IsOnGround | ( |  | ) | const`[pure virtual]`

| Check if mesh is on ground.

virtual void iPcCollisionDetection::SetOnGround | ( | bool | flag | ) | `[pure virtual]`

| Set on Ground flag.

The documentation for this struct was generated from the following file:

- propclass/colldet.h