Utility class for drawing gizmos. More...
Static Public Member Functions | |
static Color | Alpha (this Color color, Single a) |
Adjusts the alpha channel of the color. More... | |
static Color | Brightness (this Color color, float brightness) |
Adjusts the brightness of a color. More... | |
static void | DrawGizmoArc (Vector3 position, Vector3 normal, Vector3 from, float angle, float radius, Color color, float alphaRatio=1.0f, QuantumGizmoStyle style=default) |
Draws a gizmo arc in the Unity editor. More... | |
static void | DrawGizmoDiamond (Vector3 center, Vector2 size) |
Draws a diamond gizmo with the given center and size. More... | |
static void | DrawGizmoDisc (Vector3 position, Vector3 normal, float radius, Color color, float alphaRatio=1.0f, QuantumGizmoStyle style=default) |
Draws a gizmo disc at the specified position and orientation. More... | |
static void | DrawGizmoGrid (FPVector2 bottomLeft, Int32 width, Int32 height, Int32 nodeSize, Color color) |
Draws a grid of gizmos in the Unity editor. More... | |
static void | DrawGizmoGrid (Vector3 bottomLeft, Int32 width, Int32 height, float nodeWidth, float nodeHeight, Color color) |
Draws a grid of gizmos in the scene. More... | |
static void | DrawGizmoGrid (Vector3 bottomLeft, Int32 width, Int32 height, Int32 nodeSize, Color color) |
Draw a grid of gizmos starting from a bottom-left position. More... | |
static void | DrawGizmoPolygon2D (Matrix4x4 matrix, FPVector2[] vertices, Single height, bool drawNormals, Color color, QuantumGizmoStyle style=default) |
static void | DrawGizmoPolygon2D (Transform transform, FPVector2[] vertices, Single height, bool drawNormals, Color color, QuantumGizmoStyle style=default) |
Draws a 2D polygon gizmo with the given parameters. More... | |
static void | DrawGizmoPolygon2D (Vector3 position, Quaternion rotation, FPVector2[] vertices, Single height, bool drawNormals, Color color, QuantumGizmoStyle style=default) |
Draws a 2D polygon gizmo in the scene. More... | |
static void | DrawGizmoPolygon2D (Vector3 position, Quaternion rotation, FPVector2[] vertices, Single height, Color color, QuantumGizmoStyle style=default) |
Draws a 2D polygon gizmo in the scene. More... | |
static void | DrawGizmosBox (Matrix4x4 matrix, Vector3 size, Color color, QuantumGizmoStyle style=default) |
Draws a box gizmo in the scene using the specified parameters. More... | |
static void | DrawGizmosBox (Transform transform, Vector3 size, Color color, Vector3 offset=default, QuantumGizmoStyle style=default) |
Draws a gizmo box in the scene using the specified parameters. More... | |
static void | DrawGizmosBox (Vector3 center, Vector3 size, Color color, Quaternion? rotation=null, QuantumGizmoStyle style=default) |
Draws a box gizmo with the given center, size, color, rotation, and style. More... | |
static void | DrawGizmosCapsule (Matrix4x4 matrix, float radius, float extent, Color color, QuantumGizmoStyle style=default) |
Draws a capsule gizmo in the Scene view using Handles. More... | |
static void | DrawGizmosCapsule (Vector3 center, float radius, float extent, Color color, Quaternion? rotation=null, QuantumGizmoStyle style=default) |
Draws a capsule Gizmo in 3D space. More... | |
static void | DrawGizmosCapsule2D (Vector3 center, float radius, float height, Color color, Quaternion? rotation=null, QuantumGizmoStyle style=default) |
Draws a 2D capsule gizmo. More... | |
static void | DrawGizmosCircle (Vector3 position, Single radius, Color color, Single height=0.0f, QuantumGizmoStyle style=default) |
Draws a gizmo circle at the specified position with the given radius and color. More... | |
static void | DrawGizmosEdge (Vector3 start, Vector3 end, float height, Color color, QuantumGizmoStyle style=default) |
Draws a gizmo edge from the specified start point to the end point. More... | |
static void | DrawGizmosSphere (Vector3 position, Single radius, Color color, QuantumGizmoStyle style=default) |
Draws a sphere gizmo in the scene. More... | |
static void | DrawGizmosTriangle (Vector3 A, Vector3 B, Vector3 C, Color color) |
Draws a triangle gizmo using the given vertices and color. More... | |
static void | DrawGizmoVector (Vector3 start, Vector3 end, float arrowHeadLength=DefaultArrowHeadLength, float arrowHeadAngle=DefaultArrowHeadAngle) |
Draws a vector gizmo from the specified start point to the specified end point. More... | |
static void | DrawGizmoVector3D (Vector3 start, Vector3 end, float arrowHeadLength=0.25f, float arrowHeadAngle=25.0f) |
Draws a 3D vector gizmo with an arrowhead from the specified start to end points. More... | |
Static Public Attributes | |
const float | DefaultArrowHeadAngle = 25.0f |
The default arrow head angle. More... | |
const float | DefaultArrowHeadLength = 0.25f |
The default arrow head length. More... | |
Utility class for drawing gizmos.
|
inlinestatic |
Adjusts the alpha channel of the color.
color | The color to adjust. |
a | The new alpha value. |
|
inlinestatic |
Adjusts the brightness of a color.
color | The color to adjust. |
brightness | The brightness value. Values greater than 1 will increase brightness, while values less than 1 will decrease brightness. |
|
inlinestatic |
Draws a gizmo box in the scene using the specified parameters.
transform | The transform of the gizmo box. |
size | The size of the gizmo box. |
color | The color of the gizmo box. |
offset | The offset position for the gizmo box (default: Vector3.zero). |
style | The gizmo style to apply (default: QuantumGizmoStyle default value). |
|
inlinestatic |
Draws a box gizmo with the given center, size, color, rotation, and style.
center | The center position of the box. |
size | The size of the box. |
color | The color of the box. |
rotation | The rotation of the box. Defaults to identity rotation if not provided. |
style | The style of the gizmo. Defaults to default style if not provided. |
|
inlinestatic |
Draws a 2D capsule gizmo.
center | The center of the capsule. |
radius | The radius of the capsule. |
height | The height of the capsule. |
color | The color of the gizmo. |
rotation | The rotation of the capsule. If null, identity rotation is used. |
style | The style of the gizmo. If not provided, default style is used. |
|
inlinestatic |
Draws a box gizmo in the scene using the specified parameters.
matrix | The matrix of the gizmo box. |
size | The size of the box. |
color | The color of the box. |
style | The style of the gizmo. (Optional) |
|
inlinestatic |
Draws a gizmo circle at the specified position with the given radius and color.
position | The position of the circle. |
radius | The radius of the circle. |
color | The color of the circle. |
height | The height of the circle. Default is 0.0. |
style | The style of the gizmo. Default is QuantumGizmoStyle's default value. |
|
inlinestatic |
Draws a sphere gizmo in the scene.
position | The position of the sphere. |
radius | The radius of the sphere. |
color | The color of the sphere. |
style | The style of the gizmo. |
|
inlinestatic |
Draws a triangle gizmo using the given vertices and color.
A | The first vertex of the triangle. |
B | The second vertex of the triangle. |
C | The third vertex of the triangle. |
color | The color of the triangle. |
|
inlinestatic |
Draws a grid of gizmos in the Unity editor.
bottomLeft | The bottom-left corner of the grid. |
width | The number of horizontal nodes in the grid. |
height | The number of vertical nodes in the grid. |
nodeSize | The size of each grid node. |
color | The color of the grid gizmos. |
|
inlinestatic |
Draw a grid of gizmos starting from a bottom-left position.
bottomLeft | The bottom-left position of the grid. |
width | The width of the grid in number of nodes. |
height | The height of the grid in number of nodes. |
nodeSize | The size of each individual node in the grid. |
color | The color of the grid gizmos. |
|
inlinestatic |
Draws a grid of gizmos in the scene.
bottomLeft | The bottom left corner of the grid. |
width | The number of columns in the grid. |
height | The number of rows in the grid. |
nodeWidth | The width of each grid node. |
nodeHeight | The height of each grid node. |
color | The color of the grid lines. |
|
inlinestatic |
Draws a 2D polygon gizmo in the scene.
position | The position of the polygon. |
rotation | The rotation of the polygon. |
vertices | The vertices of the polygon. |
height | The height of the polygon. |
color | The color of the polygon. |
style | The style of the gizmo. |
|
inlinestatic |
Draws a 2D polygon gizmo in the scene.
position | The position of the polygon. |
rotation | The rotation of the polygon. |
vertices | The array of vertices that define the polygon shape. |
height | The height of the polygon. |
drawNormals | Whether to draw normals for the polygon. |
color | The color of the polygon. |
style | The style of the gizmo. |
|
inlinestatic |
Draws a 2D polygon gizmo with the given parameters.
transform | The transform of the polygon. |
vertices | The vertices of the polygon. |
height | The height of the polygon. |
drawNormals | Whether to draw the polygon normal. |
color | The color of the polygon. |
style | The style of the gizmo. |
|
inlinestatic |
Draws a diamond gizmo with the given center and size.
center | The center position of the diamond. |
size | The size of the diamond. |
|
inlinestatic |
Draws a 3D vector gizmo with an arrowhead from the specified start to end points.
start | The starting point of the vector. |
end | The ending point of the vector. |
arrowHeadLength | The length of the arrowhead. |
arrowHeadAngle | The angle of the arrowhead. |
|
inlinestatic |
Draws a vector gizmo from the specified start point to the specified end point.
start | The starting point of the vector. |
end | The ending point of the vector. |
arrowHeadLength | The length of the arrow head (default is DefaultArrowHeadLength). |
arrowHeadAngle | The angle of the arrow head (default is DefaultArrowHeadAngle). |
|
inlinestatic |
Draws a gizmo arc in the Unity editor.
position | The position of the arc. |
normal | The normal vector of the arc. |
from | The starting direction vector of the arc. |
angle | The angle of the arc. |
radius | The radius of the arc. |
color | The color of the arc. |
alphaRatio | The alpha ratio of the arc. |
style | The style of the arc. |
|
inlinestatic |
Draws a gizmo disc at the specified position and orientation.
position | The position of the disc. |
normal | The orientation of the disc. |
radius | The radius of the disc. |
color | The color of the disc. |
alphaRatio | The alpha ratio for the disc's color. |
style | The style of the gizmo. |
|
inlinestatic |
Draws a gizmo edge from the specified start point to the end point.
start | The starting point of the edge. |
end | The ending point of the edge. |
height | The height of the edge. |
color | The color of the edge. |
style | The gizmo style to use. |
|
inlinestatic |
Draws a capsule Gizmo in 3D space.
center | The center position of the capsule. |
radius | The radius of the capsule. |
extent | The extent (length) of the capsule. |
color | The color of the capsule. |
rotation | The rotation of the capsule. If null, no rotation is applied. |
style | The style of the Gizmo. Defaults to QuantumGizmoStyle. |
|
inlinestatic |
Draws a capsule gizmo in the Scene view using Handles.
matrix | The matrix of the capsule. |
radius | The radius of the capsule. |
extent | The height extent of the capsule. |
color | The color of the capsule. |
style | Optional gizmo style. |
|
static |
The default arrow head length.
|
static |
The default arrow head angle.