DIFF

Debug Shape API definition

Part of Debug utilities

Topics

Classes

Enums

Values

ADDITIVE
ALLOBJECTSValid when CF_FIRST_CONTACT, we get first contact for each object
BACKFACERender just back faces
BBOXJust box
CYLINDERCylinder represented by triangle mesh
DIAMONDEight faced pyramid. Defined by bound-box, where middle part is equal to horizontal extents of box and top/bottom apogees lies on top/bottom side of box.
DOUBLESIDEDouble-sided (do not cull back-faces)
FIRSTCONTACTIn many cases only collided=true/false is enough
LINEOne or more lines
NEARESTCONTACTWe want only one, the nearest contact
NOCULLDo not cull shapes by view frustum
NOOUTLINERender just solid faces. No wire-frame outline.
NOZBUFFERDo not compare z-buffer when render
NOZWRITEDo not update z-buffer when render
ONCERendered just once and then it's automatically destroyed. Do not keep pointer to these!!
ONLYDYNAMICOnly dynamic objects
ONLYSTATICOnly static objects
ONLYWATEROnly water components (legacy support for "walk on geometry")
PYRAMID
SPHERESphere represented by triangle mesh
TRANSPIs translucent
VISIBLEMake it visible. Set by default
WIREFRAMERender just wire-frame outline. No solid faces

Functions

proto private void ~Shape()don't call destructor directly. Use Destroy() instead
proto static native Shape Create(ShapeType type, int color, ShapeFlags flags, vector p1, vector p2)
static Shape CreateArrow(vector from, vector to, float size, int color, ShapeFlags flags)more…
static Shape CreateBridgeArrow(vector from, vector to, float size, int color, ShapeFlags flags)more…
proto static native Shape CreateCylinder(int color, ShapeFlags flags, vector origin, float radius, float length)
proto static native Shape CreateFrustum(float horizontalAngle, float verticalAngle, float length, int color, ShapeFlags flags)
proto static native Shape CreateLines(int color, ShapeFlags flags, vector p[], int num)
static void CreateMatrix(vector mat[4], float axisLength = 0.05, float arrowSize = 0.0)more…
proto static native Shape CreateSphere(int color, ShapeFlags flags, vector origin, float radius)
proto static native Shape CreateTris(int color, ShapeFlags flags, vector p[], int num)
proto native void Destroy()
proto native void GetMatrix(out vector mat[4])
proto native void SetColor(int color)
proto native void SetDirection(vector direction)
proto native void SetFlags(ShapeFlags flags)
proto native void SetMatrix(vector mat[4])
proto native void SetPosition(vector position)

Function Documentation

CreateArrowShape

static Shape CreateArrow(vector from, vector to, float size, int color, ShapeFlags flags)

CreateBridgeArrowShape

static Shape CreateBridgeArrow(vector from, vector to, float size, int color, ShapeFlags flags)
References CreateLines(), vector.Normalize(), vector.Perpend()
Show 1 more, Vector()

CreateMatrixShape

static void CreateMatrix(vector mat[4], float axisLength = 0.05, float arrowSize = 0.0)
References Create(), and CreateArrow()