Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_DebugShapeManager Interface Reference

Public Member Functions

Shape AddBBox (vector min, vector max, int colour=DEFAULT_SHAPE_COLOUR, ShapeFlags additionalFlags=0)
 Create an axis-aligned bounding box.
 
Shape AddLine (vector from, vector to, int colour=DEFAULT_SHAPE_COLOUR, ShapeFlags additionalFlags=0)
 Create a straight line.
 
Shape AddPolyLine (notnull array< vector > points, int colour=DEFAULT_SHAPE_COLOUR)
 Create a polyline.
 
Shape AddArrow (vector from, vector to, float customSize=0, int colour=DEFAULT_SHAPE_COLOUR, ShapeFlags additionalFlags=0)
 Create an arrow.
 
Shape AddCircleXZ (vector centre, float radius, int colour=DEFAULT_SHAPE_COLOUR)
 Create a horizontal circle.
 
Shape AddCircleArcXZ (vector centre, float angleStartRad, float coveredAngleRad, float radius, int colour=DEFAULT_SHAPE_COLOUR)
 Create a horizontal arc (portion of a circle)
 
Shape AddCircleSliceXZ (vector centre, float angleStartRad, float coveredAngleRad, float radius, int colour=DEFAULT_SHAPE_COLOUR)
 Create a horizontal circle slice.
 
Shape AddRectangle (vector origin, vector vectorDir, float length, float width, int colour=DEFAULT_SHAPE_COLOUR)
 Create a rectangle.
 
Shape AddAABBRectangleXZ (vector min, vector max, int colour=DEFAULT_SHAPE_COLOUR)
 Create an axis-aligned horizontal rectangle.
 
Shape AddRectangleXZ (vector origin, float directionRad, float length, float width, int colour=DEFAULT_SHAPE_COLOUR)
 Create a horizontal rectangle.
 
array< ref Shape > AddParallelLines (vector origin, vector vectorDir, float length, float width, int colour=DEFAULT_SHAPE_COLOUR)
 Create two parallel lines on the left and on the right of the provided virtual line.
 
Shape AddBounds (notnull array< vector > boundsPositionsWorldSpace, float height, vector upDirection=vector.Up, int colour=DEFAULT_SHAPE_COLOUR, ShapeFlags additionalFlags=0)
 Method used to create a boundary shape.
 
Shape AddSphere (vector centre, float radius, int colour=DEFAULT_SHAPE_COLOUR, ShapeFlags additionalFlags=0)
 Create a sphere.
 
Shape AddTrapezoidalPrism (vector centerOfTopBasePos, vector directionUp, float smallBaseRadius, float largeBaseRadius, float height, int subdivisions=6, int colour=DEFAULT_SHAPE_COLOUR, ShapeFlags additionalFlags=0)
 Create a trapezoidal prism.
 
DebugTextWorldSpace AddText (string text, vector worldPos, float size=2.0, int colour=DEFAULT_TEXT_COLOUR, int backgroundColour=DEFAULT_TEXT_BACKGROUND_COLOUR)
 Create a world space debug text label.
 
void Add (notnull Shape shape)
 Add an external shape to be held by the manager.
 
void Add (notnull DebugTextWorldSpace text)
 Add an external text to be held by the manager.
 
void Remove (notnull Shape shape)
 Remove the provided shape, if managed.
 
void Remove (notnull DebugTextWorldSpace text)
 Remove the provided text, if managed.
 
void Clear ()
 Remove all stored shapes and texts.
 
void ClearShapes ()
 Remove all stored shapes.
 
void ClearTexts ()
 Remove all stored texts.
 

Protected Attributes

ref set< ref Shape > m_Shapes = new set<ref Shape>()
 
ref set< ref DebugTextWorldSpace > m_ScreenSpaceTexts = new set<ref DebugTextWorldSpace>()
 

Static Protected Attributes

static const int DEFAULT_SHAPE_COLOUR = Color.RED
 
static const ShapeFlags DEFAULT_SHAPE_FLAGS = ShapeFlags.NOZBUFFER | ShapeFlags.TRANSP
 
static const int DEFAULT_TEXT_COLOUR = Color.WHITE
 
static const int DEFAULT_TEXT_BACKGROUND_COLOUR = 0x88000000
 
static const DebugTextFlags DEFAULT_TEXT_FLAGS = DebugTextFlags.CENTER | DebugTextFlags.FACE_CAMERA | DebugTextFlags.IN_WORLD
 

Member Function Documentation

◆ Add() [1/2]

void SCR_DebugShapeManager.Add ( notnull DebugTextWorldSpace text)

Add an external text to be held by the manager.

Parameters
[in]text

◆ Add() [2/2]

void SCR_DebugShapeManager.Add ( notnull Shape shape)

Add an external shape to be held by the manager.

Parameters
[in]shape

◆ AddAABBRectangleXZ()

Shape SCR_DebugShapeManager.AddAABBRectangleXZ ( vector min,
vector max,
int colour = DEFAULT_SHAPE_COLOUR )

Create an axis-aligned horizontal rectangle.

Parameters
[in]min
[in]max
[in]colourthe shape's colour
Returns
the created horizontal rectangle

◆ AddArrow()

Shape SCR_DebugShapeManager.AddArrow ( vector from,
vector to,
float customSize = 0,
int colour = DEFAULT_SHAPE_COLOUR,
ShapeFlags additionalFlags = 0 )

Create an arrow.

Parameters
[in]fromarrow's origin
[in]toarrrow's destination, the pointy thing
[in]customSizeif set above zero arrow will use this value instead of 1/3 of arrow length - for a relative width, use vector.Distance(from, to) * wantedRatio
[in]colourthe shape's colour
[in]additionalFlagsadditional Shape flags
Returns
the created arrow

◆ AddBBox()

Shape SCR_DebugShapeManager.AddBBox ( vector min,
vector max,
int colour = DEFAULT_SHAPE_COLOUR,
ShapeFlags additionalFlags = 0 )

Create an axis-aligned bounding box.

Parameters
[in]min
[in]max
[in]colourthe shape's colour
[in]additionalFlagsadditional Shape flags
Returns
the created bounding box

◆ AddBounds()

Shape SCR_DebugShapeManager.AddBounds ( notnull array< vector > boundsPositionsWorldSpace,
float height,
vector upDirection = vector::Up,
int colour = DEFAULT_SHAPE_COLOUR,
ShapeFlags additionalFlags = 0 )

Method used to create a boundary shape.

Parameters
[in]boundsPositionsWorldSpacelist points defining the base of the boundary
[in]heightof the walls
[in]upDirection
[in]colour
[in]additionalFlags
Returns
created shape

◆ AddCircleArcXZ()

Shape SCR_DebugShapeManager.AddCircleArcXZ ( vector centre,
float angleStartRad,
float coveredAngleRad,
float radius,
int colour = DEFAULT_SHAPE_COLOUR )

Create a horizontal arc (portion of a circle)

Parameters
[in]centre
[in]angleStartRadcounter-clockwise radians
[in]coveredAngleRadcounter-clockwise radians - can be negative
[in]radius
[in]colourthe shape's colour
Returns
the created arc

◆ AddCircleSliceXZ()

Shape SCR_DebugShapeManager.AddCircleSliceXZ ( vector centre,
float angleStartRad,
float coveredAngleRad,
float radius,
int colour = DEFAULT_SHAPE_COLOUR )

Create a horizontal circle slice.

Parameters
[in]centre
[in]angleStartRadcounter-clockwise radians
[in]coveredAngleRadcounter-clockwise radians
[in]radius
[in]colourthe shape's colour
Returns
the created pie slice

◆ AddCircleXZ()

Shape SCR_DebugShapeManager.AddCircleXZ ( vector centre,
float radius,
int colour = DEFAULT_SHAPE_COLOUR )

Create a horizontal circle.

Parameters
[in]centre
[in]radius
[in]colourthe shape's colour
Returns
the created circle

◆ AddLine()

Shape SCR_DebugShapeManager.AddLine ( vector from,
vector to,
int colour = DEFAULT_SHAPE_COLOUR,
ShapeFlags additionalFlags = 0 )

Create a straight line.

Parameters
[in]fromorigin
[in]todestination
[in]colourthe shape's colour
[in]additionalFlagsadditional Shape flags
Returns
the created line

◆ AddParallelLines()

array< ref Shape > SCR_DebugShapeManager.AddParallelLines ( vector origin,
vector vectorDir,
float length,
float width,
int colour = DEFAULT_SHAPE_COLOUR )

Create two parallel lines on the left and on the right of the provided virtual line.

Parameters
[in]origin
[in]vectorDircan be non-normalised
[in]length
[in]width
[in]colourthe shape's colour
Returns
an array with the two created lines

◆ AddPolyLine()

Shape SCR_DebugShapeManager.AddPolyLine ( notnull array< vector > points,
int colour = DEFAULT_SHAPE_COLOUR )

Create a polyline.

Parameters
[in]pointsfrom 2 up to 50 points (array will be clipped)
[in]colourthe shape's colour
Returns
the created polyline or null on error (e.g not enough points)

◆ AddRectangle()

Shape SCR_DebugShapeManager.AddRectangle ( vector origin,
vector vectorDir,
float length,
float width,
int colour = DEFAULT_SHAPE_COLOUR )

Create a rectangle.

Parameters
[in]origin
[in]vectorDir
[in]length
[in]width
[in]colourthe shape's colour
Returns
the created rectangle

◆ AddRectangleXZ()

Shape SCR_DebugShapeManager.AddRectangleXZ ( vector origin,
float directionRad,
float length,
float width,
int colour = DEFAULT_SHAPE_COLOUR )

Create a horizontal rectangle.

Parameters
[in]origin
[in]directionRadin counter-clockwise radians
[in]length
[in]width
[in]colourthe shape's colour
Returns
the created horizontal rectangle

◆ AddSphere()

Shape SCR_DebugShapeManager.AddSphere ( vector centre,
float radius,
int colour = DEFAULT_SHAPE_COLOUR,
ShapeFlags additionalFlags = 0 )

Create a sphere.

Parameters
[in]centreworld position of the sphere's centre
[in]radiusradius in metres
[in]colourthe shape's colour
[in]additionalFlagsadditional Shape flags
Returns
the created sphere

◆ AddText()

DebugTextWorldSpace SCR_DebugShapeManager.AddText ( string text,
vector worldPos,
float size = 2::0,
int colour = DEFAULT_TEXT_COLOUR,
int backgroundColour = DEFAULT_TEXT_BACKGROUND_COLOUR )

Create a world space debug text label.

Parameters
[in]text
[in]worldPos
[in]sizein metres
[in]colour
[in]backgroundColour
Returns

◆ AddTrapezoidalPrism()

Shape SCR_DebugShapeManager.AddTrapezoidalPrism ( vector centerOfTopBasePos,
vector directionUp,
float smallBaseRadius,
float largeBaseRadius,
float height,
int subdivisions = 6,
int colour = DEFAULT_SHAPE_COLOUR,
ShapeFlags additionalFlags = 0 )

Create a trapezoidal prism.

Parameters
[in]centerOfTopBasePosposition in worldspace that is the center of the smaller (top) base
[in]directionUpnormalized direction in worldspace that points toward larger (bottom) base
[in]smallBaseRadius
[in]largeBaseRadius
[in]heightdistance between smaller (top) base and center of larger (bottom) base
[in]subdivisionsmin 2, max 50 (will be clamped if needed)
[in]colourthe shape's colour
[in]additionalFlagsadditional Shape flags

◆ Clear()

void SCR_DebugShapeManager.Clear ( )

Remove all stored shapes and texts.

◆ ClearShapes()

void SCR_DebugShapeManager.ClearShapes ( )

Remove all stored shapes.

◆ ClearTexts()

void SCR_DebugShapeManager.ClearTexts ( )

Remove all stored texts.

◆ Remove() [1/2]

void SCR_DebugShapeManager.Remove ( notnull DebugTextWorldSpace text)

Remove the provided text, if managed.

Parameters
[in]shape

◆ Remove() [2/2]

void SCR_DebugShapeManager.Remove ( notnull Shape shape)

Remove the provided shape, if managed.

Parameters
[in]shape

Member Data Documentation

◆ DEFAULT_SHAPE_COLOUR

const int SCR_DebugShapeManager.DEFAULT_SHAPE_COLOUR = Color.RED
staticprotected

◆ DEFAULT_SHAPE_FLAGS

const ShapeFlags SCR_DebugShapeManager.DEFAULT_SHAPE_FLAGS = ShapeFlags.NOZBUFFER | ShapeFlags.TRANSP
staticprotected

◆ DEFAULT_TEXT_BACKGROUND_COLOUR

const int SCR_DebugShapeManager.DEFAULT_TEXT_BACKGROUND_COLOUR = 0x88000000
staticprotected

◆ DEFAULT_TEXT_COLOUR

const int SCR_DebugShapeManager.DEFAULT_TEXT_COLOUR = Color.WHITE
staticprotected

◆ DEFAULT_TEXT_FLAGS

const DebugTextFlags SCR_DebugShapeManager.DEFAULT_TEXT_FLAGS = DebugTextFlags.CENTER | DebugTextFlags.FACE_CAMERA | DebugTextFlags.IN_WORLD
staticprotected

◆ m_ScreenSpaceTexts

ref set<ref DebugTextWorldSpace> SCR_DebugShapeManager.m_ScreenSpaceTexts = new set<ref DebugTextWorldSpace>()
protected

◆ m_Shapes

ref set<ref Shape> SCR_DebugShapeManager.m_Shapes = new set<ref Shape>()
protected

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