Struct CorridorSegmentProjection
Intermediate struct used by the algorithm. It keeps track of the original 3D sides of the portals and the 2D projected ones. This information can then be used to reconstruct the intersection points of the straightened path in 3D.
Implements
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
Namespace: AnyPath.Graphs
Assembly: Assembly-CSharp.dll
Syntax
public struct CorridorSegmentProjection : ICorridorSegmentProjection
Properties
| Improve this Doc View SourceLeft
Declaration
public float2 Left { readonly get; set; }
Property Value
Type | Description |
---|---|
Unity.Mathematics.float2 |
Right
Declaration
public float2 Right { readonly get; set; }
Property Value
Type | Description |
---|---|
Unity.Mathematics.float2 |
Methods
| Improve this Doc View SourceFromToRotation(float3, float3)
Declaration
public static quaternion FromToRotation(float3 from, float3 to)
Parameters
Type | Name | Description |
---|---|---|
Unity.Mathematics.float3 | from | |
Unity.Mathematics.float3 | to |
Returns
Type | Description |
---|---|
Unity.Mathematics.quaternion |
Unwrap<T>(NativeSlice<T>, NativeSlice<CorridorSegmentProjection>)
Unwraps a path that is funnelable. So it can be processed by SSFA. Use this function if your path has arbitrary rotations in 3D space. This will unroll the path completely and project it onto the XZ plane.
Declaration
public static void Unwrap<T>(NativeSlice<T> path, NativeSlice<CorridorSegmentProjection> portals)
where T : struct, IUnwrappableCorridorSegment
Parameters
Type | Name | Description |
---|---|---|
Unity.Collections.NativeSlice<T> | path | The path to process. |
Unity.Collections.NativeSlice<CorridorSegmentProjection> | portals | Output array of the portals. Needs to be of the same length as the path. |
Type Parameters
Name | Description |
---|---|
T | Type of segments |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException |