Class Face
Describes three connected edges.
Inheritance
Implements
Namespace: AlchemyBow.Navigation.Surfaces
Assembly: AlchemyBow.Navigation.dll
Syntax
public class Face : IImmutableFace
Constructors
| Improve this Doc View SourceFace(Edge, Edge, Edge, NavigationFaceWrapper)
Creates an instance of the Face class.
Declaration
public Face(Edge e1, Edge e2, Edge e3, NavigationFaceWrapper handle)
Parameters
| Type | Name | Description |
|---|---|---|
| Edge | e1 | Any edge. |
| Edge | e2 | Any edge. |
| Edge | e3 | Any edge. |
| NavigationFaceWrapper | handle | The handle to the face. |
Fields
| Improve this Doc View Sourceab
The first edge.
Declaration
public readonly Edge ab
Field Value
| Type | Description |
|---|---|
| Edge | The first edge. |
bc
The second edge.
Declaration
public readonly Edge bc
Field Value
| Type | Description |
|---|---|
| Edge | The second edge. |
ca
The third edge.
Declaration
public readonly Edge ca
Field Value
| Type | Description |
|---|---|
| Edge | The third edge. |
handle
The handle to the face.
Declaration
public readonly NavigationFaceWrapper handle
Field Value
| Type | Description |
|---|---|
| NavigationFaceWrapper | The handle to the face. |
plane
The cached plane of the face.
Declaration
public readonly Plane plane
Field Value
| Type | Description |
|---|---|
| UnityEngine.Plane | The cached plane of the face. |
Properties
| Improve this Doc View SourceA
Gets the first vertex of the face.
Declaration
public Vector3 A { get; }
Property Value
| Type | Description |
|---|---|
| UnityEngine.Vector3 | The first vertex of the face. |
ABNeighbour
The neighbour of the first edge or null.
Declaration
public Face ABNeighbour { get; }
Property Value
| Type | Description |
|---|---|
| Face | The neighbour of the first edge or |
AreaMask
Gets the index of the area to witch the face belongs, as a mask.
Declaration
public int AreaMask { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The index of the area to witch the face belongs, as a mask. |
B
Gets the second vertex of the face.
Declaration
public Vector3 B { get; }
Property Value
| Type | Description |
|---|---|
| UnityEngine.Vector3 | The second vertex of the face. |
BCNeighbour
The neighbour of the second edge or null.
Declaration
public Face BCNeighbour { get; }
Property Value
| Type | Description |
|---|---|
| Face | The neighbour of the second edge or |
C
Gets the third vertex of the face.
Declaration
public Vector3 C { get; }
Property Value
| Type | Description |
|---|---|
| UnityEngine.Vector3 | The third vertex of the face. |
CANeighbour
The neighbour of the third edge or null.
Declaration
public Face CANeighbour { get; }
Property Value
| Type | Description |
|---|---|
| Face | The neighbour of the third edge or |
Plane
Gets the plane of the face.
Declaration
public Plane Plane { get; }
Property Value
| Type | Description |
|---|---|
| UnityEngine.Plane | The plane of the face. |
Weight
Gets the weight of the face.
Declaration
public float Weight { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The weight of the face. |
Methods
| Improve this Doc View SourceCalculateCenter()
Calculates the center of the face.
Declaration
public Vector3 CalculateCenter()
Returns
| Type | Description |
|---|---|
| UnityEngine.Vector3 | The center of the face. |
GetSharedEdge(Face)
Gets the edge that is shared with the indicated face.
Declaration
public Edge GetSharedEdge(Face other)
Parameters
| Type | Name | Description |
|---|---|---|
| Face | other | The face to find a shared edge. |
Returns
| Type | Description |
|---|---|
| Edge | The shared edge or |
IsPointInsideFace(Vector3, Single)
Determines whether an point is on the face.
Declaration
public bool IsPointInsideFace(Vector3 point, float offset = 0F)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEngine.Vector3 | point | The point to check. |
| System.Single | offset | Calculation offset. (optional) |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
Raycast(Ray, out Single)
Raycasts the face.
Declaration
public bool Raycast(Ray ray, out float distance)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEngine.Ray | ray | The starting point and direction of the ray. |
| System.Single | distance | If true is returned, |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|