class IMDraw
Properties
public static IMDrawZTest | IMDraw.ZTest | Set/get current draw mode to use specified Z testing. Only affects GL primitives, meshes and text meshes. |
Methods
public static void IMDraw.SetTarget (IMDrawCamera camera)
Set a camera as the draw target.
Parameters
Parameters
IMDrawCamera | camera | Target camera. |
public static void IMDraw.Flush ()
Flush draw commands on the current target camera.
public static void IMDraw.Flush (IMDrawCamera camera)
Flush draw commands for specified camera.
Parameters
Parameters
IMDrawCamera | camera | Target IMDrawCamera. |
public static void IMDraw.FlushAll ()
Flush all draw commands.
public static void IMDraw.SetDefaultZTest ()
Set current draw mode to use default Z testing (LEqual). Only affects GL primitives, meshes and text meshes.
public static void IMDraw.Line3D (Vector3 from, Vector3 to, Color color, float duration = 0)
Draw a 3D line.
Parameters
Parameters
Vector3 | from | Starting point of the line. |
Vector3 | to | Ending point of the line. |
Color | color | Line color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Line3D (Vector3 from, Vector3 to, Color fromColor, Color toColor, float duration = 0)
Draw a 3D line.
Parameters
Parameters
Vector3 | from | Starting point of the line. |
Vector3 | to | Ending point of the line. |
Color | fromColor | Color of line from the starting point. |
Color | toColor | Color of line from the ending point. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Ray3D (Ray ray, float length, Color color, float duration = 0)
Draw a 3D ray.
Parameters
Parameters
Ray | ray | Source ray. |
float | length | Length of line. |
Color | color | Ray color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Ray3D (Ray ray, float length, Color fromColor, Color toColor, float duration = 0)
Draw a 3D ray.
Parameters
Parameters
Ray | ray | Source ray. |
float | length | Length of line. |
Color | fromColor | Color of line from the starting point. |
Color | toColor | Color of line from the ending point. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Ray3D (Vector3 origin, Vector3 direction, float length, Color color, float duration = 0)
Draw a 3D ray.
Parameters
Parameters
Vector3 | origin | Origin of ray. |
Vector3 | direction | Direction of ray (assumed to be normalised). |
float | length | Length of line. |
Color | color | Ray color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Ray3D (Vector3 origin, Vector3 direction, float length, Color startColor, Color endColor, float duration = 0)
Draw a 3D ray.
Parameters
Parameters
Vector3 | origin | Origin of ray. |
Vector3 | direction | Direction of ray (assumed to be normalised). |
float | length | Length of line. |
Color | startColor | Color of line from starting point of the ray. |
Color | endColor | Color of line from ending point of the ray. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Quad3D (Vector3 center, Quaternion rotation, float sizeX, float sizeY, IMDrawAxis axis, Color color, float duration = 0)
Draw a 3D quad.
Parameters
Parameters
Vector3 | center | Quad center position. |
Quaternion | rotation | Quad rotation. |
float | sizeX | Width of quad. |
float | sizeY | Height of quad. |
IMDrawAxis | axis | Orientation axis of quad. |
Color | color | Quad color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.WireBox3D (Vector3 center, Vector3 size, Color color, float duration = 0)
Draw an axis aligned wireframe 3D box.
Parameters
Parameters
Vector3 | center | Box center position. |
Vector3 | size | Box extents. |
Color | color | Box color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.WireBox3D (Vector3 center, Quaternion rotation, Vector3 size, Color color, float duration = 0)
Draw a rotated wireframe 3D box.
Parameters
Parameters
Vector3 | center | Box center position. |
Quaternion | rotation | Box orientation. |
Vector3 | size | Box extents. |
Color | color | Box color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Box3D (Vector3 center, Vector3 size, Color color, float duration = 0)
Draw an axis aligned solid 3D box.
Parameters
Parameters
Vector3 | center | Box center position. |
Vector3 | size | Box extents. |
Color | color | Box color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Box3D (Vector3 center, Quaternion rotation, Vector3 size, Color color, float duration = 0)
Draw a rotated solid 3D box.
Parameters
Parameters
Vector3 | center | Box center position. |
Quaternion | rotation | Box orientation. |
Vector3 | size | Box extents. |
Color | color | Box color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.WirePyramid3D (Vector3 position, Quaternion rotation, float height, float width, IMDrawAxis axis, Color color, float duration = 0)
Draw a wireframe 3D pyramid.
Parameters
Parameters
Vector3 | position | Pyramid base position. |
Quaternion | rotation | Pyramid rotation. |
float | height | Pyramid height. |
float | width | Pyramid base width. |
IMDrawAxis | axis | Pyramid reference axis. |
Color | color | Pyramid color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Pyramid3D (Vector3 position, Quaternion rotation, float height, float width, IMDrawAxis axis, Color color, float duration = 0)
Draw a 3D pyramid.
Parameters
Parameters
Vector3 | position | Pyramid base position. |
Quaternion | rotation | Pyramid rotation. |
float | height | Pyramid height. |
float | width | Pyramid base width. |
IMDrawAxis | axis | Pyramid reference axis. |
Color | color | Pyramid color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.WireRhombus3D (Vector3 center, Quaternion rotation, float length, float width, IMDrawAxis axis, Color color, float duration = 0)
Draw a wireframe 3D rhombus.
Parameters
Parameters
Vector3 | center | Rhombus center. |
Quaternion | rotation | Rhombus rotation. |
float | length | Rhombus length. |
float | width | Rhombus width. |
IMDrawAxis | axis | Rhombus reference axis. |
Color | color | Rhombus color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Rhombus3D (Vector3 center, Quaternion rotation, float length, float width, IMDrawAxis axis, Color color, float duration = 0)
Draw a 3D rhombus.
Parameters
Parameters
Vector3 | center | Rhombus center. |
Quaternion | rotation | Rhombus rotation. |
float | length | Rhombus length. |
float | width | Rhombus width. |
IMDrawAxis | axis | Rhombus reference axis. |
Color | color | Rhombus color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Arc3D (Vector3 origin, Quaternion rotation, float radius, float sectorAngle, Color color, float duration = 0)
Draw a solid filled arc in the Y-axis.
Parameters
Parameters
Vector3 | origin | Arc origin. |
Quaternion | rotation | Arc rotation. |
float | radius | Arc radius. |
float | sectorAngle | Arc angle of sector, in degrees. |
Color | color | Arc color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Arc3D (Vector3 origin, Quaternion rotation, float innerRadius, float outerRadius, float directionAngle, float sectorAngle, Color color, float duration = 0)
Draw a solid filled arc in the Y-axis.
Parameters
Parameters
Vector3 | origin | Arc origin. |
Quaternion | rotation | Arc rotation. |
float | innerRadius | Arc inner radius. |
float | outerRadius | Arc outer radius. |
float | directionAngle | Arc angular direction (clockwise), in degrees. |
float | sectorAngle | Arc angle of sector, in degrees. |
Color | color | Arc color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.WireDisc3D (Vector3 origin, Quaternion rotation, float radius, IMDrawAxis axis, Color color, float duration = 0)
Draw a wireframe 3D disc.
Parameters
Parameters
Vector3 | origin | Disc origin. |
Quaternion | rotation | Disc orientation. |
float | radius | Disc radius. |
IMDrawAxis | axis | Orientation axis. |
Color | color | Disc color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Disc3D (Vector3 origin, Quaternion rotation, float radius, IMDrawAxis axis, Color color, float duration = 0)
Draw a solid 3D disc.
Parameters
Parameters
Vector3 | origin | Disc origin. |
Quaternion | rotation | Disc orientation. |
float | radius | Disc radius. |
IMDrawAxis | axis | Orientation axis. |
Color | color | Disc color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.WireSphere3D (Vector3 center, float radius, Color color, float duration = 0)
Draw a wireframe 3D sphere.
Parameters
Parameters
Vector3 | center | Sphere center. |
float | radius | Sphere radius. |
Color | color | Sphere color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.WireSphere3D (Vector3 center, Quaternion rotation, float radius, Color color, float duration = 0)
Draw a wireframe 3D sphere.
Parameters
Parameters
Vector3 | center | Sphere center. |
Quaternion | rotation | Sphere rotation. |
float | radius | Sphere radius. |
Color | color | Sphere color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Sphere3D (Vector3 center, float radius, Color color, float duration = 0)
Draw a solid 3D sphere.
Parameters
Parameters
Vector3 | center | Sphere center. |
float | radius | Sphere radius. |
Color | color | Sphere color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Sphere3D (Vector3 center, Quaternion rotation, float radius, Color color, float duration = 0)
Draw a solid 3D sphere.
Parameters
Parameters
Vector3 | center | Sphere center. |
Quaternion | rotation | Sphere rotation. |
float | radius | Sphere radius. |
Color | color | Sphere color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.WireEllipsoid3D (Vector3 center, Vector3 size, Color color, float duration = 0)
Draw a wireframe 3D ellipsoid.
Parameters
Parameters
Vector3 | center | Ellipsoid center. |
Vector3 | size | Ellipsoid size. |
Color | color | Ellipsoid color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.WireEllipsoid3D (Vector3 center, Quaternion rotation, Vector3 size, Color color, float duration = 0)
Draw a wireframe 3D ellipsoid.
Parameters
Parameters
Vector3 | center | Ellipsoid center. |
Quaternion | rotation | Ellipsoid rotation. |
Vector3 | size | Ellipsoid size. |
Color | color | Ellipsoid color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Ellipsoid3D (Vector3 center, Vector3 size, Color color, float duration = 0)
Draw a solid 3D ellipsoid.
Parameters
Parameters
Vector3 | center | Ellipsoid center. |
Vector3 | size | Ellipsoid size. |
Color | color | Ellipsoid color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Ellipsoid3D (Vector3 center, Quaternion rotation, Vector3 size, Color color, float duration = 0)
Draw a solid 3D ellipsoid.
Parameters
Parameters
Vector3 | center | Ellipsoid center. |
Quaternion | rotation | Ellipsoid rotation. |
Vector3 | size | Ellipsoid size. |
Color | color | Ellipsoid color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.WireCone3D (Vector3 position, Quaternion rotation, float height, float width, IMDrawAxis axis, Color color, float duration = 0)
Draw a wireframe 3D cone.
Parameters
Parameters
Vector3 | position | Cone position (origin is located at the base). |
Quaternion | rotation | Cone rotation. |
float | height | Cone height. |
float | width | Cone base width. |
IMDrawAxis | axis | Cone reference axis. |
Color | color | Cone color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.WireCone3D (Vector3 origin, Vector3 direction, float length, float angle, Color color, float duration = 0)
Draw a wireframe 3D cone.
Parameters
Parameters
Vector3 | origin | Cone start position. |
Vector3 | direction | Cone direction (assumes direction is normalized). |
float | length | Cone length. |
float | angle | Cone spread angle (in degrees). |
Color | color | Cone color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Cone3D (Vector3 position, Quaternion rotation, float height, float width, IMDrawAxis axis, Color color, float duration = 0)
Draw a 3D cone.
Parameters
Parameters
Vector3 | position | Cone position (origin is located at the base). |
Quaternion | rotation | Cone rotation. |
float | height | Cone height. |
float | width | Cone base width. |
IMDrawAxis | axis | Cone reference axis. |
Color | color | Cone color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Cone3D (Vector3 origin, Vector3 direction, float length, float angle, Color color, float duration = 0)
Draw a 3D cone.
Parameters
Parameters
Vector3 | origin | Cone start position. |
Vector3 | direction | Cone direction (assumes direction is normalized). |
float | length | Cone length. |
float | angle | Cone spread angle (in degrees). |
Color | color | Cone color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.WireCapsule3D (Vector3 center, Quaternion rotation, float height, float radius, IMDrawAxis axis, Color color, float duration = 0)
Draw a wireframe 3D capsule.
Parameters
Parameters
Vector3 | center | Capsule center. |
Quaternion | rotation | Capsule rotation. |
float | height | Capsule height. |
float | radius | Capsule radius. |
IMDrawAxis | axis | Capsule reference axis. |
Color | color | Capsule color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Capsule3D (Vector3 center, Quaternion rotation, float height, float radius, IMDrawAxis axis, Color color, float duration = 0)
Draw a solid 3D capsule.
Parameters
Parameters
Vector3 | center | Capsule center. |
Quaternion | rotation | Capsule rotation. |
float | height | Capsule height. |
float | radius | Capsule radius. |
IMDrawAxis | axis | Capsule reference axis. |
Color | color | Capsule color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.WireCylinder3D (Vector3 center, Quaternion rotation, float height, float radius, IMDrawAxis axis, Color color, float duration = 0)
Draw a wireframe 3D cylinder.
Parameters
Parameters
Vector3 | center | Cylinder center. |
Quaternion | rotation | Cylinder rotation. |
float | height | Cylinder height. |
float | radius | Cylinder radius. |
IMDrawAxis | axis | Cylinder reference axis. |
Color | color | Cylinder color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Cylinder3D (Vector3 center, Quaternion rotation, float height, float radius, IMDrawAxis axis, Color color, float duration = 0)
Draw a solid 3D cylinder.
Parameters
Parameters
Vector3 | center | Cylinder center. |
Quaternion | rotation | Cylinder rotation. |
float | height | Cylinder height. |
float | radius | Cylinder radius. |
IMDrawAxis | axis | Cylinder reference axis. |
Color | color | Cylinder color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Axis3D (Vector3 origin, Quaternion rotation, float length, float alpha, float duration = 0)
Draw a 3-dimensional axis (X-axis=red, Y-axis=green, Z-axis=blue).
Parameters
Parameters
Vector3 | origin | Axis origin. |
Quaternion | rotation | Axis rotation. |
float | length | Length of axis lines. |
float | alpha | Axis transparency. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Axis3D (Vector3 origin, Quaternion rotation, Vector3 length, float alpha, float duration = 0)
Draw a 3-dimensional axis (X-axis=red, Y-axis=green, Z-axis=blue).
Parameters
Parameters
Vector3 | origin | Axis origin. |
Quaternion | rotation | Axis rotation. |
Vector3 | length | Extents of axis lines. |
float | alpha | Axis transparency. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Grid3D (Vector3 origin, Quaternion rotation, float extentX, float extentY, int cellsX, int cellsY, IMDrawAxis axis, Color color, float duration = 0)
Draw a 3D grid in a specified plane.
Parameters
Parameters
Vector3 | origin | Grid origin. |
Quaternion | rotation | Grid orientation. |
float | extentX | Grid width. |
float | extentY | Grid height. |
int | cellsX | Number of cells along the width. |
int | cellsY | Number of cells along the height. |
IMDrawAxis | axis | The reference plane for the grid. |
Color | color | Grid color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Grid3D (Vector3 origin, Quaternion rotation, float extentX, float extentY, int cellsX, int cellsY, Color color, float duration = 0)
Draw a 3D grid in the X/Z plane.
Parameters
Parameters
Vector3 | origin | Grid origin. |
Quaternion | rotation | Grid orientation. |
float | extentX | Grid width. |
float | extentY | Grid height. |
int | cellsX | Number of cells along the width. |
int | cellsY | Number of cells along the height. |
Color | color | Grid color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.GridPoint3D (Vector3 origin, Quaternion rotation, float extents, Color color, float duration = 0)
Draw a 3D grid point.
Parameters
Parameters
Vector3 | origin | Grid point origin. |
Quaternion | rotation | Grid point orientation. |
float | extents | Grid point extents. |
Color | color | Grid point colour. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.GridPoint3D (Vector3 origin, Quaternion rotation, Vector3 extents, Color color, float duration = 0)
Draw a 3D grid point.
Parameters
Parameters
Vector3 | origin | Grid point origin. |
Quaternion | rotation | Grid point orientation. |
Vector3 | extents | Grid point XYZ extents. |
Color | color | Grid point colour. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Bounds (Bounds bounds, Color color)
Draw 3D bounds (an axis aligned box).
Parameters
Parameters
Bounds | bounds | Bounds that specifies a position and extents. |
Color | color | Bounds color. |
public static void IMDraw.Bounds (Renderer renderer, Color color)
Draw the 3D bounds for a renderer (note: only draws bounds if renderer is visible).
Parameters
Parameters
Renderer | renderer | Renderer whose bounds will be drawn. |
Color | color | Bounds color. |
public static void IMDraw.Collider (SphereCollider sphereCollider, Color color, float scaleOffset, bool solid)
Draw a sphere collider shape.
Parameters
Parameters
SphereCollider | sphereCollider | Target SphereCollider object. |
Color | color | Sphere color. |
float | scaleOffset | Specify a scale offset (0=no scale change). Useful for situations where the visualisation overlaps geometry. |
bool | solid | Specify if a solid shape should be drawn. |
public static void IMDraw.Collider (BoxCollider boxCollider, Color color, float scaleOffset, bool solid)
Draw a box collider shape.
Parameters
Parameters
BoxCollider | boxCollider | Target BoxCollider object. |
Color | color | Box color. |
float | scaleOffset | Specify a scale offset (0=no scale change). Useful for situations where the visualisation overlaps geometry. |
bool | solid | Specify if a solid shape should be drawn. |
public static void IMDraw.Collider (CapsuleCollider capsuleCollider, Color color, float scaleOffset, bool solid)
Draw a capsule collider shape.
Parameters
Parameters
CapsuleCollider | capsuleCollider | CapsuleCollider object. |
Color | color | Capsule color. |
float | scaleOffset | Specify a scale offset (0=no scale change). Useful for situations where the visualisation overlaps geometry. |
bool | solid | Specify if a solid shape should be drawn. |
public static void IMDraw.Collider (WheelCollider wheelCollider, Color color, float scaleOffset, bool solid)
Draw a wheel collider shape.
Parameters
Parameters
WheelCollider | wheelCollider | WheelCollider object. |
Color | color | Wheel collider color. |
float | scaleOffset | Specify a scale offset (0=no scale change). Useful for situations where the visualisation overlaps geometry. |
bool | solid | Specify if a solid shape should be drawn. |
public static void IMDraw.Collider (MeshCollider meshCollider, Color color, float scaleOffset)
Draw a mesh collider shape. Note: wireframe not currently supported.
Parameters
Parameters
MeshCollider | meshCollider | MeshCollider object. |
Color | color | Mesh color. |
float | scaleOffset | Specify a scale offset (0=no scale change). Useful for situations where the visualisation overlaps geometry. |
public static void IMDraw.Collider (Collider collider, Color color, float scaleOffset, bool solid)
Draw a collider shape.
Parameters
Parameters
Collider | collider | Collider object. |
Color | color | Mesh color. |
float | scaleOffset | Specify a scale offset (0=no scale change). Useful for situations where the visualisation overlaps geometry. |
bool | solid | Specify if a solid shape should be drawn. Note: MeshCollider always drawn as solid, wireframe not currently supported. |
public static void IMDraw.Mesh (Mesh mesh, Vector3 position, Quaternion rotation, Color color, float duration = 0)
Draw a mesh.
Parameters
Parameters
Mesh | mesh | Mesh object. |
Vector3 | position | Mesh position. |
Quaternion | rotation | Mesh rotation. |
Color | color | Mesh color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Mesh (Mesh mesh, Vector3 position, Quaternion rotation, Vector3 scale, Color color, float duration = 0)
Draw a mesh.
Parameters
Parameters
Mesh | mesh | Mesh object. |
Vector3 | position | Mesh position. |
Quaternion | rotation | Mesh rotation. |
Vector3 | scale | Mesh scale. |
Color | color | Mesh color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Spotlight (Light light, Color wireFrameColor, Color solidColour)
Draw the coverage volume of a spotlight.
Parameters
Parameters
Light | light | Source spotlight. |
Color | wireFrameColor | Wireframe color. |
Color | solidColour | Solid color. |
public static void IMDraw.Frustum (Camera camera, Color color)
Draw a wireframe representation a camera's view frustum.
Parameters
Parameters
Camera | camera | Source camera. |
Color | color | Frustum color. |
public static void IMDraw.Label (float x, float y, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 2D label. [Not VR compatible]
Parameters
Parameters
float | x | Screen X position. |
float | y | Screen Y position. |
Color | color | Label color. |
LabelPivot | pivot | Label rectangle pivot. |
LabelAlignment | alignment | Label text alignment. |
string | label | Label text. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Label (float x, float y, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 2D label.
Parameters
Parameters
float | x | Screen X position. |
float | y | Screen Y position. |
Color | color | Label color. |
int | fontSize | Font size. |
LabelPivot | pivot | Label rectangle pivot. |
LabelAlignment | alignment | Label text alignment. |
string | label | Label text. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.LabelShadowed (float x, float y, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 2D label with a drop shadow.
Parameters
Parameters
float | x | Screen X position. |
float | y | Screen Y position. |
Color | color | Label color. |
LabelPivot | pivot | Label rectangle pivot. |
LabelAlignment | alignment | Label text alignment. |
string | label | Label text. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.LabelShadowed (float x, float y, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 2D label with a drop shadow.
Parameters
Parameters
float | x | Screen X position. |
float | y | Screen Y position. |
Color | color | Label color. |
int | fontSize | Font size. |
LabelPivot | pivot | Label rectangle pivot. |
LabelAlignment | alignment | Label text alignment. |
string | label | Label text. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Label (Vector3 position, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 3D label.
Parameters
Parameters
Vector3 | position | Label 3D position. |
Color | color | Label color. |
LabelPivot | pivot | Label rectangle pivot. |
LabelAlignment | alignment | Label text alignment. |
string | label | Label text. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Label (Vector3 position, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 3D label.
Parameters
Parameters
Vector3 | position | Label 3D position. |
Color | color | Label color. |
int | fontSize | Font size. |
LabelPivot | pivot | Label rectangle pivot. |
LabelAlignment | alignment | Label text alignment. |
string | label | Label text. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.LabelShadowed (Vector3 position, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 3D label with a drop shadow.
Parameters
Parameters
Vector3 | position | Label 3D position. |
Color | color | Label color. |
LabelPivot | pivot | Label rectangle pivot. |
LabelAlignment | alignment | Label text alignment. |
string | label | Label text. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.LabelShadowed (Vector3 position, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 3D label with a drop shadow.
Parameters
Parameters
Vector3 | position | Label 3D position. |
Color | color | Label color. |
int | fontSize | Font size. |
LabelPivot | pivot | Label rectangle pivot. |
LabelAlignment | alignment | Label text alignment. |
string | label | Label text. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Label (Vector3 position, float positionOffsetX, float positionOffsetY, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 3D label.
Parameters
Parameters
Vector3 | position | Label 3D position. |
float | positionOffsetX | Specifies an additional screen X position offset. |
float | positionOffsetY | Specifies an additional screen Y position offset. |
Color | color | Label color. |
LabelPivot | pivot | Label rectangle pivot. |
LabelAlignment | alignment | Label text alignment. |
string | label | Label text. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Label (Vector3 position, float positionOffsetX, float positionOffsetY, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 3D label.
Parameters
Parameters
Vector3 | position | Label 3D position. |
float | positionOffsetX | Specifies an additional screen X position offset. |
float | positionOffsetY | Specifies an additional screen Y position offset. |
Color | color | Label color. |
int | fontSize | Font size. |
LabelPivot | pivot | Label rectangle pivot. |
LabelAlignment | alignment | Label text alignment. |
string | label | Label text. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.LabelShadowed (Vector3 position, float positionOffsetX, float positionOffsetY, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 3D label with a drop shadow.
Parameters
Parameters
Vector3 | position | Label 3D position. |
float | positionOffsetX | Specifies an additional screen X position offset. |
float | positionOffsetY | Specifies an additional screen Y position offset. |
Color | color | Label color. |
LabelPivot | pivot | Label rectangle pivot. |
LabelAlignment | alignment | Label text alignment. |
string | label | Label text. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.LabelShadowed (Vector3 position, float positionOffsetX, float positionOffsetY, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 3D label with a drop shadow.
Parameters
Parameters
Vector3 | position | Label 3D position. |
float | positionOffsetX | Specifies an additional screen X position offset. |
float | positionOffsetY | Specifies an additional screen Y position offset. |
Color | color | Label color. |
int | fontSize | Font size. |
LabelPivot | pivot | Label rectangle pivot. |
LabelAlignment | alignment | Label text alignment. |
string | label | Label text. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.RectangleOutline2D (Rect rect, Color color, float duration = 0)
Draw a 2D rectangle outline.
Parameters
Parameters
Rect | rect | Screen space position, width and height of the rectangle. |
Color | color | Outline color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.RectangleFilled2D (Rect rect, Color color, float duration = 0)
Draw a filled 2D rectangle.
Parameters
Parameters
Rect | rect | Screen space position, width and height of the rectangle. |
Color | color | Fill color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Rectangle2D (Rect rect, Color fillColor, Color outlineColor, float duration = 0)
Draw a 2D rectangle.
Parameters
Parameters
Rect | rect | Screen space position, width and height of the rectangle. |
Color | fillColor | Fill color. |
Color | outlineColor | Outline color. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Image2D (Texture2D texture, Rect rect, Color color, float duration = 0)
Draw a 2D image.
Parameters
Parameters
Texture2D | texture | Source texture. |
Rect | rect | Screen space position, width and height of the rectangle. |
Color | color | Image color tint. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Image2D (Texture2D texture, Rect rect, Rect texCoord, Color color, float duration = 0)
Draw a 2D image.
Parameters
Parameters
Texture2D | texture | Source texture. |
Rect | rect | Screen space position, width and height of the rectangle. |
Rect | texCoord | UV coordinates. |
Color | color | Image color tint. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.Image2D (Texture2D texture, Rect rect, ScaleMode scaleMode, float aspect, Color color, float duration = 0)
Draw a 2D image.
Parameters
Parameters
Texture2D | texture | Source texture. |
Rect | rect | Screen space position, width and height of the rectangle. |
ScaleMode | scaleMode | Texture scaling mode. |
float | aspect | Aspect ratio to use for the source image. If 0 (the default), the aspect ratio from the image is used. Pass in w/h for the desired aspect ratio. |
Color | color | Image color tint. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.TextMeshBillboard (Vector3 position, float scale, Color color, string label, float duration = 0)
Draw a billboard text mesh. The text mesh will always face the camera.
Parameters
Parameters
Vector3 | position | Text mesh 3D position |
float | scale | Text mesh scale. |
Color | color | Text mesh color. |
string | label | Text for the text mesh. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.TextMeshBillboard (Vector3 position, float scale, Color color, TextAlignment alignment, TextAnchor anchor, string label, float duration = 0)
Draw a billboard text mesh. The text mesh will always face the camera.
Parameters
Parameters
Vector3 | position | Text mesh 3D position |
float | scale | Text mesh scale. |
Color | color | Text mesh color. |
TextAlignment | alignment | How lines of text are aligned (Left, Right, Center) |
TextAnchor | anchor | The pivot position of the text mesh. |
string | label | Text for the text mesh. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.TextMeshBillboard (Vector3 position, float widthScale, float heightScale, Color color, string label, float duration = 0)
Draw a billboard text mesh. The text mesh will always face the camera.
Parameters
Parameters
Vector3 | position | Text mesh 3D position. |
float | widthScale | Text mesh width scale. |
float | heightScale | Text mesh height scale. |
Color | color | Text mesh color. |
string | label | Text for the text mesh. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.TextMeshBillboard (Vector3 position, float widthScale, float heightScale, Color color, TextAlignment alignment, TextAnchor anchor, string label, float duration = 0)
Draw a billboard text mesh. The text mesh will always face the camera.
Parameters
Parameters
Vector3 | position | Text mesh 3D position. |
float | widthScale | Text mesh width scale. |
float | heightScale | Text mesh height scale. |
Color | color | Text mesh color. |
TextAlignment | alignment | How lines of text are aligned (Left, Right, Center) |
TextAnchor | anchor | The pivot position of the text mesh. |
string | label | Text for the text mesh. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.TextMeshBillboard (Vector3 position, float scale, Color color, bool fixedScale, string label, float duration = 0)
Draw a billboard text mesh. The text mesh will always face the camera.
Parameters
Parameters
Vector3 | position | Text mesh 3D position. |
float | scale | Text mesh scale. |
Color | color | Text mesh color. |
bool | fixedScale | Maintain screen space scale. |
string | label | Text for the text mesh. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.TextMeshBillboard (Vector3 position, float scale, Color color, TextAlignment alignment, TextAnchor anchor, bool fixedScale, string label, float duration = 0)
Draw a billboard text mesh. The text mesh will always face the camera.
Parameters
Parameters
Vector3 | position | Text mesh 3D position. |
float | scale | Text mesh scale. |
Color | color | Text mesh color. |
TextAlignment | alignment | How lines of text are aligned (Left, Right, Center) |
TextAnchor | anchor | The pivot position of the text mesh. |
bool | fixedScale | Maintain screen space scale. |
string | label | Text for the text mesh. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.TextMesh (Vector3 position, Quaternion rotation, float scale, Color color, string label, float duration = 0)
Draw a 3D text mesh.
Parameters
Parameters
Vector3 | position | Text mesh 3D position. |
Quaternion | rotation | Text mesh rotation. |
float | scale | Text mesh scale. |
Color | color | Text mesh color. |
string | label | Text for the text mesh. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.TextMesh (Vector3 position, Quaternion rotation, float scale, Color color, TextAlignment alignment, TextAnchor anchor, string label, float duration = 0)
Draw a 3D text mesh.
Parameters
Parameters
Vector3 | position | Text mesh 3D position. |
Quaternion | rotation | Text mesh rotation. |
float | scale | Text mesh scale. |
Color | color | Text mesh color. |
TextAlignment | alignment | How lines of text are aligned (Left, Right, Center) |
TextAnchor | anchor | The pivot position of the text mesh. |
string | label | Text for the text mesh. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.TextMesh (Vector3 position, Quaternion rotation, float widthScale, float heightScale, Color color, string label, float duration = 0)
Draw a 3D text mesh.
Parameters
Parameters
Vector3 | position | Text mesh 3D position. |
Quaternion | rotation | Text mesh rotation. |
float | widthScale | Text mesh width scale. |
float | heightScale | Text mesh height scale. |
Color | color | Text mesh color. |
string | label | Text for the text mesh. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
public static void IMDraw.TextMesh (Vector3 position, Quaternion rotation, float widthScale, float heightScale, Color color, TextAlignment alignment, TextAnchor anchor, string label, float duration = 0)
Draw a 3D text mesh.
Parameters
Parameters
Vector3 | position | Text mesh 3D position. |
Quaternion | rotation | Text mesh rotation. |
float | widthScale | Text mesh width scale. |
float | heightScale | Text mesh height scale. |
Color | color | Text mesh color. |
TextAlignment | alignment | How lines of text are aligned (Left, Right, Center) |
TextAnchor | anchor | The pivot position of the text mesh. |
string | label | Text for the text mesh. |
float | duration = 0 | Draw duration (in seconds). If this is zero, it will draw for only a single frame. |
class IMGizmos
Properties
public static IMDrawZTest | IMGizmos.ZTest | Set/get current draw mode to use specified Z testing. Only affects mesh primitives. |
Methods
public static void IMGizmos.SetDefaultZTest ()
Set current draw mode to use default Z testing (LEqual). Only affects mesh primitives.
public static void IMGizmos.Line3D (Vector3 from, Vector3 to, Color color)
Draw a 3D line.
Parameters
Parameters
Vector3 | from | Starting point of the line. |
Vector3 | to | Ending point of the line. |
Color | color | Line color. |
public static void IMGizmos.Ray3D (Ray ray, float length, Color color)
Draw a 3D ray.
Parameters
Parameters
Ray | ray | Source ray. |
float | length | Length of line. |
Color | color | Ray color. |
public static void IMGizmos.Ray3D (Vector3 origin, Vector3 direction, float length, Color color)
Draw a 3D ray.
Parameters
Parameters
Vector3 | origin | Origin of ray. |
Vector3 | direction | Direction of ray (assumed to be normalised). |
float | length | Length of line. |
Color | color | Ray color. |
public static void IMGizmos.Ray3D (Vector3 origin, Quaternion rotation, float length, Color color)
Draw a 3D ray.
Parameters
Parameters
Vector3 | origin | Origin of ray. |
Quaternion | rotation | Ray orientation. |
float | length | Ray length. |
Color | color | Ray color. |
public static void IMGizmos.WireQuad3D (Vector3 center, Quaternion rotation, float sizeX, float sizeY, GizmoDrawAxis axis, Color color)
Draw a wireframe 3D quad.
Parameters
Parameters
Vector3 | center | Quad center position. |
Quaternion | rotation | Quad rotation. |
float | sizeX | Width of quad. |
float | sizeY | Height of quad. |
GizmoDrawAxis | axis | Orientation axis of quad. |
Color | color | Quad color. |
public static void IMGizmos.Quad3D (Vector3 center, Quaternion rotation, float sizeX, float sizeY, GizmoDrawAxis axis, Color color)
Draw a 3D quad.
Parameters
Parameters
Vector3 | center | Quad center position. |
Quaternion | rotation | Quad rotation. |
float | sizeX | Width of quad. |
float | sizeY | Height of quad. |
GizmoDrawAxis | axis | Orientation axis of quad. |
Color | color | Quad color. |
public static void IMGizmos.Quad3D (Vector3 center, Quaternion rotation, float sizeX, float sizeY, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
Draw a 3D quad.
Parameters
Parameters
Vector3 | center | Quad center position. |
Quaternion | rotation | Quad rotation. |
float | sizeX | Width of quad. |
float | sizeY | Height of quad. |
GizmoDrawAxis | axis | Orientation axis of quad. |
Color | solidColor | Quad fill color. |
Color | wireframeColor | Quad wireframe color. |
public static void IMGizmos.WireBox3D (Vector3 center, Quaternion rotation, Vector3 size, Color color)
Draw a wireframe 3D box.
Parameters
Parameters
Vector3 | center | Box center position. |
Quaternion | rotation | Box orientation. |
Vector3 | size | Box extents. |
Color | color | Box color. |
public static void IMGizmos.Box3D (Vector3 center, Quaternion rotation, Vector3 size, Color color)
Draw a 3D box.
Parameters
Parameters
Vector3 | center | Box center position. |
Quaternion | rotation | Box orientation. |
Vector3 | size | Box extents. |
Color | color | Box color. |
public static void IMGizmos.Box3D (Vector3 center, Quaternion rotation, Vector3 size, Color solidColor, Color wireframeColor)
Draw a 3D box.
Parameters
Parameters
Vector3 | center | Box center position. |
Quaternion | rotation | Box orientation. |
Vector3 | size | Box extents. |
Color | solidColor | Box fill color. |
Color | wireframeColor | Box wireframe color. |
public static void IMGizmos.WirePyramid3D (Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color color)
Draw a wireframe 3D pyramid.
Parameters
Parameters
Vector3 | position | Pyramid base position. |
Quaternion | rotation | Pyramid rotation. |
float | height | Pyramid height. |
float | width | Pyramid base width. |
GizmoDrawAxis | axis | Pyramid reference axis. |
Color | color | Pyramid color. |
public static void IMGizmos.Pyramid3D (Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color color)
Draw a 3D pyramid.
Parameters
Parameters
Vector3 | position | Pyramid base position. |
Quaternion | rotation | Pyramid rotation. |
float | height | Pyramid height. |
float | width | Pyramid base width. |
GizmoDrawAxis | axis | Pyramid reference axis. |
Color | color | Pyramid color. |
public static void IMGizmos.Pyramid3D (Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
Draw a 3D pyramid.
Parameters
Parameters
Vector3 | position | Pyramid base position. |
Quaternion | rotation | Pyramid rotation. |
float | height | Pyramid height. |
float | width | Pyramid base width. |
GizmoDrawAxis | axis | Pyramid reference axis. |
Color | solidColor | Pyramid fill color. |
Color | wireframeColor | Pyramid wireframe color. |
public static void IMGizmos.WireRhombus3D (Vector3 center, Quaternion rotation, float length, float width, GizmoDrawAxis axis, Color color)
Draw a wireframe 3D rhombus.
Parameters
Parameters
Vector3 | center | Rhombus center. |
Quaternion | rotation | Rhombus rotation. |
float | length | Rhombus length. |
float | width | Rhombus width. |
GizmoDrawAxis | axis | Rhombus reference axis. |
Color | color | Rhombus color. |
public static void IMGizmos.Rhombus3D (Vector3 center, Quaternion rotation, float length, float width, GizmoDrawAxis axis, Color color)
Draw a 3D rhombus.
Parameters
Parameters
Vector3 | center | Rhombus center. |
Quaternion | rotation | Rhombus rotation. |
float | length | Rhombus length. |
float | width | Rhombus width. |
GizmoDrawAxis | axis | Rhombus reference axis. |
Color | color | Rhombus color. |
public static void IMGizmos.Rhombus3D (Vector3 center, Quaternion rotation, float length, float width, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
Draw a 3D rhombus.
Parameters
Parameters
Vector3 | center | Rhombus center. |
Quaternion | rotation | Rhombus rotation. |
float | length | Rhombus length. |
float | width | Rhombus width. |
GizmoDrawAxis | axis | Rhombus reference axis. |
Color | solidColor | Rhombus fill color. |
Color | wireframeColor | Rhombus wireframe color. |
public static void IMGizmos.Arc3D (Vector3 center, Quaternion rotation, float radius, float sectorAngle, Color color)
Draw a solid filled arc in the Y-axis.
Parameters
Parameters
Vector3 | center | Arc center. |
Quaternion | rotation | Arc rotation. |
float | radius | Arc radius. |
float | sectorAngle | Arc angle of sector, in degrees. |
Color | color | Arc color. |
public static void IMGizmos.Arc3D (Vector3 center, Quaternion rotation, float innerRadius, float outerRadius, float directionAngle, float sectorAngle, Color color)
Draw a solid filled arc in the Y-axis.
Parameters
Parameters
Vector3 | center | Arc center. |
Quaternion | rotation | Arc rotation. |
float | innerRadius | Arc inner radius. |
float | outerRadius | Arc outer radius. |
float | directionAngle | Arc angular direction (clockwise), in degrees. |
float | sectorAngle | Arc angle of sector, in degrees. |
Color | color | Arc color. |
public static void IMGizmos.WireDisc3D (Vector3 origin, Quaternion rotation, float radius, GizmoDrawAxis axis, Color color)
Draw a wireframe 3D disc.
Parameters
Parameters
Vector3 | origin | Disc origin. |
Quaternion | rotation | Disc orientation. |
float | radius | Disc radius. |
GizmoDrawAxis | axis | Disc reference axis. |
Color | color | Disc color. |
public static void IMGizmos.Disc3D (Vector3 origin, Quaternion rotation, float radius, GizmoDrawAxis axis, Color color)
Draw a 3D disc.
Parameters
Parameters
Vector3 | origin | Disc origin. |
Quaternion | rotation | Disc orientation. |
float | radius | Disc radius. |
GizmoDrawAxis | axis | Disc reference axis. |
Color | color | Disc color. |
public static void IMGizmos.Disc3D (Vector3 origin, Quaternion rotation, float radius, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
Draw a 3D disc.
Parameters
Parameters
Vector3 | origin | Disc origin. |
Quaternion | rotation | Disc orientation. |
float | radius | Disc radius. |
GizmoDrawAxis | axis | Disc reference axis. |
Color | solidColor | Disc fill color. |
Color | wireframeColor | Disc wireframe color. |
public static void IMGizmos.WireSphere3D (Vector3 center, Quaternion rotation, float radius, Color color)
Draw a wireframe 3D sphere.
Parameters
Parameters
Vector3 | center | Sphere center. |
Quaternion | rotation | Sphere radius. |
float | radius | Sphere radius. |
Color | color | Sphere color. |
public static void IMGizmos.Sphere3D (Vector3 center, float radius, Color color)
Draw a 3D sphere.
Parameters
Parameters
Vector3 | center | Sphere center. |
float | radius | Sphere radius. |
Color | color | Sphere color. |
public static void IMGizmos.Sphere3D (Vector3 center, Quaternion rotation, float radius, Color color)
Draw a 3D sphere.
Parameters
Parameters
Vector3 | center | Sphere center. |
Quaternion | rotation | Sphere radius. |
float | radius | Sphere radius. |
Color | color | Sphere color. |
public static void IMGizmos.Sphere3D (Vector3 center, Quaternion rotation, float radius, Color solidColor, Color wireframeColor)
Draw a 3D sphere.
Parameters
Parameters
Vector3 | center | Sphere center. |
Quaternion | rotation | Sphere radius. |
float | radius | Sphere radius. |
Color | solidColor | Sphere fill color. |
Color | wireframeColor | Sphere wireframe color. |
public static void IMGizmos.WireEllipsoid3D (Vector3 center, Quaternion rotation, Vector3 extents, Color color)
Draw a wireframe 3D ellipsoid.
Parameters
Parameters
Vector3 | center | Ellipsoid center. |
Quaternion | rotation | Ellipsoid rotation. |
Vector3 | extents | Ellipsoid size. |
Color | color | Ellipsoid color. |
public static void IMGizmos.Ellipsoid3D (Vector3 center, Quaternion rotation, Vector3 extents, Color color)
Draw a 3D ellipsoid.
Parameters
Parameters
Vector3 | center | Ellipsoid center. |
Quaternion | rotation | Ellipsoid rotation. |
Vector3 | extents | Ellipsoid size. |
Color | color | Ellipsoid color. |
public static void IMGizmos.Ellipsoid3D (Vector3 center, Quaternion rotation, Vector3 extents, Color solidColor, Color wireframeColor)
Draw a 3D ellipsoid.
Parameters
Parameters
Vector3 | center | Ellipsoid center. |
Quaternion | rotation | Ellipsoid rotation. |
Vector3 | extents | Ellipsoid size. |
Color | solidColor | Ellipsoid fill color. |
Color | wireframeColor | Ellipsoid wireframe color. |
public static void IMGizmos.WireCone3D (Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color color)
Draw a wireframe 3D cone.
Parameters
Parameters
Vector3 | position | Cone position (origin is located at the base). |
Quaternion | rotation | Cone rotation. |
float | height | Cone height. |
float | width | Cone base width. |
GizmoDrawAxis | axis | Cone reference axis. |
Color | color | Cone color. |
public static void IMGizmos.Cone3D (Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color color)
Draw a 3D cone.
Parameters
Parameters
Vector3 | position | Cone position (origin is located at the base). |
Quaternion | rotation | Cone rotation. |
float | height | Cone height. |
float | width | Cone base width. |
GizmoDrawAxis | axis | Cone reference axis. |
Color | color | Cone color. |
public static void IMGizmos.Cone3D (Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
Draw a 3D cone.
Parameters
Parameters
Vector3 | position | Cone position (origin is located at the base). |
Quaternion | rotation | Cone rotation. |
float | height | Cone height. |
float | width | Cone base width. |
GizmoDrawAxis | axis | Cone reference axis. |
Color | solidColor | Cone fill color. |
Color | wireframeColor | Cone wireframe color. |
public static void IMGizmos.WireCapsule3D (Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color color)
Draw a wireframe 3D capsule.
Parameters
Parameters
Vector3 | center | Capsule center. |
Quaternion | rotation | Capsule rotation. |
float | height | Capsule height. |
float | radius | Capsule radius. |
GizmoDrawAxis | axis | Capsule reference axis. |
Color | color | Capsule color. |
public static void IMGizmos.Capsule3D (Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color color)
Draw a 3D capsule.
Parameters
Parameters
Vector3 | center | Capsule center. |
Quaternion | rotation | Capsule rotation. |
float | height | Capsule height. |
float | radius | Capsule radius. |
GizmoDrawAxis | axis | Capsule reference axis. |
Color | color | Capsule color. |
public static void IMGizmos.Capsule3D (Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
Draw a 3D capsule.
Parameters
Parameters
Vector3 | center | Capsule center. |
Quaternion | rotation | Capsule rotation. |
float | height | Capsule height. |
float | radius | Capsule radius. |
GizmoDrawAxis | axis | Capsule reference axis. |
Color | solidColor | Capsule fill color. |
Color | wireframeColor | Capsule wireframe color. |
public static void IMGizmos.WireCylinder3D (Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color color)
Draw a wireframe 3D cylinder.
Parameters
Parameters
Vector3 | center | Cylinder center. |
Quaternion | rotation | Cylinder rotation. |
float | height | Cylinder height. |
float | radius | Cylinder radius. |
GizmoDrawAxis | axis | Cylinder reference axis. |
Color | color | Cylinder color. |
public static void IMGizmos.Cylinder3D (Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color color)
Draw a 3D cylinder.
Parameters
Parameters
Vector3 | center | Cylinder center. |
Quaternion | rotation | Cylinder rotation. |
float | height | Cylinder height. |
float | radius | Cylinder radius. |
GizmoDrawAxis | axis | Cylinder reference axis. |
Color | color | Cylinder color. |
public static void IMGizmos.Cylinder3D (Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
Draw a 3D cylinder.
Parameters
Parameters
Vector3 | center | Cylinder center. |
Quaternion | rotation | Cylinder rotation. |
float | height | Cylinder height. |
float | radius | Cylinder radius. |
GizmoDrawAxis | axis | Cylinder reference axis. |
Color | solidColor | Cylinder fill color. |
Color | wireframeColor | Cylinder wireframe color. |
public static void IMGizmos.WireMesh (Mesh mesh, Vector3 position, Quaternion rotation, Color color)
Draw a wireframe mesh.
Parameters
Parameters
Mesh | mesh | Source mesh. |
Vector3 | position | Mesh position. |
Quaternion | rotation | Mesh rotation. |
Color | color | Mesh color. |
public static void IMGizmos.WireMesh (Mesh mesh, Vector3 position, Quaternion rotation, Vector3 scale, Color color)
Draw a wireframe mesh.
Parameters
Parameters
Mesh | mesh | Source mesh. |
Vector3 | position | Mesh position. |
Quaternion | rotation | Mesh rotation. |
Vector3 | scale | Mesh scale. |
Color | color | Mesh color. |
public static void IMGizmos.WireMesh (Mesh mesh, Transform tf, Color color)
Draw a wireframe mesh.
Parameters
Parameters
Mesh | mesh | Source mesh. |
Transform | tf | Mesh transform. |
Color | color | Mesh color. |
public static void IMGizmos.Mesh (Mesh mesh, Vector3 position, Quaternion rotation, Color color)
Draw a mesh.
Parameters
Parameters
Mesh | mesh | Source mesh. |
Vector3 | position | Mesh position. |
Quaternion | rotation | Mesh rotation. |
Color | color | Mesh color. |
public static void IMGizmos.Mesh (Mesh mesh, Vector3 position, Quaternion rotation, Vector3 scale, Color color)
Draw a mesh.
Parameters
Parameters
Mesh | mesh | Source mesh. |
Vector3 | position | Mesh position. |
Quaternion | rotation | Mesh rotation. |
Vector3 | scale | Mesh scale. |
Color | color | Mesh color. |
public static void IMGizmos.Mesh (Mesh mesh, Vector3 position, Quaternion rotation, Color solidColor, Color wireframeColor)
Draw a mesh.
Parameters
Parameters
Mesh | mesh | Source mesh. |
Vector3 | position | Mesh position. |
Quaternion | rotation | Mesh rotation. |
Color | solidColor | Mesh fill color. |
Color | wireframeColor | Mesh wireframe color. |
public static void IMGizmos.Mesh (Mesh mesh, Vector3 position, Quaternion rotation, Vector3 scale, Color solidColor, Color wireframeColor)
Draw a mesh.
Parameters
Parameters
Mesh | mesh | Source mesh. |
Vector3 | position | Mesh position. |
Quaternion | rotation | Mesh rotation. |
Vector3 | scale | Mesh scale. |
Color | solidColor | Mesh fill color. |
Color | wireframeColor | Mesh wireframe color. |
public static void IMGizmos.Axis3D (Vector3 origin, Quaternion rotation, float length, float alpha = 1)
Draw a 3-dimensional axis (X-axis=red, Y-axis=green, Z-axis=blue).
Parameters
Parameters
Vector3 | origin | Axis origin. |
Quaternion | rotation | Axis rotation. |
float | length | Length of axis lines. |
float | alpha = 1 | Axis transparency. |
public static void IMGizmos.Axis3D (Vector3 origin, Quaternion rotation, Vector3 length, float alpha = 1)
Draw a 3-dimensional axis (X-axis=red, Y-axis=green, Z-axis=blue).
Parameters
Parameters
Vector3 | origin | Axis origin. |
Quaternion | rotation | Axis rotation. |
Vector3 | length | Length of each axis line. |
float | alpha = 1 | Axis transparency. |
public static void IMGizmos.AxisGridPoint3D (Vector3 origin, Quaternion rotation, Vector3 halfLength, float alpha)
Draw a 3-dimensional axis grid point (X-axis=red, Y-axis=green, Z-axis=blue).
Parameters
Parameters
Vector3 | origin | Axis origin. |
Quaternion | rotation | Axis rotation. |
Vector3 | halfLength | Half length of each axis line. |
float | alpha | Axis transparency. |
public static void IMGizmos.GridPoint3D (Vector3 origin, Quaternion rotation, float extents, Color color)
Draw a 3D grid point.
Parameters
Parameters
Vector3 | origin | Grid point origin. |
Quaternion | rotation | Grid point orientation. |
float | extents | Grid point extents. |
Color | color | Grid point colour. |
public static void IMGizmos.GridPoint3D (Vector3 origin, Quaternion rotation, Vector3 extents, Color color)
Draw a 3D grid point.
Parameters
Parameters
Vector3 | origin | Grid point origin. |
Quaternion | rotation | Grid point orientation. |
Vector3 | extents | Grid point XYZ extents. |
Color | color | Grid point colour. |
public static void IMGizmos.Grid3D (Vector3 origin, Quaternion rotation, float extentX, float extentY, int cellsX, int cellsY, GizmoDrawAxis axis, Color color)
Draw a 3D grid in a specified plane.
Parameters
Parameters
Vector3 | origin | Grid origin. |
Quaternion | rotation | Grid orientation. |
float | extentX | Grid width. |
float | extentY | Grid height. |
int | cellsX | Number of cells along the width. |
int | cellsY | Number of cells along the height. |
GizmoDrawAxis | axis | The reference plane for the grid. |
Color | color | Grid color. |
public static void IMGizmos.Bounds (Bounds bounds, Color color)
Draw 3D bounds (an axis aligned box).
Parameters
Parameters
Bounds | bounds | Bounds that specifies a position and extents. |
Color | color | Bounds color. |
public static void IMGizmos.Bounds (Renderer renderer, Color color)
Draw the 3D bounds for a renderer (note: only draws bounds if renderer is visible).
Parameters
Parameters
Renderer | renderer | Renderer whose bounds will be drawn. |
Color | color | Bounds color. |
public static void IMGizmos.Collider (Collider collider, Color color)
Draw a collider as a wireframe shape. Note: MeshCollider not currently supported.
Parameters
Parameters
Collider | collider | Collider object. |
Color | color | Wireframe color. |
public static void IMGizmos.Label (float x, float y, Color color, LabelPivot pivot, LabelAlignment alignment, string label, int fontSize = 12)
Draw a label in screen space.
Parameters
Parameters
float | x | Screen X position. |
float | y | Screen Y position. |
Color | color | Label color. |
LabelPivot | pivot | Label rectangle pivot. |
LabelAlignment | alignment | Label text alignment. |
string | label | Label text. |
int | fontSize = 12 | Label font size. |
public static void IMGizmos.LabelShadowed (float x, float y, Color color, LabelPivot pivot, LabelAlignment alignment, string label, int fontSize = 12)
Draw a label (with drop shadow) in screen space.
Parameters
Parameters
float | x | Screen X position. |
float | y | Screen Y position. |
Color | color | Label color. |
LabelPivot | pivot | Label rectangle pivot. |
LabelAlignment | alignment | Label text alignment. |
string | label | Label text. |
int | fontSize = 12 | Label font size. |
public static void IMGizmos.Label (Vector3 position, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float maxDist, int fontSize = 12)
Draw a label in 3D space.
Parameters
Parameters
Vector3 | position | Label 3D position. |
Color | color | Label color. |
LabelPivot | pivot | Label rectangle pivot. |
LabelAlignment | alignment | Label text alignment. |
string | label | Label text. |
float | maxDist | Max draw distance from viewer. |
int | fontSize = 12 | Label font size. |
public static void IMGizmos.LabelShadowed (Vector3 position, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float maxDist, int fontSize = 12)
Draw a label (with drop shadow) in 3D space.
Parameters
Parameters
Vector3 | position | Label 3D position. |
Color | color | Label color. |
LabelPivot | pivot | Label rectangle pivot. |
LabelAlignment | alignment | Label text alignment. |
string | label | Label text. |
float | maxDist | Max draw distance from viewer. |
int | fontSize = 12 | Label font size. |
public static void IMGizmos.Label (Vector3 position, float offsetX, float offsetY, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float maxDist, int fontSize = 12)
Draw a label in 3D space.
Parameters
Parameters
Vector3 | position | Label 3D position. |
float | offsetX | Screen space X position offset. |
float | offsetY | Screen space Y position offset. |
Color | color | Label color. |
LabelPivot | pivot | Label rectangle pivot. |
LabelAlignment | alignment | Label text alignment. |
string | label | Label text. |
float | maxDist | Max draw distance from viewer. |
int | fontSize = 12 | Label font size. |
public static void IMGizmos.LabelShadowed (Vector3 position, float offsetX, float offsetY, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float maxDist, int fontSize = 12)
Draw a label (with drop shadow) in 3D space.
Parameters
Parameters
Vector3 | position | Label 3D position. |
float | offsetX | Screen space X position offset. |
float | offsetY | Screen space Y position offset. |
Color | color | Label color. |
LabelPivot | pivot | Label rectangle pivot. |
LabelAlignment | alignment | Label text alignment. |
string | label | Label text. |
float | maxDist | Max draw distance from viewer. |
int | fontSize = 12 | Label font size. |
public static void IMGizmos.Label (Vector3 position, IMGizmoLabelStyle style, string label)
Draw a label in 3D space.
Parameters
Parameters
Vector3 | position | Label 3D position. |
IMGizmoLabelStyle | style | Style parameters for how the text should be displayed. |
string | label | Label text. |
public static void IMGizmos.Label (Vector3 position, ref IMGizmoLabelStyle style, string label)
Draw a label in 3D space.
Parameters
Parameters
Vector3 | position | Label 3D position. |
ref IMGizmoLabelStyle | style | Style parameters for how the text should be displayed. |
string | label | Label text. |
public static void IMGizmos.Image (Rect rect, Color color, Texture2D texture)
Draw a texture in screen space.
Parameters
Parameters
Rect | rect | Screen position, width and height. |
Color | color | Texture color. |
Texture2D | texture | Source texture. |
struct IMGizmoLabelStyle
Style parameters for a gizmo label.
Fields
Fields
public UnityEngine.Color | color | RGBA color. |
public LabelPivot | pivot | The center point location of the text bounding rectangle. |
public LabelAlignment | alignment | Text alignment. |
public UnityEngine.FontStyle | fontStyle | Font style. |
public int | fontSize | Font size. |
public float | maxDrawDistance | Maximum draw distance from viewer. |
public bool | shadowed | Specify text should have a drop shadow. |
public float | offsetX | Screen space X position offset. |
public float | offsetY | Screen space Y position offset. |
enum IMDrawZTest
Depth comparison function.
Values
Values
Disabled | Depth or stencil test is disabled. |
Never | Never pass depth or stencil test. |
Less | Pass depth or stencil test when new value is less than current value. |
Equal | Pass depth or stencil test when values are equal. |
LessEqual | Default value. Pass depth or stencil test when new value is less or equal than current value. |
Greater | Pass depth or stencil test when new value is greater than current value. |
NotEqual | Pass depth or stencil test when values are different. |
GreaterEqual | Pass depth or stencil test when new value is greater or equal than current value. |
Always | Always pass depth or stencil test. |