Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_ShapeBrushTool Interface Reference
Inheritance diagram for SCR_ShapeBrushTool:

Public Member Functions

bool IsValidPoint (vector point, int shapePointIndex)
 
override void OnLeaveEvent ()
 
override void OnMouseMoveEvent (float x, float y)
 
override void OnMousePressEvent (float x, float y, WETMouseButtonFlag buttons)
 
override void OnMouseReleaseEvent (float x, float y, WETMouseButtonFlag buttons)
 
override void OnWheelEvent (int delta)
 
override void OnActivate ()
 
override void OnDeActivate ()
 

Protected Member Functions

void DrawBrush ()
 
array< vector > GetShapeBorder ()
 
vector GetPointAtAngle (vector origin, float angleDeg, float distance, bool setTerrainY)
 
void DrawShape ()
 
IEntitySource CreateShapeEntity (notnull array< vector > shapePoints)
 
float AdjustValueUsingScrollwheel (float delta, float currentValue, float min, float max, float step)
 Helps getting proper new value for a property.
 

Protected Attributes

float m_fRadius
 
float m_fMinStep
 
int m_iShapeType
 
bool m_bIsShapeClosed
 
bool m_bIsDrawing
 
vector m_vLastCameraPosition
 
vector m_vLastMousePosition
 
ref Shape m_BrushShape
 
int m_iBrushShapeColor
 
ref array< vector > m_aShapePoints = {}
 
ref array< float > m_aShapeRadii = {}
 
ref SCR_DebugShapeManager m_DebugShapeManager = new SCR_DebugShapeManager()
 

Static Protected Attributes

static const float RADIUS_STEP = 10
 
static const float RADIUS_MAX = 500
 
static const float RADIUS_MIN_WHILE_DRAWING = 10
 
static const float RADIUS_MIN = 0
 
static const int BRUSH_COLOUR_DEFAULT = 0xFF00FF00
 
static const int BRUSH_COLOUR_ACTIVE = 0xFFFF8800
 
static const float CURSOR_RATIO = 0.25
 
static const int ARC_STEP = 30
 
static const int ARC_SAFETY = 0
 

Member Function Documentation

◆ AdjustValueUsingScrollwheel()

float SCR_ShapeBrushTool.AdjustValueUsingScrollwheel ( float delta,
float currentValue,
float min,
float max,
float step )
protected

Helps getting proper new value for a property.

Parameters
[in]deltathe scrollwheel value (obtained in OnWheelEvent) that is a multiple of 120
[in]currentValuethe value from which to start
[in]minthe min value
[in]maxthe max value
[in]stepthe step by which delta's converted value will be multiplied
Returns
the min-max clamped new value

◆ CreateShapeEntity()

IEntitySource SCR_ShapeBrushTool.CreateShapeEntity ( notnull array< vector > shapePoints)
protected

◆ DrawBrush()

void SCR_ShapeBrushTool.DrawBrush ( )
protected

◆ DrawShape()

void SCR_ShapeBrushTool.DrawShape ( )
protected

◆ GetPointAtAngle()

vector SCR_ShapeBrushTool.GetPointAtAngle ( vector origin,
float angleDeg,
float distance,
bool setTerrainY )
protected
Parameters
[in]originthe centre
[in]angleDegabsolute angle in degrees
[in]distancedistance in metres
[in]setTerrainYwhether or not snap it to terrain
Returns
the wanted point

◆ GetShapeBorder()

array< vector > SCR_ShapeBrushTool.GetShapeBorder ( )
protected

◆ IsValidPoint()

bool SCR_ShapeBrushTool.IsValidPoint ( vector point,
int shapePointIndex )
Parameters
[in]point
[in]shapePointIndex
Returns

◆ OnActivate()

override void SCR_ShapeBrushTool.OnActivate ( )

◆ OnDeActivate()

override void SCR_ShapeBrushTool.OnDeActivate ( )

◆ OnLeaveEvent()

override void SCR_ShapeBrushTool.OnLeaveEvent ( )

◆ OnMouseMoveEvent()

override void SCR_ShapeBrushTool.OnMouseMoveEvent ( float x,
float y )

◆ OnMousePressEvent()

override void SCR_ShapeBrushTool.OnMousePressEvent ( float x,
float y,
WETMouseButtonFlag buttons )

◆ OnMouseReleaseEvent()

override void SCR_ShapeBrushTool.OnMouseReleaseEvent ( float x,
float y,
WETMouseButtonFlag buttons )

◆ OnWheelEvent()

override void SCR_ShapeBrushTool.OnWheelEvent ( int delta)

Member Data Documentation

◆ ARC_SAFETY

const int SCR_ShapeBrushTool.ARC_SAFETY = 0
staticprotected

◆ ARC_STEP

const int SCR_ShapeBrushTool.ARC_STEP = 30
staticprotected

◆ BRUSH_COLOUR_ACTIVE

const int SCR_ShapeBrushTool.BRUSH_COLOUR_ACTIVE = 0xFFFF8800
staticprotected

◆ BRUSH_COLOUR_DEFAULT

const int SCR_ShapeBrushTool.BRUSH_COLOUR_DEFAULT = 0xFF00FF00
staticprotected

◆ CURSOR_RATIO

const float SCR_ShapeBrushTool.CURSOR_RATIO = 0.25
staticprotected

◆ m_aShapePoints

ref array<vector> SCR_ShapeBrushTool.m_aShapePoints = {}
protected

◆ m_aShapeRadii

ref array<float> SCR_ShapeBrushTool.m_aShapeRadii = {}
protected

◆ m_bIsDrawing

bool SCR_ShapeBrushTool.m_bIsDrawing
protected

◆ m_bIsShapeClosed

bool SCR_ShapeBrushTool.m_bIsShapeClosed
protected

◆ m_BrushShape

ref Shape SCR_ShapeBrushTool.m_BrushShape
protected

◆ m_DebugShapeManager

ref SCR_DebugShapeManager SCR_ShapeBrushTool.m_DebugShapeManager = new SCR_DebugShapeManager()
protected

◆ m_fMinStep

float SCR_ShapeBrushTool.m_fMinStep
protected

◆ m_fRadius

float SCR_ShapeBrushTool.m_fRadius
protected

◆ m_iBrushShapeColor

int SCR_ShapeBrushTool.m_iBrushShapeColor
protected

◆ m_iShapeType

int SCR_ShapeBrushTool.m_iShapeType
protected

◆ m_vLastCameraPosition

vector SCR_ShapeBrushTool.m_vLastCameraPosition
protected

◆ m_vLastMousePosition

vector SCR_ShapeBrushTool.m_vLastMousePosition
protected

◆ RADIUS_MAX

const float SCR_ShapeBrushTool.RADIUS_MAX = 500
staticprotected

◆ RADIUS_MIN

const float SCR_ShapeBrushTool.RADIUS_MIN = 0
staticprotected

◆ RADIUS_MIN_WHILE_DRAWING

const float SCR_ShapeBrushTool.RADIUS_MIN_WHILE_DRAWING = 10
staticprotected

◆ RADIUS_STEP

const float SCR_ShapeBrushTool.RADIUS_STEP = 10
staticprotected

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