API Referenceglobal
GizmoDrawclass
Contains functions to add objects to the Gizmo Scene. This is an instantiable class so it's possible to add extensions.
object→GizmoDraw
Methods48
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
| Parameter | Type | Description |
|---|---|---|
| from | Vector3 | — |
| to | Vector3 | — |
| arrowLength = 12 | float | — |
| arrowWidth = 5 | float | — |
Returns:
void—public void LineCapsule(Capsule capsule, int rings = 12)
| Parameter | Type | Description |
|---|---|---|
| capsule | Capsule | — |
| rings = 12 | int | — |
Returns:
void—public void LineCylinder(Vector3 vPointA, Vector3 vPointB, float flRadiusA, float flRadiusB, int nNumSegments)
A cylinder
| Parameter | Type | Description |
|---|---|---|
| vPointA | Vector3 | — |
| vPointB | Vector3 | — |
| flRadiusA | float | — |
| flRadiusB | float | — |
| nNumSegments | int | — |
Returns:
void—public void LineFrustum(Sandbox.Frustum frustum)
Draws a frustum.
| Parameter | Type | Description |
|---|---|---|
| frustum | Frustum | — |
Returns:
void—public void Lines(System.Collections.Generic.IEnumerable`1<Line> lines)
| Parameter | Type | Description |
|---|---|---|
| lines | IEnumerable<Line> | — |
Returns:
void—public void LineTriangle(Sandbox.Triangle triangle)
A triangle
| Parameter | Type | Description |
|---|---|---|
| triangle | Triangle | — |
Returns:
void—public void LineTriangles(System.Collections.Generic.IEnumerable`1<Sandbox.Triangle> triangles)
| Parameter | Type | Description |
|---|---|---|
| triangles | IEnumerable<Triangle> | — |
Returns:
void—public void Plane(Vector3 position, Vector3 normal)
Draw a plane
| Parameter | Type | Description |
|---|---|---|
| position | Vector3 | — |
| normal | Vector3 | — |
Returns:
void—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.
| Parameter | Type | Description |
|---|---|---|
| center | Vector3 | — |
| radius | float | — |
Returns:
void—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
| Parameter | Type | Description |
|---|---|---|
| rect | Rect | — |
| color | Color | — |
| borderRadius = null | Vector4 | — |
| borderColor = null | Color | — |
| borderSize = null | Vector4 | — |
| blendMode = 0 | BlendMode | — |
Returns:
void—public void SolidCapsule(Vector3 start, Vector3 end, float radius, int hSegments, int vSegments)
Draw a solid capsule shape
| Parameter | Type | Description |
|---|---|---|
| start | Vector3 | — |
| end | Vector3 | — |
| radius | float | — |
| hSegments | int | — |
| vSegments | int | — |
Returns:
void—public void SolidCircle(Vector3 center, float radius, float startAngle = 0, float totalDegrees = 360, int sections = 8)
Draw a filled circle
| Parameter | Type | Description |
|---|---|---|
| center | Vector3 | — |
| radius | float | — |
| startAngle = 0 | float | — |
| totalDegrees = 360 | float | — |
| sections = 8 | int | — |
Returns:
void—public void SolidCone(Vector3 base, Vector3 extent, float flRadius, System.Nullable`1<int> segments = null)
| Parameter | Type | Description |
|---|---|---|
| base | Vector3 | — |
| extent | Vector3 | — |
| flRadius | float | — |
| segments = null | Nullable<int> | — |
Returns:
void—public void SolidCylinder(Vector3 start, Vector3 end, float radius, int hSegments = 32)
Draw a solid cylinder shape
| Parameter | Type | Description |
|---|---|---|
| start | Vector3 | — |
| end | Vector3 | — |
| radius | float | — |
| hSegments = 32 | int | — |
Returns:
void—public void SolidRing(Vector3 center, float innerRadius, float outerRadius, float startAngle = 0, float totalDegrees = 360, int sections = 8)
Draw a filled ring
| Parameter | Type | Description |
|---|---|---|
| center | Vector3 | — |
| innerRadius | float | — |
| outerRadius | float | — |
| startAngle = 0 | float | — |
| totalDegrees = 360 | float | — |
| sections = 8 | int | — |
Returns:
void—public void SolidSphere(Vector3 center, float radius, int hSegments = 8, int vSegments = 8)
Draw a solid sphere shape
| Parameter | Type | Description |
|---|---|---|
| center | Vector3 | — |
| radius | float | — |
| hSegments = 8 | int | — |
| vSegments = 8 | int | — |
Returns:
void—public void SolidTriangles(System.Collections.Generic.IEnumerable`1<Sandbox.Triangle> triangles)
| Parameter | Type | Description |
|---|---|---|
| triangles | IEnumerable<Triangle> | — |
Returns:
void—No results match this filter.
Properties4
Showing 4 properties
public bool Sandbox.Gizmo.GizmoDraw.CullBackfaces { get; set; }
Don't draw backfaces when drawing solids
Returns:
bool—No results match this filter.