Gizmos Plus
Public Types | Static Public Member Functions | List of all members
Zchfvy.Plus.GizmosPlus Class Reference

Base class for drawing gizmos. More...

Public Types

enum  TextAnchor { Left, Center, Right }
 

Static Public Member Functions

static void Cross (Vector3 position, float size)
 Creates three intersecting lines on the X,Y,Z axis crossing at a point. More...
 
static void WireOcto (Vector3 position, float size)
 Creates a wireframe octahedron at a point in space. More...
 
static void Octo (Vector3 position, float size)
 Creates a solid octahedron at a point in space. More...
 
static void Arrow (Vector3 origin, Vector3 dirMagnitude, float headSize=0.1f, bool absHeadSize=false)
 Creates an arrow originating from a point and pointing in a certian direction with a certain length. More...
 
static void Square (Vector3 origin, Vector3 normalSize, bool crossed=false)
 Construct a square in space More...
 
static void Rectangle (Vector3 origin, Vector3 normal, float width, float height, bool crossed=false)
 Construct a rectangle in space More...
 
static void Circle (Vector3 origin, Vector3 normalRadius, int segments=32)
 Construct a circle in space More...
 
static void WireCylinder (Vector3 origin, float radius, float height, int segments=16)
 Construct a cylinder in space More...
 
static void Lines (Vector3[] points)
 Draw a series of connected line segments. More...
 
static void Polygon (Vector3[] points)
 Draw a shaded convex polygon More...
 
static void Text (Vector3 origin, string text, TextAnchor anchor=TextAnchor.Center)
 Draw text in space More...
 

Detailed Description

Base class for drawing gizmos.

Member Function Documentation

◆ Arrow()

static void Zchfvy.Plus.GizmosPlus.Arrow ( Vector3  origin,
Vector3  dirMagnitude,
float  headSize = 0.1f,
bool  absHeadSize = false 
)
inlinestatic

Creates an arrow originating from a point and pointing in a certian direction with a certain length.

arrow.png
Parameters
originThe point the arrow's base is at.
dirMagnitudeA vector representing both the direction and length of the arrow.
headSizeArrowhead size, as a fraction of the arrow total size, or as an absolute size if absHeadSize is set to true. Optional. Default 0.1.
absHeadSizeIf set to true, then headSize is treated as an absolute size, if false then headSize is a fraction of the toal arrow size.

◆ Circle()

static void Zchfvy.Plus.GizmosPlus.Circle ( Vector3  origin,
Vector3  normalRadius,
int  segments = 32 
)
inlinestatic

Construct a circle in space

circle.png
Parameters
originThe center point of the circle
normalRadiusThe normal and radius of the circle, the radius of the circle will be equivalent to this vector's magnitude.
segmentsOptional, the number of segments to construct the circle out of. Defaults to 32.

◆ Cross()

static void Zchfvy.Plus.GizmosPlus.Cross ( Vector3  position,
float  size 
)
inlinestatic

Creates three intersecting lines on the X,Y,Z axis crossing at a point.

cross.png
Parameters
positionLocation in the game world to place the cross.
sizeSize of the cross.

◆ Lines()

static void Zchfvy.Plus.GizmosPlus.Lines ( Vector3 []  points)
inlinestatic

Draw a series of connected line segments.

lines.png
Parameters
pointsThe points to draw the segments through

◆ Octo()

static void Zchfvy.Plus.GizmosPlus.Octo ( Vector3  position,
float  size 
)
inlinestatic

Creates a solid octahedron at a point in space.

octo.png
Parameters
positionLocation in the game world to place the octahedron.
sizeSize of the octahedron.

◆ Polygon()

static void Zchfvy.Plus.GizmosPlus.Polygon ( Vector3 []  points)
inlinestatic

Draw a shaded convex polygon

polygon.png
Parameters
pointsThe points of the polygon

◆ Rectangle()

static void Zchfvy.Plus.GizmosPlus.Rectangle ( Vector3  origin,
Vector3  normal,
float  width,
float  height,
bool  crossed = false 
)
inlinestatic

Construct a rectangle in space

rectangle.png
Parameters
originThe center point of the rectangle
normalThe normal of the rectangle.
widthThe width of the rectangle.
heightThe height of the rectangle.
crossedOptional, if true a cross will be drawn through opposite borders of the rectangle.

◆ Square()

static void Zchfvy.Plus.GizmosPlus.Square ( Vector3  origin,
Vector3  normalSize,
bool  crossed = false 
)
inlinestatic

Construct a square in space

square.png
Parameters
originThe center point of the square
normalSizeThe normal and size of the square, each side of the square will have a length equivalent to this vector's magnitude.
crossedOptional, if true a cross will be drawn through opposite borders of the square.

◆ Text()

static void Zchfvy.Plus.GizmosPlus.Text ( Vector3  origin,
string  text,
TextAnchor  anchor = TextAnchor.Center 
)
inlinestatic

Draw text in space

Parameters
originThe point to draw the text from
textThe text to draw
anchorHow to align the text, default center

◆ WireCylinder()

static void Zchfvy.Plus.GizmosPlus.WireCylinder ( Vector3  origin,
float  radius,
float  height,
int  segments = 16 
)
inlinestatic

Construct a cylinder in space

cylinder.png
Parameters
originThe center point of the cylinder
radiusThe radius of the cylinder.
heightThe height of the cylinder.
segmentsOptional, the number of segments to construct the cylinder out of. Defaults to 16.

◆ WireOcto()

static void Zchfvy.Plus.GizmosPlus.WireOcto ( Vector3  position,
float  size 
)
inlinestatic

Creates a wireframe octahedron at a point in space.

wireocto.png
Parameters
positionLocation in the game world to place the octahedron.
sizeSize of the octahedron.