class Gizmo.GizmoDraw

in global :: Sandbox

Contains functions to add objects to the Gizmo Scene. This is an instantiable class so it's possible to add extensions.


public Color Color { get; set; }

The color to render the next object

public bool IgnoreDepth { get; set; }

Ignore depth when drawing, draw on top of everything

public float LineThickness { get; set; }

The thickness of line drawings

public SceneObject Model( string modelName, Transform localTransform )

Draw a model

public SceneObject Model( string modelName )

Draw a model

public SceneObject Model( Model model, Transform localTransform )

Draw a model

public SceneObject Model( Model modelName )

Draw a model

public void Text( string text, Transform tx, string font = Roboto, float size = 12, TextFlag flags = Center )

Draw text

public void ScreenText( string text, Vector2 pos, string font = Roboto, float size = 12, TextFlag flags = LeftTop )

Draw text

public void ScreenText( string text, Vector3 worldPos, Vector2 offset, string font = Roboto, float size = 12, TextFlag flags = LeftTop )

Draw text on screen at a 3d position

public void ScreenRect( Rect rect, Color color, Vector4 borderRadius = null, Color borderColor = null, Vector4 borderSize = null, BlendMode blendMode = Normal )

Draw a rect, on the screen

public void Plane( Vector3 position, Vector3 normal )

Draw a plane

public void Arrow( Vector3 from, Vector3 to, float arrowLength = 12, float arrowWidth = 5 )

Draw a line with an arrow on the end

public void Grid( Gizmo.GridAxis axis, float spacing = 32, float opacity = 1, float minorLineWidth = 0.01, float majorLineWidth = 0.02 )

Draws a grid

public void Grid( Gizmo.GridAxis axis, Vector2 spacing = null, float opacity = 1, float minorLineWidth = 0.01, float majorLineWidth = 0.02 )

Draws a grid

public void Grid( Vector3 center, Gizmo.GridAxis axis, Vector2 spacing = null, float opacity = 1, float minorLineWidth = 0.01, float majorLineWidth = 0.02 )

Draws a grid centered at a position

public void Line( ref Vector3 a, ref Vector3 b )

Draw a line from a to b

public void Line( ref Line line )

Draw a line from a to b

public void LineBBox( ref BBox box )

Draw a bounding box

public void LineFrustum( ref Frustum frustum )

Draws a frustum.

public void LineSphere( ref Vector3 point, ref float radius, ref int rings = 8 )

Draw a sphere made out of lines

public void LineSphere( ref Sphere sphere, int rings = 8 )

Draw a sphere made out of lines

public void LineCircle( ref Vector3 center, float radius, float startAngle = 0, float totalDegrees = 360, int sections = 16 )

Draw a sphere made out of lines

public void LineCylinder( Vector3 vPointA, Vector3 vPointB, float flRadiusA, float flRadiusB, int nNumSegments )

A cylinder

public void LineTriangle( ref Triangle triangle )

A triangle

public void SolidBox( BBox box )

Draw a solid box shape

public void SolidTriangle( ref Triangle triangle )

Draw a solid triangle shape

public void SolidTriangle( ref Vector3 a, ref Vector3 b, ref Vector3 c )

Draw a solid triangle shape

public void SolidCircle( Vector3 center, float radius, float startAngle = 0, float totalDegrees = 360, int sections = 8 )

Draw a filled circle

public void SolidRing( Vector3 center, float innerRadius, float outerRadius, float startAngle = 0, float totalDegrees = 360, int sections = 8 )

Draw a filled ring

public void SolidSphere( Vector3 center, float radius, int hSegments = 8, int vSegments = 8 )

Draw a solid sphere shape

public void SolidCylinder( Vector3 start, Vector3 end, float radius, int hSegments = 32 )

Draw a solid cylinder shape

public void SolidCapsule( Vector3 start, Vector3 end, float radius, int hSegments, int vSegments )

Draw a solid capsule shape

public void ScreenBiasedHalfCircle( Vector3 center, float radius )

Draws a half circle that tries its best to point towards the camera. This is used by the rotation widgets that bias towards the camera.

public void Sprite( Vector3 center, float size, Texture texture )

Draw a sprite. This is horrible right now because it doesn't seem like we can load png textures from disk!?!?

public void Sprite( Vector3 center, Vector2 size, Texture texture, bool worldspace )

Draw a sprite. This is horrible right now because it doesn't seem like we can load png textures from disk!?!?

public Type GetType( )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public void Sprite( Vector3 center, float size, string texture )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public void Lines( ref IEnumerable<Line> lines )

😔 No documentation found.

public void SolidCone( Vector3 base, Vector3 extent, float flRadius, Nullable<int> segments = null )

😔 No documentation found.

public void LineTriangles( ref IEnumerable<Triangle> triangles )

😔 No documentation found.

public void LineCapsule( Capsule capsule, int rings = 12 )

😔 No documentation found.

public void LineCircle( ref Vector3 center, Vector3 forward, Vector3 up, float radius, float startAngle = 0, float totalDegrees = 360, int sections = 16 )

😔 No documentation found.

public void LineCircle( ref Vector3 center, Vector3 forward, float radius, float startAngle = 0, float totalDegrees = 360, int sections = 16 )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public void Particles( string modelName, Transform localTransform, Nullable<float> updateSpeed = null )

😔 No documentation found.

public void Particles( string modelName, Nullable<float> updateSpeed = null )

😔 No documentation found.

public void SolidTriangles( ref IEnumerable<Triangle> triangles )

😔 No documentation found.

public void WorldText( string text, Transform tx, string font = Roboto, float size = 12, TextFlag flags = Center )

😔 No documentation found.