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

SCR_GeneratorBaseEntity responsibilities: More...

Inheritance diagram for SCR_GeneratorBaseEntity:
NotificationTestGeneratorEntity SCR_AreaGeneratorBaseEntity SCR_LineGeneratorBaseEntity SCR_ShapeAnalyserEntity SCR_TrackGeneratorEntity ForestGeneratorEntity SCR_LineTerrainShaperGeneratorBaseEntity PrefabGeneratorEntity SCR_LineTerrainShaperGeneratorEntity SCR_PowerlineGeneratorEntity WallGeneratorEntity

Public Member Functions

override void _WB_OnParentChange (IEntitySource src, IEntitySource prevParentSrc)
 
override bool _WB_OnKeyChanged (BaseContainer src, string key, BaseContainerList ownerContainers, IEntity parent)
 
override bool _WB_CanSelect (IEntitySource src)
 
override void OnShapeChangedInternal (IEntitySource shapeEntitySrc, ShapeEntity shapeEntity, array< vector > mins, array< vector > maxes)
 
override void OnShapeInitInternal (IEntitySource shapeEntitySrc, ShapeEntity shapeEntity)
 
map< int, ref ShapePointDataScriptBase > GetFirstPointDataMap (TypeName wantedType=ShapePointDataScriptBase)
 
map< int, ref array< ref ShapePointDataScriptBase > > GetPointDataMap (TypeName wantedType=ShapePointDataScriptBase)
 
override void _WB_OnCreate (IEntitySource src)
 

Protected Member Functions

override void OnIntersectingShapeChangedXZInternal (IEntitySource shapeEntitySrc, IEntitySource other, array< vector > mins, array< vector > maxes)
 
void ResetGeneratorPosition (ShapeEntity shapeEntity=null)
 
void DeleteAllChildren ()
 Delete all children without distinction, using WorldEditorAPI.
 
array< vector > GetWorldAnchorPoints (notnull IEntitySource shapeEntitySrc)
 
array< vector > GetWorldTesselatedShapePoints (notnull IEntitySource shapeEntitySrc)
 
Color GetColor ()
 
void ColorShape ()
 Set shape's line colour to GetColor() value.
 
IEntitySource GetShapeSource ()
 Get the parent shape above this generator (has to be the direct parent)
 
void SCR_GeneratorBaseEntity (IEntitySource src, IEntity parent)
 

Static Protected Member Functions

static array< vector > GetPoints (notnull IEntitySource shapeEntitySrc)
 
static array< vector > GetAnchorPoints (notnull IEntitySource shapeEntitySrc, float offset=0, bool isShapeClosed=false)
 
static array< vector > GetTesselatedShapePoints (notnull IEntitySource shapeEntitySrc, float offset=0, bool isShapeClosed=false)
 

Protected Attributes

bool m_bEnableGeneration
 
int m_iSeed
 
IEntitySource m_Source
 the generator's entity source
 
IEntitySource m_ParentShapeSource
 the parent shape's entity source, if any - must be managed ONLY by SCR_GeneratorBaseEntity
 
int m_iSourceLayerID
 
ref RandomGenerator m_RandomGenerator
 
bool m_bIsChangingWorkbenchKey
 

Static Protected Attributes

static const int BASE_GENERATOR_COLOUR = Color.WHITE
 

Detailed Description

SCR_GeneratorBaseEntity responsibilities:

  • trigger a warning if the generator is not the child of a shape
  • keep the generator at shape's {0,0,0}, at angles {0,0,0}, at scale 1
  • delete all child entities if no parent is set
  • set generator's and shape's "Editor Only" flag
  • provide methods to get offset shapes through SCR_ParallelShapeHelper usage (for parallel lines or smaller/bigger areas)
  • manage the m_Source variable
  • manage the m_ParentShapeSource variable
  • manage the m_iSourceLayerID variable
  • carry a debug shape manager reference

Constructor & Destructor Documentation

◆ SCR_GeneratorBaseEntity()

void SCR_GeneratorBaseEntity.SCR_GeneratorBaseEntity ( IEntitySource src,
IEntity parent )
protected

Member Function Documentation

◆ _WB_CanSelect()

override bool SCR_GeneratorBaseEntity._WB_CanSelect ( IEntitySource src)

◆ _WB_OnCreate()

override void SCR_GeneratorBaseEntity._WB_OnCreate ( IEntitySource src)

◆ _WB_OnKeyChanged()

override bool SCR_GeneratorBaseEntity._WB_OnKeyChanged ( BaseContainer src,
string key,
BaseContainerList ownerContainers,
IEntity parent )

◆ _WB_OnParentChange()

override void SCR_GeneratorBaseEntity._WB_OnParentChange ( IEntitySource src,
IEntitySource prevParentSrc )

◆ ColorShape()

void SCR_GeneratorBaseEntity.ColorShape ( )
protected

Set shape's line colour to GetColor() value.

◆ DeleteAllChildren()

void SCR_GeneratorBaseEntity.DeleteAllChildren ( )
protected

Delete all children without distinction, using WorldEditorAPI.

◆ GetAnchorPoints()

static array< vector > SCR_GeneratorBaseEntity.GetAnchorPoints ( notnull IEntitySource shapeEntitySrc,
float offset = 0,
bool isShapeClosed = false )
staticprotected
Parameters
[in]shapeEntitySrc
[in]offsetoffset from the current shape; negative = to the left, positive = to the right
[in]isShapeClosed
Returns
3D anchor points relative to the provided shape source; or empty array if not a shape (never null)

◆ GetColor()

Color SCR_GeneratorBaseEntity.GetColor ( )
protected

◆ GetFirstPointDataMap()

map< int, ref ShapePointDataScriptBase > SCR_GeneratorBaseEntity.GetFirstPointDataMap ( TypeName wantedType = ShapePointDataScriptBase)
Parameters
[in]wantedTypewanted data type - if all of them are wanted, use "ShapePointDataScriptBase"
Returns
a map of <anchorIndex, dataPoint> - if there is no filtered data on one point, the index is not present in the map

◆ GetPointDataMap()

map< int, ref array< ref ShapePointDataScriptBase > > SCR_GeneratorBaseEntity.GetPointDataMap ( TypeName wantedType = ShapePointDataScriptBase)
Parameters
[in]wantedTypewanted data type - if all of them are wanted, use "ShapePointDataScriptBase"
Returns
a map of <anchorIndex, dataPoint> - if there is no filtered data on one point, the index is not present in the map

◆ GetPoints()

static array< vector > SCR_GeneratorBaseEntity.GetPoints ( notnull IEntitySource shapeEntitySrc)
staticprotected

◆ GetShapeSource()

IEntitySource SCR_GeneratorBaseEntity.GetShapeSource ( )
protected

Get the parent shape above this generator (has to be the direct parent)

◆ GetTesselatedShapePoints()

static array< vector > SCR_GeneratorBaseEntity.GetTesselatedShapePoints ( notnull IEntitySource shapeEntitySrc,
float offset = 0,
bool isShapeClosed = false )
staticprotected
Parameters
[in]shapeEntitySrc
[in]offset
[in]isShapeClosed
Returns
3D points relative to the provided shape source or null if WorldEditorAPI is not available / source is not a shape

◆ GetWorldAnchorPoints()

array< vector > SCR_GeneratorBaseEntity.GetWorldAnchorPoints ( notnull IEntitySource shapeEntitySrc)
protected
Parameters
[in]shapeEntitySrc
Returns
3D anchor points in absolute (world) coordinates or null if WorldEditorAPI is not available / source is not a shape

◆ GetWorldTesselatedShapePoints()

array< vector > SCR_GeneratorBaseEntity.GetWorldTesselatedShapePoints ( notnull IEntitySource shapeEntitySrc)
protected
Parameters
[in]shapeEntitySrc
Returns
3D points in absolute (world) coordinates or null if WorldEditorAPI is not available / source is not a shape

◆ OnIntersectingShapeChangedXZInternal()

override void SCR_GeneratorBaseEntity.OnIntersectingShapeChangedXZInternal ( IEntitySource shapeEntitySrc,
IEntitySource other,
array< vector > mins,
array< vector > maxes )
protected

◆ OnShapeChangedInternal()

override void SCR_GeneratorBaseEntity.OnShapeChangedInternal ( IEntitySource shapeEntitySrc,
ShapeEntity shapeEntity,
array< vector > mins,
array< vector > maxes )

◆ OnShapeInitInternal()

override void SCR_GeneratorBaseEntity.OnShapeInitInternal ( IEntitySource shapeEntitySrc,
ShapeEntity shapeEntity )

◆ ResetGeneratorPosition()

void SCR_GeneratorBaseEntity.ResetGeneratorPosition ( ShapeEntity shapeEntity = null)
protected

Member Data Documentation

◆ BASE_GENERATOR_COLOUR

const int SCR_GeneratorBaseEntity.BASE_GENERATOR_COLOUR = Color.WHITE
staticprotected

◆ m_bEnableGeneration

bool SCR_GeneratorBaseEntity.m_bEnableGeneration
protected

◆ m_bIsChangingWorkbenchKey

bool SCR_GeneratorBaseEntity.m_bIsChangingWorkbenchKey
protected

◆ m_iSeed

int SCR_GeneratorBaseEntity.m_iSeed
protected

◆ m_iSourceLayerID

int SCR_GeneratorBaseEntity.m_iSourceLayerID
protected

◆ m_ParentShapeSource

IEntitySource SCR_GeneratorBaseEntity.m_ParentShapeSource
protected

the parent shape's entity source, if any - must be managed ONLY by SCR_GeneratorBaseEntity

◆ m_RandomGenerator

ref RandomGenerator SCR_GeneratorBaseEntity.m_RandomGenerator
protected

◆ m_Source

IEntitySource SCR_GeneratorBaseEntity.m_Source
protected

the generator's entity source


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