Drag[en]gine Script Module DragonScript Script API  1.0
Navigator Class Reference

Navigator. More...

Inheritance diagram for Navigator:

Public Member Functions

Constructors
Navigator new ()
 Create navigator. More...
 
Management
DVector getStartPosition ()
 Start position. More...
 
void setStartPosition (DVector position)
 Set start position. More...
 
DVector getGoalPosition ()
 Goal position. More...
 
void setGoalPosition (DVector position)
 Set goal position. More...
 
int getLayer ()
 Layer number. More...
 
void setLayer (int layer)
 Set layer number. More...
 
int getSpaceType ()
 Space type to navigate. More...
 
void setSpaceType (int spaceType)
 Set space type to navigate. More...
 
float getMaxOutsideDistance ()
 Maximum distance the start and goal point are allowed to be outside any navigation space. More...
 
void setMaxOutsideDistance (float maxDistance)
 Set maximum distance the start and goal point are allowed to be outside any navigation space. More...
 
float getDefaultFixCost ()
 Fix cost to use if no matching type is found. More...
 
void setDefaultFixCost (float cost)
 Set fix cost to use if no matching type is found. More...
 
float getDefaultCostPerMeter ()
 Cost per meter to use if no matching type is found. More...
 
void setDefaultCostPerMeter (float costPerMeter)
 Set cost per meter to use if no matching type is found. More...
 
float getBlockingCost ()
 Maximum cost beyond which a node or path is considered impassable. More...
 
void setBlockingCost (float cost)
 Set maximum cost beyond which a node or path is considered impassable. More...
 
float getTypeFixCost (int type)
 Fix cost for type or default fix cost if not found. More...
 
void setTypeFixCost (int type, float fixCost)
 Set fix cost for type or default fix cost if not found. More...
 
float getTypeCostPerMeter (int type)
 Cost per meter for type or default cost per meter if not found. More...
 
void setTypeCostPerMeter (int type, float costPerMeter)
 Set cost per meter for type or default cost per meter if not found. More...
 
void removeType (int type)
 Remove type. More...
 
void removeAllTypes ()
 Remove all types. More...
 
void updatePath ()
 Update path. More...
 
void clearPath ()
 Clear path. More...
 
int getPathPointCount ()
 Number of points in the path. More...
 
DVector getPathPointAt (int index)
 Path point at the given position. More...
 
NavigationInfo nearestPoint (DVector point, float radius)
 Nearest point on nearest navigation space. More...
 
NavigationInfo pathCollideRay (Collider collider)
 Test path for collision using ray test against collider. More...
 
NavigationInfo pathCollideRay (Collider collider, DVector startPosition, int nextPoint, float maxDistance)
 Test path for collision using ray test against collider inside range. More...
 
NavigationInfo pathCollideShape (Collider collider, Collider agent)
 Test path for collision using an agent collider moved along the path against a collider. More...
 
NavigationInfo pathCollideShape (Collider collider, Collider agent, DVector startPosition, int nextPoint, float maxDistance)
 Test path for collision using an agent collider moved along the path against a collider inside range. More...
 

Detailed Description

Navigator.

This is a native class.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ clearPath()

void clearPath ( )

Clear path.

§ getBlockingCost()

float getBlockingCost ( )

Maximum cost beyond which a node or path is considered impassable.

§ getDefaultCostPerMeter()

float getDefaultCostPerMeter ( )

Cost per meter to use if no matching type is found.

§ getDefaultFixCost()

float getDefaultFixCost ( )

Fix cost to use if no matching type is found.

§ getGoalPosition()

DVector getGoalPosition ( )

Goal position.

§ getLayer()

int getLayer ( )

Layer number.

§ getMaxOutsideDistance()

float getMaxOutsideDistance ( )

Maximum distance the start and goal point are allowed to be outside any navigation space.

If the start or goal point is outside the range path update returns an empty path. The default disstance is 0.5m .

§ getPathPointAt()

DVector getPathPointAt ( int  index)

Path point at the given position.

§ getPathPointCount()

int getPathPointCount ( )

Number of points in the path.

§ getSpaceType()

int getSpaceType ( )

Space type to navigate.

§ getStartPosition()

DVector getStartPosition ( )

Start position.

§ getTypeCostPerMeter()

float getTypeCostPerMeter ( int  type)

Cost per meter for type or default cost per meter if not found.

§ getTypeFixCost()

float getTypeFixCost ( int  type)

Fix cost for type or default fix cost if not found.

§ nearestPoint()

NavigationInfo nearestPoint ( DVector  point,
float  radius 
)

Nearest point on nearest navigation space.

Parameters
pointPoint to find nearest point for.
radiusMaximum radius clamped to 0 or larger to find nearest point in.
Returns
Nearest point (sets position, costType) if found or null if not found.

§ new()

Navigator new ( )

Create navigator.

§ pathCollideRay() [1/2]

NavigationInfo pathCollideRay ( Collider  collider)

Test path for collision using ray test against collider.

Returns
Navigation info (sets pathIndex, pathFactor) or null if not collision is found.

§ pathCollideRay() [2/2]

NavigationInfo pathCollideRay ( Collider  collider,
DVector  startPosition,
int  nextPoint,
float  maxDistance 
)

Test path for collision using ray test against collider inside range.

Parameters
colliderCollider to use for testing.
startPositionStarting position for testing.
nextPointIndex of next point along the path to test. If this is equal to getPathPointCount() the goal position is used.
maxDistanceLimit testing to maxDistance meters after startPosition along path.
Exceptions
EOutOfBoundarynextPoint is less than 0 or larger than getPathPointCount().
Returns
Navigation info (sets pathIndex, pathFactor) or null if not collision is found.

§ pathCollideShape() [1/2]

NavigationInfo pathCollideShape ( Collider  collider,
Collider  agent 
)

Test path for collision using an agent collider moved along the path against a collider.

Returns
Navigation info (sets pathIndex, pathFactor) or null if not collision is found.

§ pathCollideShape() [2/2]

NavigationInfo pathCollideShape ( Collider  collider,
Collider  agent,
DVector  startPosition,
int  nextPoint,
float  maxDistance 
)

Test path for collision using an agent collider moved along the path against a collider inside range.

Parameters
colliderCollider to use for testing.
agentCollider representing the agent.
startPositionStarting position for testing.
nextPointIndex of next point along the path to test. If this is equal to getPathPointCount() the goal position is used.
maxDistanceLimit testing to maxDistance meters after startPosition along path.
Exceptions
EOutOfBoundarynextPoint is less than 0 or larger than getPathPointCount().
Returns
Navigation info (sets pathIndex, pathFactor) or null if not collision is found.

§ removeAllTypes()

void removeAllTypes ( )

Remove all types.

§ removeType()

void removeType ( int  type)

Remove type.

§ setBlockingCost()

void setBlockingCost ( float  cost)

Set maximum cost beyond which a node or path is considered impassable.

§ setDefaultCostPerMeter()

void setDefaultCostPerMeter ( float  costPerMeter)

Set cost per meter to use if no matching type is found.

§ setDefaultFixCost()

void setDefaultFixCost ( float  cost)

Set fix cost to use if no matching type is found.

§ setGoalPosition()

void setGoalPosition ( DVector  position)

Set goal position.

§ setLayer()

void setLayer ( int  layer)

Set layer number.

§ setMaxOutsideDistance()

void setMaxOutsideDistance ( float  maxDistance)

Set maximum distance the start and goal point are allowed to be outside any navigation space.

If the start or goal point is outside the range path update returns an empty path.

§ setSpaceType()

void setSpaceType ( int  spaceType)

Set space type to navigate.

§ setStartPosition()

void setStartPosition ( DVector  position)

Set start position.

§ setTypeCostPerMeter()

void setTypeCostPerMeter ( int  type,
float  costPerMeter 
)

Set cost per meter for type or default cost per meter if not found.

§ setTypeFixCost()

void setTypeFixCost ( int  type,
float  fixCost 
)

Set fix cost for type or default fix cost if not found.

§ updatePath()

void updatePath ( )

Update path.


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