class MAGES::Utilities::GizmoUtilities¶
Overview¶
Gizmo Utilities. More…
class GizmoUtilities
{
public:
// structs
struct GizmoDrawingScope;
// methods
static void DrawTetrahedron(Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3);
static void DrawTetrahedron(
Vector3 p0,
Vector3 p1,
Vector3 p2,
Vector3 p3,
Matrix4x4 trs
);
static void DrawPoint(in Vector3 position, float size = .1f);
static void DrawAxis(
in Vector3 position,
in Vector3 forward,
in Vector3 up,
in float scale = 1f
);
static void DrawAxis(
in Vector3 position,
in Vector3 forward,
in Vector3 up,
in Vector3 right,
in float scale = 1f
);
};
Detailed Documentation¶
Gizmo Utilities.
Methods¶
static void DrawTetrahedron(Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3)
Draws a tetrahedron by connecting the given points with lines.
Parameters:
p0 |
The first point of the tetrahedron. |
p1 |
The second point of the tetrahedron. |
p2 |
The third point of the tetrahedron. |
p3 |
The fourth point of the tetrahedron. |
static void DrawTetrahedron(
Vector3 p0,
Vector3 p1,
Vector3 p2,
Vector3 p3,
Matrix4x4 trs
)
Draws a tetrahedron transformed by the given matrix.
Parameters:
p0 |
The first point of the tetrahedron. |
p1 |
The second point of the tetrahedron. |
p2 |
The third point of the tetrahedron. |
p3 |
The fourth point of the tetrahedron. |
trs |
The transformation matrix to apply to the tetrahedron. |
static void DrawPoint(in Vector3 position, float size = .1f)
Draws a point at the specified position.
Parameters:
position |
The position of the point. |
size |
The size of the point. Default is 0.1 units. |
static void DrawAxis(
in Vector3 position,
in Vector3 forward,
in Vector3 up,
in float scale = 1f
)
Draws an axis gizmo at the specified position.
Parameters:
position |
Position. |
forward |
Forward vector. |
up |
Up vector. |
scale |
Gizmo scale. |
static void DrawAxis(
in Vector3 position,
in Vector3 forward,
in Vector3 up,
in Vector3 right,
in float scale = 1f
)
Draws an axis gizmo at the specified position.
Parameters:
position |
Position. |
forward |
Forward vector. |
up |
Up vector. |
right |
Right vector. |
scale |
Gizmo scale. |