AI module navigator peer.
More...
#include <deBaseAINavigator.h>
|
|
| deBaseAINavigator () |
| Create peer. More...
|
|
virtual | ~deBaseAINavigator () |
| Clean up peer. More...
|
|
|
virtual void | LayerChanged () |
| Layer number changed. More...
|
|
virtual void | SpaceTypeChanged () |
| Space type changed. More...
|
|
virtual void | CostsChanged () |
| Costs changed. More...
|
|
virtual void | TypesChanged () |
| Types changed. More...
|
|
virtual void | ParametersChanged () |
| Parameters changed. More...
|
|
virtual bool | NearestPoint (const decDVector &point, float radius, decDVector &nearestPoint, int &nearestType) |
| Nearest point on nearest navigation space. More...
|
|
virtual bool | LineCollide (const decDVector &origin, const decVector &direction, float &distance) |
| Distance moving from point along direction before crossing navigation space boundaries. More...
|
|
virtual void | FindPath (deNavigatorPath &path, const decDVector &start, const decDVector &goal) |
| Find path. More...
|
|
virtual bool | PathCollideRay (const deNavigatorPath &path, deCollider &collider, int &hitAfterPoint, float &hitDistance) |
| Test path for collision using ray test. More...
|
|
virtual bool | PathCollideRay (const deNavigatorPath &path, deCollider &collider, const decDVector &startPosition, int nextPoint, float maxDistance, int &hitAfterPoint, float &hitDistance) |
| Test path for collision using ray test in range. More...
|
|
virtual bool | PathCollideShape (const deNavigatorPath &path, deCollider &collider, deCollider &agent, int &hitAfterPoint, float &hitDistance) |
| Test path for collision using a collider moved along the path. More...
|
|
virtual bool | PathCollideShape (const deNavigatorPath &path, deCollider &collider, deCollider &agent, const decDVector &startPosition, int nextPoint, float maxDistance, int &hitAfterPoint, float &hitDistance) |
| Test path for collision using a collider moved along the path in range. More...
|
|
AI module navigator peer.
◆ deBaseAINavigator()
deBaseAINavigator::deBaseAINavigator |
( |
| ) |
|
◆ ~deBaseAINavigator()
virtual deBaseAINavigator::~deBaseAINavigator |
( |
| ) |
|
|
virtual |
◆ CostsChanged()
virtual void deBaseAINavigator::CostsChanged |
( |
| ) |
|
|
virtual |
◆ FindPath()
Find path.
Replaces path with found path. If path can not be found the path is empty.
- Parameters
-
[out] | path | Path to update. |
[in] | start | Start position of path. |
[in] | goal | Goal position of path. |
◆ LayerChanged()
virtual void deBaseAINavigator::LayerChanged |
( |
| ) |
|
|
virtual |
◆ LineCollide()
virtual bool deBaseAINavigator::LineCollide |
( |
const decDVector & |
origin, |
|
|
const decVector & |
direction, |
|
|
float & |
distance |
|
) |
| |
|
virtual |
Distance moving from point along direction before crossing navigation space boundaries.
Default implementation returns false. AI module has to subclass this method.
- Parameters
-
[in] | origin | Origin to start moving. Use NearestPoint() to make sure it is located on a navigation space. |
[in] | direction | Direction to move starting at origin. |
[out] | distance | Set to the distance along displacement as percentage from 0 to 1 before touching a navigation space boundary. Set to 1 if no border is touched. |
- Return values
-
true | origin is located in the navigation space and moving along direction a navigation space boundary is touched. distance is set to the travelled percentage of direction. |
false | origin is not located in the navigation space. |
false | No navigation space boundary is hit moving along line. |
◆ NearestPoint()
virtual bool deBaseAINavigator::NearestPoint |
( |
const decDVector & |
point, |
|
|
float |
radius, |
|
|
decDVector & |
nearestPoint, |
|
|
int & |
nearestType |
|
) |
| |
|
virtual |
Nearest point on nearest navigation space.
Default implementation returns false. AI module has to subclass this method.
- Parameters
-
[in] | point | Point to find nearest point for. |
[in] | radius | Maximum radius clamped to 0 or larger to find nearest point in. |
[out] | nearestPoint | Set to the nearest point if found. |
[out] | nearestType | Set to the type number of the nearest point if found. |
- Return values
-
true | Nearest point is found and written to nearestPoint and nearestType. |
false | No nearest point found inside radius around point. |
false | There are no matching navigation spaces. |
◆ ParametersChanged()
virtual void deBaseAINavigator::ParametersChanged |
( |
| ) |
|
|
virtual |
◆ PathCollideRay() [1/2]
virtual bool deBaseAINavigator::PathCollideRay |
( |
const deNavigatorPath & |
path, |
|
|
deCollider & |
collider, |
|
|
const decDVector & |
startPosition, |
|
|
int |
nextPoint, |
|
|
float |
maxDistance, |
|
|
int & |
hitAfterPoint, |
|
|
float & |
hitDistance |
|
) |
| |
|
virtual |
Test path for collision using ray test in range.
Default implementation returns false. AI module has to subclass this method.
- Parameters
-
[in] | path | Path to use for testing. |
[out] | hitAfterPoint | Index of point after which the collision has been found. |
[out] | hitDistance | Relative distance from 0 to 1 along segment after hitAfterPoint. |
- Return values
-
true | if a collision is found and hitAfterPoint and hitDistance are set. |
false | No collision found. |
◆ PathCollideRay() [2/2]
virtual bool deBaseAINavigator::PathCollideRay |
( |
const deNavigatorPath & |
path, |
|
|
deCollider & |
collider, |
|
|
int & |
hitAfterPoint, |
|
|
float & |
hitDistance |
|
) |
| |
|
virtual |
Test path for collision using ray test.
Default implementation returns false. AI module has to subclass this method.
- Parameters
-
[in] | path | Path to use for testing. |
[out] | hitAfterPoint | Index of point after which the collision has been found. |
[out] | hitDistance | Relative distance from 0 to 1 along segment after hitAfterPoint. |
- Return values
-
true | if a collision is found and hitAfterPoint and hitDistance are set. |
false | No collision found. |
◆ PathCollideShape() [1/2]
virtual bool deBaseAINavigator::PathCollideShape |
( |
const deNavigatorPath & |
path, |
|
|
deCollider & |
collider, |
|
|
deCollider & |
agent, |
|
|
const decDVector & |
startPosition, |
|
|
int |
nextPoint, |
|
|
float |
maxDistance, |
|
|
int & |
hitAfterPoint, |
|
|
float & |
hitDistance |
|
) |
| |
|
virtual |
Test path for collision using a collider moved along the path in range.
Default implementation returns false. AI module has to subclass this method.
- Parameters
-
[in] | path | Path to use for testing. |
[out] | hitAfterPoint | Index of point after which the collision has been found. |
[out] | hitDistance | Relative distance from 0 to 1 along segment after hitAfterPoint. |
- Return values
-
true | if a collision is found and hitAfterPoint and hitDistance are set. |
false | No collision found. |
◆ PathCollideShape() [2/2]
Test path for collision using a collider moved along the path.
Default implementation returns false. AI module has to subclass this method.
- Parameters
-
[in] | path | Path to use for testing. |
[out] | hitAfterPoint | Index of point after which the collision has been found. |
[out] | hitDistance | Relative distance from 0 to 1 along segment after hitAfterPoint. |
- Return values
-
true | if a collision is found and hitAfterPoint and hitDistance are set. |
false | No collision found. |
◆ SpaceTypeChanged()
virtual void deBaseAINavigator::SpaceTypeChanged |
( |
| ) |
|
|
virtual |
◆ TypesChanged()
virtual void deBaseAINavigator::TypesChanged |
( |
| ) |
|
|
virtual |
The documentation for this class was generated from the following file: