Method PlanarProject
PlanarProject(IList<Vector3>, IList<int>)
Projects a collection of 3D positions to a 2D plane. This method uses FindBestPlane(IList<Vector3>, IList<int>) to calculate the direction from which the vertices are projected.
Declaration
public static Vector2[] PlanarProject(IList<Vector3> positions, IList<int> indexes = null)
Parameters
Type | Name | Description |
---|---|---|
IList<Vector3> | positions | A collection of positions to project based on a direction. |
IList<int> | indexes | A collection of indices to project. The returned array matches the length of this collection. |
Returns
Type | Description |
---|---|
Vector2[] | The positions array projected into 2D coordinates. |
PlanarProject(IList<Vector3>, IList<int>, Vector3)
Projects a collection of 3D positions to a 2D plane in the specified direction.
Declaration
public static Vector2[] PlanarProject(IList<Vector3> positions, IList<int> indexes, Vector3 direction)
Parameters
Type | Name | Description |
---|---|---|
IList<Vector3> | positions | A collection of positions to project based on a direction. |
IList<int> | indexes | A collection of indices to project. The returned array matches the length of this collection. |
Vector3 | direction | The direction from which vertex positions are projected into 2D space. |
Returns
Type | Description |
---|---|
Vector2[] | The positions array projected into 2D coordinates. |