iTerrainCollider Struct Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

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

Public Member Functions
iTerrainCollider Struct Reference

Provides an interface for custom collision. More...

`#include <imesh/terrain2.h>`

Inheritance diagram for iTerrainCollider:

List of all members.

## Public Member Functions
virtual bool | Collide (iTerrainCell *cell, iCollider *collider, float radius, const csReversibleTransform &trans, bool oneHit, iTerrainCollisionPairArray *pairs)=0
| Collide collider with cell.
virtual bool | CollideSegment (iTerrainCell *cell, const csVector3 &start, const csVector3 &end, bool oneHit, iTerrainVector3Array *points)=0
| Collide segment with cell.
virtual bool | CollideSegment (iTerrainCell *cell, const csVector3 &start, const csVector3 &end, csVector3 &hitPoint)=0
| Collide segment with cell.
virtual csTerrainColliderCollideSegmentResult | CollideSegment (iTerrainCell *cell, const csVector3 &start, const csVector3 &end)=0
| Collide segment with cell.
virtual bool | CollideTriangles (iTerrainCell *cell, const csVector3 *vertices, size_t tri_count, const unsigned int *indices, float radius, const csReversibleTransform &trans, bool oneHit, iTerrainCollisionPairArray *pairs)=0
| Collide set of triangles with cell.
virtual csPtr < iTerrainCellCollisionProperties > | CreateProperties ()=0
| Create an object that implements iTerrainCellCollisionProperties This object will be stored in the cell.

## Detailed Description

Provides an interface for custom collision.

Definition at line 354 of file terrain2.h.

## Member Function Documentation

virtual bool iTerrainCollider::Collide | ( | iTerrainCell * | cell,
|  | iCollider * | collider,
|  | float | radius,
|  | const csReversibleTransform & | trans,
|  | bool | oneHit,
|  | iTerrainCollisionPairArray * | pairs
| ) |  | `[pure virtual]`

Collide collider with cell.

Parameters:

  cell | cell
  collider | collider
  radius | radius of the bounding sphere surrounding the given set of triangles (used for fast rejection)
  trans | triangle set transformation (vertices' coordinates are specified in the space defined by this transformation)
  oneHit | if this is true, than stop on finding the first collision pair; otherwise, detect all collisions
  points | destination collision pair array

Returns:
  true if there were any collisions, false if there were none

virtual bool iTerrainCollider::CollideSegment | ( | iTerrainCell * | cell,
|  | const csVector3 & | start,
|  | const csVector3 & | end,
|  | bool | oneHit,
|  | iTerrainVector3Array * | points
| ) |  | `[pure virtual]`

Collide segment with cell.

Parameters:

  cell | cell
  start | segment start (specified in object space)
  end | segment end (specified in object space)
  oneHit | if this is true, than stop on finding the first intersection point (the closest to the segment start); otherwise, detect all intersections
  points | destination point array

Returns:
  true if there were any intersections, false if there were none

virtual bool iTerrainCollider::CollideSegment | ( | iTerrainCell * | cell,
|  | const csVector3 & | start,
|  | const csVector3 & | end,
|  | csVector3 & | hitPoint
| ) |  | `[pure virtual]`

Collide segment with cell.

Stops on finding the first intersection point (the closest to the segment start).

Parameters:

  cell | cell
  start | segment start (specified in object space)
  end | segment end (specified in object space)
  hitPoint | receives the intersection point

Returns:
  true if there was an intersections, false if there was none

virtual csTerrainColliderCollideSegmentResult iTerrainCollider::CollideSegment | ( | iTerrainCell * | cell,
|  | const csVector3 & | start,
|  | const csVector3 & | end
| ) |  | `[pure virtual]`

Collide segment with cell.

Parameters:

  cell | cell
  start | segment start (specified in object space)
  end | segment end (specified in object space)

Returns:
  a csTerrainColliderCollideSegmentResult instance indicating what we hit.

virtual bool iTerrainCollider::CollideTriangles | ( | iTerrainCell * | cell,
|  | const csVector3 * | vertices,
|  | size_t | tri_count,
|  | const unsigned int * | indices,
|  | float | radius,
|  | const csReversibleTransform & | trans,
|  | bool | oneHit,
|  | iTerrainCollisionPairArray * | pairs
| ) |  | `[pure virtual]`

Collide set of triangles with cell.

Parameters:

  cell | cell
  vertices | vertex array
  tri_count | triangle count
  indices | vertex indices, 3 indices for each triangle
  radius | radius of the bounding sphere surrounding the given set of triangles (used for fast rejection)
  trans | triangle set transformation (vertices' coordinates are specified in the space defined by this transformation)
  oneHit | if this is true, than stop on finding the first collision pair; otherwise, detect all collisions
  points | destination collision pair array

Returns:
  true if there were any collisions, false if there were none

virtual csPtr<iTerrainCellCollisionProperties> iTerrainCollider::CreateProperties | ( |  | ) | `[pure virtual]`

Create an object that implements iTerrainCellCollisionProperties This object will be stored in the cell.

This function gets invoked at cells creation.

Returns:
  properties object

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

- imesh/terrain2.h