Tanoda
Leap.Unity.Drawer Class Reference

Simple drawing interface abstraction (intended for debug drawing, not production!) with statically-accessible backend implementations via HyperMegaLines, Unity Debug drawing, and Unity Gizmo drawing. More...

Public Member Functions

bool MaybePushMatrix (Matrix4x4? m)
 
void PushMatrix (Matrix4x4 m)
 
void PopMatrix ()
 
void MaybeSetColor (Color? maybeColor)
 
void Line (Vector3 a, Vector3 b)
 
void Line (Vector3 a, Vector3 b, Color? color)
 
void Lines (System.Action< System.Action< Vector3, Vector3 > > drawLineFuncFunc, Color? color=null)
 
void Sphere (Vector3 center=default(Vector3), float radius=1f, Color? color=null, Matrix4x4? matrix=null)
 

Public Attributes

System.Action< Vector3, Vector3 > implDrawLine
 
System.Action< ColorimplSetColor
 
Stack< Matrix4x4 > _matrices
 
Matrix4x4 _currMatrix = Matrix4x4.identity
 
System.Action< Matrix4x4 > implDrawUnitSphere
 
bool isActiveAndEnabled = true
 

Properties

Color color [set]
 Calls the setColor delegate. More...
 
static Drawer UnityDebugDrawer [get]
 
static Drawer UnityGizmoDrawer [get]
 For use in OnDrawGizmos and OnDrawGizmosSelected. More...
 
static Drawer UnityGizmoHandlesDrawer [get]
 For use in OnDrawGizmos and OnDrawGizmosSelected via the Handles API. By default, draws on top of any scene geometry. More...
 

Detailed Description

Simple drawing interface abstraction (intended for debug drawing, not production!) with statically-accessible backend implementations via HyperMegaLines, Unity Debug drawing, and Unity Gizmo drawing.

Definition at line 19 of file Drawer.cs.

Member Function Documentation

◆ Line() [1/2]

void Leap.Unity.Drawer.Line ( Vector3  a,
Vector3  b 
)

Definition at line 140 of file Drawer.cs.

◆ Line() [2/2]

void Leap.Unity.Drawer.Line ( Vector3  a,
Vector3  b,
Color color 
)

Definition at line 146 of file Drawer.cs.

◆ Lines()

void Leap.Unity.Drawer.Lines ( System.Action< System.Action< Vector3, Vector3 > >  drawLineFuncFunc,
Color color = null 
)

Definition at line 155 of file Drawer.cs.

◆ MaybePushMatrix()

bool Leap.Unity.Drawer.MaybePushMatrix ( Matrix4x4?  m)

Definition at line 30 of file Drawer.cs.

◆ MaybeSetColor()

void Leap.Unity.Drawer.MaybeSetColor ( Color maybeColor)

Definition at line 46 of file Drawer.cs.

◆ PopMatrix()

void Leap.Unity.Drawer.PopMatrix ( )

Definition at line 37 of file Drawer.cs.

◆ PushMatrix()

void Leap.Unity.Drawer.PushMatrix ( Matrix4x4  m)

Definition at line 33 of file Drawer.cs.

◆ Sphere()

void Leap.Unity.Drawer.Sphere ( Vector3  center = default(Vector3),
float  radius = 1f,
Color color = null,
Matrix4x4?  matrix = null 
)

Definition at line 167 of file Drawer.cs.

Member Data Documentation

◆ _currMatrix

Matrix4x4 Leap.Unity.Drawer._currMatrix = Matrix4x4.identity

Definition at line 29 of file Drawer.cs.

◆ _matrices

Stack<Matrix4x4> Leap.Unity.Drawer._matrices

Definition at line 28 of file Drawer.cs.

◆ implDrawLine

System.Action<Vector3, Vector3> Leap.Unity.Drawer.implDrawLine

Definition at line 22 of file Drawer.cs.

◆ implDrawUnitSphere

System.Action<Matrix4x4> Leap.Unity.Drawer.implDrawUnitSphere

Definition at line 42 of file Drawer.cs.

◆ implSetColor

System.Action<Color> Leap.Unity.Drawer.implSetColor

Definition at line 23 of file Drawer.cs.

◆ isActiveAndEnabled

bool Leap.Unity.Drawer.isActiveAndEnabled = true

Definition at line 44 of file Drawer.cs.

Property Documentation

◆ color

Color Leap.Unity.Drawer.color
set

Calls the setColor delegate.

Definition at line 26 of file Drawer.cs.

◆ UnityDebugDrawer

Drawer Leap.Unity.Drawer.UnityDebugDrawer
staticget

Definition at line 71 of file Drawer.cs.

◆ UnityGizmoDrawer

Drawer Leap.Unity.Drawer.UnityGizmoDrawer
staticget

For use in OnDrawGizmos and OnDrawGizmosSelected.

Definition at line 87 of file Drawer.cs.

◆ UnityGizmoHandlesDrawer

Drawer Leap.Unity.Drawer.UnityGizmoHandlesDrawer
staticget

For use in OnDrawGizmos and OnDrawGizmosSelected via the Handles API. By default, draws on top of any scene geometry.

Definition at line 107 of file Drawer.cs.


The documentation for this class was generated from the following file: