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)
 
Shape AddArrow (vector from, vector to, int colour=DEFAULT_SHAPE_COLOUR)
 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.
 
Shape CreateTrapezoidalPrism (vector centerOfTopBasePos, vector directionUp, float smallBaseRadius, float largeBaseRadius, float height, int color, int subdivisions, ShapeFlags additionalFlags=0)
 
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 AddSphere (vector centre, float radius, int colour=DEFAULT_SHAPE_COLOUR, ShapeFlags additionalFlags=0)
 Create a sphere.
 
DebugTextWorldSpace AddText (string text, vector worldPos, float size=2.0, int colour=DEFAULT_TEXT_COLOUR, int backgroundColour=DEFAULT_TEXT_BACKGROUND_COLOUR)
 
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 array< ref Shape > m_aShapes = {}
 
ref array< ref DebugTextWorldSpace > m_aScreenSpaceTexts = {}
 

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,
int colour = DEFAULT_SHAPE_COLOUR )

Create an arrow.

Parameters
[in]fromarrow's origin
[in]toarrrow's destination, the pointy thing
[in]colourthe shape's colour
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

◆ 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]vectorDir
[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 )
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 )
Parameters
[in]text
[in]worldPos
[in]sizein metres
[in]colour
[in]backgroundColour
Returns

◆ 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.

◆ CreateTrapezoidalPrism()

Shape SCR_DebugShapeManager.CreateTrapezoidalPrism ( vector centerOfTopBasePos,
vector directionUp,
float smallBaseRadius,
float largeBaseRadius,
float height,
int color,
int subdivisions,
ShapeFlags additionalFlags = 0 )
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]color
[in]subdivisions
[in]flags

◆ 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_aScreenSpaceTexts

ref array<ref DebugTextWorldSpace> SCR_DebugShapeManager.m_aScreenSpaceTexts = {}
protected

◆ m_aShapes

ref array<ref Shape> SCR_DebugShapeManager.m_aShapes = {}
protected

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