Class ChannelUnwrapper
Describes a 3d channel as 2d with standardized its portals.
Inheritance
Namespace: AlchemyBow.Navigation.Utilities
Assembly: AlchemyBow.Navigation.dll
Syntax
public sealed class ChannelUnwrapper
Properties
| Improve this Doc View SourceChannelLength
Gets the number of elements contained in the channel array.
Declaration
public int ChannelLength { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of elements contained in the channel array. |
Remarks
This is given by the formula 2 + 2 * the number of portals.
UnwrappedChannel
Gets the unwrapped channel in form of an array where: the first index is a start point; the last index is an end point; other indexes are left(odd) and right(even) points of the portals.
Declaration
public Vector2[] UnwrappedChannel { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Vector2[] | The unwrapped channel in form of an array where: the first index is a start point; the last index is an end point; other indexes are left(odd) and right(even) points of the portals. |
Methods
| Improve this Doc View SourceUnwrapAndStandardizePortals(Vector3[])
Unwraps and standardizes a channel.
Declaration
public void UnwrapAndStandardizePortals(Vector3[] channel)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3[] | channel | An array where: the first index is the start point; the last index is the end point; other indexes are the channel portals pairs. |
WrapExactPath(Single[])
Calculates points located on portals in given ratios.
Declaration
public Vector3[] WrapExactPath(float[] path)
Parameters
Type | Name | Description |
---|---|---|
System.Single[] | path | An array of ratios between points of each portal. |
Returns
Type | Description |
---|---|
UnityEngine.Vector3[] | An array of points located on portals in given ratios. |
WrapPoint(Int32)
Gets the source point for the index of the unwrapped channel.
Declaration
public Vector3 WrapPoint(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | An index of the unwrapped channel. |
Returns
Type | Description |
---|---|
UnityEngine.Vector3 | The source point for the index of the unwrapped channel |