s&box docs

public sealed class Sandbox.Gizmo.GizmoDraw

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

Methods

Showing 48 methods

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

Draw a line with an arrow on the end

Parameters

  • arrowLength: Default: 12
  • arrowWidth: Default: 5

public void LineBBox(BBox box)

Draw a bounding box

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

Parameters

  • rings: Default: 12

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

A cylinder

public void LineFrustum(Sandbox.Frustum frustum)

Draws a frustum.

public void Lines(System.Collections.Generic.IEnumerable`1<Line> lines)

public void LineTriangle(Sandbox.Triangle triangle)

A triangle

public void LineTriangles(System.Collections.Generic.IEnumerable`1<Sandbox.Triangle> triangles)

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 ScreenRect(Sandbox.Rect rect, Color color, Vector4 borderRadius = null, Color borderColor = null, Vector4 borderSize = null, Sandbox.BlendMode blendMode = 0)

Draw a rect, on the screen

Parameters

  • borderRadius: Default: null
  • borderColor: Default: null
  • borderSize: Default: null
  • blendMode: Default: 0

public void SolidBox(BBox box)

Draw a solid box shape

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

Draw a solid capsule shape

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

Draw a filled circle

Parameters

  • startAngle: Default: 0
  • totalDegrees: Default: 360
  • sections: Default: 8

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

Parameters

  • segments: Default: null

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

Draw a solid cylinder shape

Parameters

  • hSegments: Default: 32

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

Draw a filled ring

Parameters

  • startAngle: Default: 0
  • totalDegrees: Default: 360
  • sections: Default: 8

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

Draw a solid sphere shape

Parameters

  • hSegments: Default: 8
  • vSegments: Default: 8

public void SolidTriangles(System.Collections.Generic.IEnumerable`1<Sandbox.Triangle> triangles)

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

Draw text

Parameters

  • font: Default: Roboto
  • size: Default: 12
  • flags: Default: 132

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

Parameters

  • font: Default: Roboto
  • size: Default: 12
  • flags: Default: 132

Properties

Showing 4 properties

public bool Sandbox.Gizmo.GizmoDraw.CullBackfaces { get; set; }

Don't draw backfaces when drawing solids

public bool Sandbox.Gizmo.GizmoDraw.IgnoreDepth { get; set; }

Ignore depth when drawing, draw on top of everything

public float Sandbox.Gizmo.GizmoDraw.LineThickness { get; set; }

The thickness of line drawings

Metadata

FieldValue
Namespaceglobal
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.Gizmo.GizmoDraw

On this page

Methodspublic System.Void Arrow(Vector3 from, Vector3 to, System.Single arrowLength = 12, System.Single arrowWidth = 5)public System.Void Grid(Sandbox.Gizmo.GridAxis axis, System.Single spacing = 32, System.Single opacity = 1, System.Single minorLineWidth = 0.01, System.Single majorLineWidth = 0.02)public System.Void Grid(Sandbox.Gizmo.GridAxis axis, Vector2 spacing = null, System.Single opacity = 1, System.Single minorLineWidth = 0.01, System.Single majorLineWidth = 0.02)public System.Void Grid(Vector3 center, Sandbox.Gizmo.GridAxis axis, Vector2 spacing = null, System.Single opacity = 1, System.Single minorLineWidth = 0.01, System.Single majorLineWidth = 0.02)public System.Void Line(Line line)public System.Void Line(Vector3 a, Vector3 b)public System.Void LineBBox(BBox box)public System.Void LineCapsule(Capsule capsule, System.Int32 rings = 12)public System.Void LineCircle(Vector3 center, System.Single radius, System.Single startAngle = 0, System.Single totalDegrees = 360, System.Int32 sections = 16)public System.Void LineCircle(Vector3 center, Vector3 forward, System.Single radius, System.Single startAngle = 0, System.Single totalDegrees = 360, System.Int32 sections = 16)public System.Void LineCircle(Vector3 center, Vector3 forward, Vector3 up, System.Single radius, System.Single startAngle = 0, System.Single totalDegrees = 360, System.Int32 sections = 16)public System.Void LineCylinder(Vector3 vPointA, Vector3 vPointB, System.Single flRadiusA, System.Single flRadiusB, System.Int32 nNumSegments)public System.Void LineFrustum(Sandbox.Frustum frustum)public System.Void Lines(System.Collections.Generic.IEnumerable`1<Line> lines)public System.Void LineSphere(Sandbox.Sphere sphere, System.Int32 rings = 8)public System.Void LineSphere(Vector3 point, System.Single radius, System.Int32 rings = 8)public System.Void LineTriangle(Sandbox.Triangle triangle)public System.Void LineTriangles(System.Collections.Generic.IEnumerable`1<Sandbox.Triangle> triangles)public Sandbox.SceneModel Model(Sandbox.Model model, Transform localTransform)public Sandbox.SceneModel Model(Sandbox.Model modelName)public Sandbox.SceneModel Model(System.String modelName, Transform localTransform)public Sandbox.SceneModel Model(System.String modelName)public System.Void Particles(System.String modelName, System.Nullable`1<System.Single> updateSpeed = null)public System.Void Particles(System.String modelName, Transform localTransform, System.Nullable`1<System.Single> updateSpeed = null)public System.Void Plane(Vector3 position, Vector3 normal)public System.Void ScreenBiasedHalfCircle(Vector3 center, System.Single radius)public System.Void ScreenRect(Sandbox.Rect rect, Color color, Vector4 borderRadius = null, Color borderColor = null, Vector4 borderSize = null, Sandbox.BlendMode blendMode = 0)public System.Void ScreenText(Sandbox.TextRendering.Scope text, Sandbox.Rect rect, System.Single angle, Sandbox.TextFlag flags = 33)public System.Void ScreenText(Sandbox.TextRendering.Scope text, Vector2 pos, Sandbox.TextFlag flags = 33)public System.Void ScreenText(Sandbox.TextRendering.Scope text, Vector3 worldPos, Vector2 offset, Sandbox.TextFlag flags = 33)public System.Void ScreenText(System.String text, Vector2 pos, System.String font = Roboto, System.Single size = 12, Sandbox.TextFlag flags = 33)public System.Void ScreenText(System.String text, Vector3 worldPos, Vector2 offset, System.String font = Roboto, System.Single size = 12, Sandbox.TextFlag flags = 33)public System.Void SolidBox(BBox box)public System.Void SolidCapsule(Vector3 start, Vector3 end, System.Single radius, System.Int32 hSegments, System.Int32 vSegments)public System.Void SolidCircle(Vector3 center, System.Single radius, System.Single startAngle = 0, System.Single totalDegrees = 360, System.Int32 sections = 8)public System.Void SolidCone(Vector3 base, Vector3 extent, System.Single flRadius, System.Nullable`1<System.Int32> segments = null)public System.Void SolidCylinder(Vector3 start, Vector3 end, System.Single radius, System.Int32 hSegments = 32)public System.Void SolidRing(Vector3 center, System.Single innerRadius, System.Single outerRadius, System.Single startAngle = 0, System.Single totalDegrees = 360, System.Int32 sections = 8)public System.Void SolidSphere(Vector3 center, System.Single radius, System.Int32 hSegments = 8, System.Int32 vSegments = 8)public System.Void SolidTriangle(Sandbox.Triangle triangle)public System.Void SolidTriangle(Vector3 a, Vector3 b, Vector3 c)public System.Void SolidTriangles(System.Collections.Generic.IEnumerable`1<Sandbox.Triangle> triangles)public System.Void Sprite(Vector3 center, System.Single size, Sandbox.Texture texture)public System.Void Sprite(Vector3 center, System.Single size, System.String texture)public System.Void Sprite(Vector3 center, Vector2 size, Sandbox.Texture texture, System.Boolean worldspace, System.Single angle)public System.Void Sprite(Vector3 center, Vector2 size, Sandbox.Texture texture, System.Boolean worldspace)public System.Void Text(System.String text, Transform tx, System.String font = Roboto, System.Single size = 12, Sandbox.TextFlag flags = 132)public System.Void WorldText(System.String text, Transform tx, System.String font = Roboto, System.Single size = 12, Sandbox.TextFlag flags = 132)Propertiespublic Color Sandbox.Gizmo.GizmoDraw.Color { get; set; }public System.Boolean Sandbox.Gizmo.GizmoDraw.CullBackfaces { get; set; }public System.Boolean Sandbox.Gizmo.GizmoDraw.IgnoreDepth { get; set; }public System.Single Sandbox.Gizmo.GizmoDraw.LineThickness { get; set; }Metadata