|
Drag[en]gine Script Module DragonScript 1.35
|
Public Member Functions | |
Constructors | |
| Navigator | new () |
| Create navigator. | |
Management | |
| int | getLayer () |
| Layer number. | |
| void | setLayer (int layer) |
| Set layer number. | |
| NavigationSpaceType | getSpaceType () |
| Space type to navigate. | |
| void | setSpaceType (NavigationSpaceType spaceType) |
| Set space type to navigate. | |
| float | getMaxOutsideDistance () |
| Maximum distance the start and goal point are allowed to be outside any navigation space. | |
| void | setMaxOutsideDistance (float maxDistance) |
| Set maximum distance the start and goal point are allowed to be outside any navigation space. | |
| float | getDefaultFixCost () |
| Fix cost to use if no matching type is found. | |
| void | setDefaultFixCost (float cost) |
| Set fix cost to use if no matching type is found. | |
| float | getDefaultCostPerMeter () |
| Cost per meter to use if no matching type is found. | |
| void | setDefaultCostPerMeter (float costPerMeter) |
| Set cost per meter to use if no matching type is found. | |
| float | getBlockingCost () |
| Maximum cost beyond which a node or path is considered impassable. | |
| void | setBlockingCost (float cost) |
| Set maximum cost beyond which a node or path is considered impassable. | |
| float | getTypeFixCost (int type) |
| Fix cost for type or default fix cost if not found. | |
| void | setTypeFixCost (int type, float fixCost) |
| Set fix cost for type or default fix cost if not found. | |
| float | getTypeCostPerMeter (int type) |
| Cost per meter for type or default cost per meter if not found. | |
| void | setTypeCostPerMeter (int type, float costPerMeter) |
| Set cost per meter for type or default cost per meter if not found. | |
| void | removeType (int type) |
| Remove type. | |
| void | removeAllTypes () |
| Remove all types. | |
| void | findPath (NavigatorPath path, DVector start, DVector goal) |
| Find path. | |
| NavigationInfo | nearestPoint (DVector point, float radius) |
| Nearest point on nearest navigation space. | |
| NavigationInfo | lineCollide (DVector origin, Vector direction) |
| Distance moving from point along direction before crossing navigation space boundaries. | |
| NavigationInfo | pathCollideRay (NavigatorPath path, Collider collider) |
| Test path for collision using ray test against collider. | |
| NavigationInfo | pathCollideRay (NavigatorPath path, Collider collider, DVector startPosition, int nextPoint, float maxDistance) |
| Test path for collision using ray test against collider inside range. | |
| NavigationInfo | pathCollideShape (NavigatorPath path, Collider collider, Collider agent) |
| Test path for collision using an agent collider moved along the path against a collider. | |
| 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. | |
This is a native class.
| void Dragengine.Scenery.Navigator.findPath | ( | NavigatorPath | path, |
| DVector | start, | ||
| DVector | goal ) |
Find path.
Replaces path with found path. If path can not be found the path is empty.
References getTypeCostPerMeter(), setTypeCostPerMeter(), and setTypeFixCost().
Referenced by lineCollide().
| float Dragengine.Scenery.Navigator.getBlockingCost | ( | ) |
Maximum cost beyond which a node or path is considered impassable.
Referenced by getTypeCostPerMeter().
| float Dragengine.Scenery.Navigator.getDefaultCostPerMeter | ( | ) |
Cost per meter to use if no matching type is found.
Referenced by setBlockingCost().
| float Dragengine.Scenery.Navigator.getDefaultFixCost | ( | ) |
Fix cost to use if no matching type is found.
Referenced by setDefaultCostPerMeter().
| int Dragengine.Scenery.Navigator.getLayer | ( | ) |
| float Dragengine.Scenery.Navigator.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 .
Referenced by setMaxOutsideDistance().
| NavigationSpaceType Dragengine.Scenery.Navigator.getSpaceType | ( | ) |
| float Dragengine.Scenery.Navigator.getTypeCostPerMeter | ( | int | type | ) |
Cost per meter for type or default cost per meter if not found.
References getBlockingCost().
Referenced by findPath().
| float Dragengine.Scenery.Navigator.getTypeFixCost | ( | int | type | ) |
Fix cost for type or default fix cost if not found.
Referenced by removeAllTypes().
| NavigationInfo Dragengine.Scenery.Navigator.lineCollide | ( | DVector | origin, |
| Vector | direction ) |
Distance moving from point along direction before crossing navigation space boundaries.
| origin | Origin to start moving. Use NearestPoint() to make sure it is located on a navigation space. |
| direction | Direction to move starting at origin. |
References findPath().
Referenced by pathCollideShape().
| NavigationInfo Dragengine.Scenery.Navigator.nearestPoint | ( | DVector | point, |
| float | radius ) |
Nearest point on nearest navigation space.
| point | Point to find nearest point for. |
| radius | Maximum radius clamped to 0 or larger to find nearest point in. |
References removeAllTypes(), and removeType().
Referenced by pathCollideRay().
| Navigator Dragengine.Scenery.Navigator.new | ( | ) |
| NavigationInfo Dragengine.Scenery.Navigator.pathCollideRay | ( | NavigatorPath | path, |
| Collider | collider ) |
Test path for collision using ray test against collider.
References nearestPoint().
Referenced by pathCollideShape(), and pathCollideShape().
| NavigationInfo Dragengine.Scenery.Navigator.pathCollideRay | ( | NavigatorPath | path, |
| Collider | collider, | ||
| DVector | startPosition, | ||
| int | nextPoint, | ||
| float | maxDistance ) |
Test path for collision using ray test against collider inside range.
| path | Path to use. |
| collider | Collider to use for testing. |
| startPosition | Starting position for testing. |
| nextPoint | Index of next point along the path to test. If this is equal to getPathPointCount() the goal position is used. |
| maxDistance | Limit testing to maxDistance meters after startPosition along path. |
| EOutOfBoundary | nextPoint is less than 0 or larger than getPathPointCount(). |
| NavigationInfo Dragengine.Scenery.Navigator.pathCollideShape | ( | NavigatorPath | path, |
| Collider | collider, | ||
| Collider | agent ) |
Test path for collision using an agent collider moved along the path against a collider.
References lineCollide(), and pathCollideRay().
Referenced by pathCollideShape().
| NavigationInfo Dragengine.Scenery.Navigator.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.
| path | Path to use. |
| collider | Collider to use for testing. |
| agent | Collider representing the agent. |
| startPosition | Starting position for testing. |
| nextPoint | Index of next point along the path to test. If this is equal to getPathPointCount() the goal position is used. |
| maxDistance | Limit testing to maxDistance meters after startPosition along path. |
| EOutOfBoundary | nextPoint is less than 0 or larger than getPathPointCount(). |
References pathCollideRay(), and pathCollideShape().
| void Dragengine.Scenery.Navigator.removeAllTypes | ( | ) |
| void Dragengine.Scenery.Navigator.removeType | ( | int | type | ) |
| void Dragengine.Scenery.Navigator.setBlockingCost | ( | float | cost | ) |
Set maximum cost beyond which a node or path is considered impassable.
References getDefaultCostPerMeter(), and setDefaultFixCost().
Referenced by removeType().
| void Dragengine.Scenery.Navigator.setDefaultCostPerMeter | ( | float | costPerMeter | ) |
Set cost per meter to use if no matching type is found.
References getDefaultFixCost().
Referenced by setTypeFixCost().
| void Dragengine.Scenery.Navigator.setDefaultFixCost | ( | float | cost | ) |
Set fix cost to use if no matching type is found.
References setMaxOutsideDistance().
Referenced by setBlockingCost().
| void Dragengine.Scenery.Navigator.setLayer | ( | int | layer | ) |
Set layer number.
Referenced by getSpaceType().
| void Dragengine.Scenery.Navigator.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.
References getMaxOutsideDistance().
Referenced by setDefaultFixCost().
| void Dragengine.Scenery.Navigator.setSpaceType | ( | NavigationSpaceType | spaceType | ) |
Set space type to navigate.
References getSpaceType(), and setSpaceType().
Referenced by setSpaceType().
| void Dragengine.Scenery.Navigator.setTypeCostPerMeter | ( | int | type, |
| float | costPerMeter ) |
Set cost per meter for type or default cost per meter if not found.
Referenced by findPath().
| void Dragengine.Scenery.Navigator.setTypeFixCost | ( | int | type, |
| float | fixCost ) |
Set fix cost for type or default fix cost if not found.
References setDefaultCostPerMeter().
Referenced by findPath().