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
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 findPath (NavigatorPath path, DVector start, DVector goal)
 Find path. More...
 
NavigationInfo nearestPoint (DVector point, float radius)
 Nearest point on nearest navigation space. More...
 
NavigationInfo pathCollideRay (NavigatorPath path, Collider collider)
 Test path for collision using ray test against collider. More...
 
NavigationInfo pathCollideRay (NavigatorPath path, Collider collider, DVector startPosition, int nextPoint, float maxDistance)
 Test path for collision using ray test against collider inside range. More...
 
NavigationInfo pathCollideShape (NavigatorPath path, Collider collider, Collider agent)
 Test path for collision using an agent collider moved along the path against a collider. More...
 
NavigationInfo pathCollideShape (NavigatorPath path, 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

◆ findPath()

void findPath ( NavigatorPath  path,
DVector  start,
DVector  goal 
)

Find path.

Replaces path with found path. If path can not be found the path is empty.

◆ 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.

◆ 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 .

◆ getSpaceType()

int getSpaceType ( )

Space type to navigate.

◆ 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 ( NavigatorPath  path,
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 ( NavigatorPath  path,
Collider  collider,
DVector  startPosition,
int  nextPoint,
float  maxDistance 
)

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

Parameters
pathPath to use.
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 ( NavigatorPath  path,
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 ( NavigatorPath  path,
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
pathPath to use.
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.

◆ 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.

◆ 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.


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