Public Member Functions | Public Attributes | Protected Attributes | Properties
RAIN.Sensors.ObstacleAvoidanceCollider Class Reference

ObstacleAvoidanceCollider is the base class for obstacle avoidance colliders. It is an abstract class, serving as a common base upon which specific collider types (sphere, box, etc.) can be added. More...

Inheritance diagram for RAIN.Sensors.ObstacleAvoidanceCollider:
RAIN.Core.RAINComponent RAIN.Sensors.BoxObstacleAvoidanceCollider RAIN.Sensors.SphereObstacleAvoidanceCollider

List of all members.

Public Member Functions

 ObstacleAvoidanceCollider ()
 Default constructor.
void IgnoreColliders (Collider[] colliders)
 Ignore a list of colliders - usually used to ignore colliders associated with self.
void IgnoreCollider (Collider c)
 Ignore a single collider.
void CullIgnoredColliders ()
 Remove any ignored colliders from the current list of obstacles.
void OnTriggerEnter (Collider sensedObject)
 OnTriggerEnter event handler when the collider detects a trigger collision.
void OnTriggerExit (Collider sensedObject)
 OnTriggerExit event handler when a trigger stops colliding.

Public Attributes

bool collideWithTerrain = false
 Determine if the collider should include Terrain - usually this will be false, since we expect our AI to collide with Terrain often.

Protected Attributes

Dictionary< Collider,
PhysicalEntity
obstacles = new Dictionary<Collider, PhysicalEntity>()
 A list of the obstacles currently tracked by this collider.
List< Collider > ignored = new List<Collider>()

Properties

ICollection< PhysicalEntityObstacles [get]
 The current list of obstacles to avoid.
abstract float Radius [get]

Detailed Description

ObstacleAvoidanceCollider is the base class for obstacle avoidance colliders. It is an abstract class, serving as a common base upon which specific collider types (sphere, box, etc.) can be added.


Constructor & Destructor Documentation

Default constructor.


Member Function Documentation

Remove any ignored colliders from the current list of obstacles.

Ignore a single collider.

Parameters:
cCollider to ignore

Ignore a list of colliders - usually used to ignore colliders associated with self.

Parameters:
collidersList of colliders to ignore

OnTriggerEnter event handler when the collider detects a trigger collision.

Parameters:
sensedObjectThe collider this sensor collided with

OnTriggerExit event handler when a trigger stops colliding.

Parameters:
sensedObjectThe collider leaving the collision

Member Data Documentation

Determine if the collider should include Terrain - usually this will be false, since we expect our AI to collide with Terrain often.

Dictionary<Collider, PhysicalEntity> RAIN.Sensors.ObstacleAvoidanceCollider.obstacles = new Dictionary<Collider, PhysicalEntity>() [protected]

A list of the obstacles currently tracked by this collider.


Property Documentation

The current list of obstacles to avoid.