Method GetEdgeRotation
GetEdgeRotation(ProBuilderMesh, HandleOrientation, IEnumerable<Edge>)
Returns a rotation suitable for orienting a handle or gizmo relative to the Edge selection.
Declaration
public static Quaternion GetEdgeRotation(ProBuilderMesh mesh, HandleOrientation orientation, IEnumerable<Edge> edges)
Parameters
Type | Name | Description |
---|---|---|
ProBuilderMesh | mesh | The target mesh. |
HandleOrientation | orientation | The type of HandleOrientation to calculate. |
IEnumerable<Edge> | edges | Which edges to consider in the rotation calculations. This is only used when the HandleOrientation is set to ActiveElement. |
Returns
Type | Description |
---|---|
Quaternion | A rotation appropriate to the orientation and element selection. |
GetEdgeRotation(ProBuilderMesh, Edge)
Returns the rotation of an Edge in world space.
Declaration
public static Quaternion GetEdgeRotation(ProBuilderMesh mesh, Edge edge)
Parameters
Type | Name | Description |
---|---|---|
ProBuilderMesh | mesh | The mesh that edge belongs to. |
Edge | edge | The edge you want to calculate the rotation for. |
Returns
Type | Description |
---|---|
Quaternion | The rotation of the edge in world space coordinates. |