Class NavigationSurface
Describes a navigation surface. (One of the system layers.)
Inheritance
Namespace: AlchemyBow.Navigation.Surfaces
Assembly: AlchemyBow.Navigation.dll
Syntax
public sealed class NavigationSurface
Constructors
| Improve this Doc View SourceNavigationSurface(NavigationLayerSettings)
Creates an instance of the NavigationSurface class.
Declaration
public NavigationSurface(NavigationLayerSettings layerSettings)
Parameters
Type | Name | Description |
---|---|---|
NavigationLayerSettings | layerSettings | Settings of the surface. |
Fields
| Improve this Doc View SourceEpsilonThreshold
The calculations offset.
Declaration
public const float EpsilonThreshold = 1E-05F
Field Value
Type | Description |
---|---|
System.Single | The calculations offset. |
Methods
| Improve this Doc View SourceContainsFace(Face)
Determines whether the surface contains the face.
Declaration
public bool ContainsFace(Face face)
Parameters
Type | Name | Description |
---|---|---|
Face | face | The face to locate. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CreateAdvancedDrawer(NavigationSettings)
Creates a sophisticated Gizmos drawer for the current state of the surface.
Declaration
public ISurfaceDrawer CreateAdvancedDrawer(NavigationSettings settings)
Parameters
Type | Name | Description |
---|---|---|
NavigationSettings | settings | The navigation settings of the system. |
Returns
Type | Description |
---|---|
ISurfaceDrawer | A sophisticated Gizmos drawer for the current state of the surface. |
CreateMinimalDrawer()
Creates an optimized Gizmos drawer for the current state of the surface.
Declaration
public ISurfaceDrawer CreateMinimalDrawer()
Returns
Type | Description |
---|---|
ISurfaceDrawer | An optimized Gizmos drawer for the current state of the surface. |
FindFirstFaceUnderPosition(Vector3, Int32)
Finds the first Face under the position.
Declaration
public Face FindFirstFaceUnderPosition(Vector3 position, int areaMask)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | The position. |
System.Int32 | areaMask | An area mask that is used to selectively ignore faces when casting a ray. |
Returns
Type | Description |
---|---|
Face | The first Face under the position or |
RaycastAllInRadius(Ray, Single, Int32, out SurfaceRaycastHit)
Raycasts all faces in the radius.
Declaration
public bool RaycastAllInRadius(Ray ray, float radius, int areaMask, out SurfaceRaycastHit hit)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Ray | ray | The starting point and direction of the ray. |
System.Single | radius | The radius. |
System.Int32 | areaMask | An area mask that is used to selectively ignore faces when casting a ray. |
SurfaceRaycastHit | hit | If true is returned, |
Returns
Type | Description |
---|---|
System.Boolean |
|
RegisterFace(Vector3, Vector3, Vector3, NavigationFaceWrapper)
Registers a triangle as a face.
Declaration
public void RegisterFace(Vector3 a, Vector3 b, Vector3 c, NavigationFaceWrapper handle)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | a | Point a of the triangle. |
UnityEngine.Vector3 | b | Point b of the triangle. |
UnityEngine.Vector3 | c | Point c of the triangle. |
NavigationFaceWrapper | handle | The face handle. |
UnregisterFace(NavigationFaceWrapper)
Unregisters the face with the handle.
Declaration
public void UnregisterFace(NavigationFaceWrapper handle)
Parameters
Type | Name | Description |
---|---|---|
NavigationFaceWrapper | handle | The handle to the face. |