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

A Forest Generator uses the following data: More...

Inheritance diagram for ForestGeneratorEntity:
SCR_AreaGeneratorBaseEntity SCR_GeneratorBaseEntity

Protected Member Functions

bool OnLine (SCR_ForestGeneratorLine line, SCR_ForestGeneratorPoint point)
 
int Direction (SCR_ForestGeneratorPoint a, SCR_ForestGeneratorPoint b, SCR_ForestGeneratorPoint c)
 
bool IsIntersect (SCR_ForestGeneratorLine line1, SCR_ForestGeneratorLine line2)
 
bool IsIntersect (SCR_ForestGeneratorLine line, SCR_ForestGeneratorRectangle rectangle)
 
bool PreprocessTreeArray (notnull array< ref ForestGeneratorTree > trees, int groupIdx, SCR_ETreeType type, int debugGroupIdx)
 
void PreprocessAllTrees ()
 
array< ref SCR_ForestGeneratorPointGetClockWisePoints (notnull IEntitySource shapeEntitySource)
 Create a list of Forest Generator Points for each shape's vertices.
 
void FillOutlineLinesAndPoints (notnull array< ref SCR_ForestGeneratorPoint > points)
 
void CalculateOutlineAnglesForPoints (notnull array< ref SCR_ForestGeneratorPoint > points)
 
override bool _WB_OnKeyChanged (BaseContainer src, string key, BaseContainerList ownerContainers, IEntity parent)
 
override void OnShapeChangedInternal (IEntitySource shapeEntitySrc, ShapeEntity shapeEntity, array< vector > mins, array< vector > maxes)
 
override void OnShapeInitInternal (IEntitySource shapeEntitySrc, ShapeEntity shapeEntity)
 
override void BeforeShapeTransformInternal (IEntitySource shapeEntitySrc, ShapeEntity shapeEntity, inout vector oldTransform[4])
 
override void OnShapeTransformInternal (IEntitySource shapeEntitySrc, ShapeEntity shapeEntity, array< vector > mins, array< vector > maxes)
 
override void OnPointChangedInternal (IEntitySource shapeEntitySrc, ShapeEntity shapeEntity, PointChangedSituation situation, int pointIndex, vector position)
 
int GetColorForTree (int index, SCR_ETreeType type)
 
void MemoryCleanup ()
 Empty now-useless arrays.
 
void RegenerateForest (bool forceRegeneration=false)
 
int DeletePreviousEntities (notnull array< float > currentPoints2D, SCR_ForestGeneratorOutlinePositionChecker outlineChecker, bool forceRegeneration=false)
 Delete previous entities - either all of them for a full regeneration, or out of shape (hehe) ones for partial regeneration.
 
int GenerateEntities (notnull array< float > previousPoints2D, SCR_ForestGeneratorOutlinePositionChecker outlineChecker, bool forceRegeneration=false)
 
void PopulateGrid (array< float > polygon2D, array< vector > polygon3D)
 
void Rectangulate (notnull SCR_AABB bbox, notnull array< float > polygon2D)
 
bool NeedsCheck (SCR_ForestGeneratorLine line, SCR_ForestGeneratorRectangle rectangle)
 
void GenerateForestGeneratorTrees (array< float > polygon2D, SCR_AABB bbox)
 
int FindRectanglesInCircle (vector center, float radius, out array< SCR_ForestGeneratorRectangle > rectangles)
 
bool GetClusterPoint (notnull array< float > polygon2D, notnull SCR_AABB bbox, out vector clusterCenter, float additionalDistance, bool allowInForest, bool allowInOutline)
 
void GenerateCircleCluster (notnull ForestGeneratorCircleCluster cluster, notnull array< float > polygon2D, notnull SCR_AABB bbox)
 
void GenerateStripCluster (notnull ForestGeneratorStripCluster cluster, notnull array< float > polygon2D, notnull SCR_AABB bbox)
 
int GetClusterObjectCount (notnull SmallForestGeneratorClusterObject clusterObject)
 
int GetGaussianDistributionRandomIntInclusive (int min, float mid, int max)
 SCR_Math.GetGaussianDistributionRandom but we use our own random generator and round the result.
 
float SafeRandomFloatInclusive (float min, float max)
 Get a random value between min and max, if min > max they are reversed.
 
vector GeneratePointInCircle (float innerRadius, float outerRadius, vector circleCenter)
 Density is more important at the centre (random 0-radius)
 
vector GeneratePointInCircle (float innerRadius, float outerRadius, SCR_ForestGeneratorPoint point)
 Density is more important at the centre (random 0-radius)
 
vector GenerateRandomPointInRectangle (notnull SCR_ForestGeneratorRectangle rectangle)
 
bool GetIsAnyTreeValid (notnull array< ref TreeGroupClass > treeGroups)
 
void GenerateOutlineTrees (array< float > polygon, SCR_AABB bbox, ForestGeneratorOutline outline)
 
bool IsPointInProperDistanceFromLine (vector point, SCR_ForestGeneratorLine line, float minDistance, float maxDistance)
 
bool IsEntryValid (ForestGeneratorTree tree, vector pointLocal)
 
void GenerateBottomTrees (array< float > polygon, SCR_AABB bbox, ForestGeneratorBottomLevel bottomLevel)
 
void GenerateTopTrees (array< float > polygon, SCR_AABB bbox, ForestGeneratorTopLevel topLevel)
 
void GenerateTreeInsideRectangle (notnull SCR_ForestGeneratorRectangle rectangle, notnull SCR_ForestGeneratorTreeLevel level, notnull array< float > polygon, vector worldMat[4])
 
ForestGeneratorTree SelectTreeToSpawn (vector point, array< ref ForestGeneratorTree > trees)
 
void SetObjectScale (notnull SCR_ForestGeneratorTreeBase object)
 
bool IsInOutline (notnull SCR_ForestGeneratorRectangle rectangle, vector pointLocal, float additionalDistance=0)
 
bool IsBeforeOutlineBorder (notnull SCR_ForestGeneratorRectangle rectangle, vector pointLocal, float offset=0)
 same as IsInOutline but reversed
 
float CalculateAreaForOutline (SCR_ForestGeneratorLine line, ForestGeneratorOutline outline)
 
float CalculateAreaForOutline (SCR_ForestGeneratorPoint point, ForestGeneratorOutline outline)
 
override void OnRegenerate ()
 
override void _WB_OnInit (inout vector mat[4], IEntitySource src)
 
- Protected Member Functions inherited from SCR_AreaGeneratorBaseEntity
void RefreshObstacles ()
 
void SetAvoidOptions ()
 
bool HasObstacle (vector worldPos, array< IEntity > exclusionList=null)
 
bool HasObstaclesList ()
 
void ClearObstacles ()
 
override void OnIntersectingShapeChangedXZInternal (IEntitySource shapeEntitySrc, IEntitySource other, array< vector > mins, array< vector > maxes)
 
void SCR_AreaGeneratorBaseEntity (IEntitySource src, IEntity parent)
 
- Protected Member Functions inherited from SCR_GeneratorBaseEntity
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)
 

Protected Attributes

bool m_bAllowPartialRegeneration
 
bool m_bRegenerateEntireForest
 not saved to layer (see _WB_OnKeyChanged), used as a button
 
bool m_bPrintArea
 
bool m_bPrintEntitiesCount
 
bool m_bPrintPerformanceDetails
 
bool m_bDrawDebugShapes
 
bool m_bDrawDebugShapesObstacles
 
bool m_bDrawDebugShapesRectangulation
 
bool m_bDrawDebugShapesRegeneration
 
bool m_bEntitiesFollowTerrainOnShapeMove
 
ref array< ref ForestGeneratorLevelm_aLevels
 
ref array< ref ForestGeneratorClusterm_aClusters
 
ref Curve m_aGlobalOutlineScaleCurve
 
float m_fGlobalOutlineScaleCurveDistance
 
ref ForestGeneratorGrid m_Grid
 
ref array< vector > m_aShapePoints
 
ref array< ref SCR_ForestGeneratorLinem_aLines = {}
 
ref array< ref SCR_ForestGeneratorPointm_aMiddleOutlinePoints = {}
 
ref array< ref SCR_ForestGeneratorLinem_aSmallOutlineLines = {}
 
ref array< ref SCR_ForestGeneratorPointm_aSmallOutlinePoints = {}
 
ref array< ref SCR_ForestGeneratorLinem_aMiddleOutlineLines = {}
 
ref array< ref SCR_ForestGeneratorRectanglem_aRectangles = {}
 
ref array< ref SCR_ForestGeneratorRectanglem_aOutlineRectangles = {}
 
ref array< ref SCR_ForestGeneratorRectanglem_aNonOutlineRectangles = {}
 
ref array< ref ForestGeneratorTreeBasem_aGridEntries = {}
 
ref array< ref ForestGeneratorOutlinem_aOutlines = {}
 
float m_fMaxOutlinesWidth
 
float m_fArea
 
ref map< IEntitySource, float > m_mEntitySourceATLHeights
 
- Protected Attributes inherited from SCR_AreaGeneratorBaseEntity
bool m_bAvoidObjects
 
bool m_bAvoidRoads
 
bool m_bAvoidRivers
 
bool m_bAvoidPowerLines
 
bool m_bAvoidTracks
 
bool m_bAvoidLakes
 
bool m_bRegenerateByObstacleChanges
 
- Protected Attributes inherited from SCR_GeneratorBaseEntity
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 float SCALE_CURVE_RANGE = 100
 distance from shape in metre
 
static const float SCALE_CURVE_MAX_VALUE = 1
 
static const float SCALE_CURVE_MIN_VALUE = 0
 
static ref array< float > s_aPreviousPoints2D
 
static ref SCR_TimeMeasurementHelper s_Benchmark
 
static const int MAX_CLUSTER_ATTEMPT = 10
 
static ref SCR_DebugShapeManager s_DebugShapeManager
 
static const int REGENERATION_DELETION_COLOUR = Color.RED
 
static const int REGENERATION_CREATION_COLOUR = Color.GREEN
 
static const vector DEBUG_VERTICAL_LINE = "0 30 0"
 
static const float RECTANGULATION_SIZE = 50
 
static const float HECTARE_CONVERSION_FACTOR = 0.0001
 
static const float MIN_POSSIBLE_SCALE_VALUE = 0.001
 
static const string POINTDATA_CLASSNAME = ((TypeName)ForestGeneratorPointData).ToString()
 
static const int TREE_GROUPS_OFFSET_HACK = 10
 
static const int GRID_SIZE = 10
 
- Static Protected Attributes inherited from SCR_AreaGeneratorBaseEntity
static ref SCR_ObstacleDetector s_ObstacleDetector
 
static const float BBOX_CHECK_HEIGHT = 100.0
 
static const float AVOID_OBJECTS_CHECK_RADIUS = 0.1
 
- Static Protected Attributes inherited from SCR_GeneratorBaseEntity
static const int BASE_GENERATOR_COLOUR = Color.WHITE
 

Additional Inherited Members

- Public Member Functions inherited from SCR_GeneratorBaseEntity
override void _WB_OnParentChange (IEntitySource src, IEntitySource prevParentSrc)
 
override bool _WB_CanSelect (IEntitySource src)
 
map< int, ref ShapePointDataScriptBase > GetFirstPointDataMap (TypeName wantedType=ShapePointDataScriptBase)
 
map< int, ref array< ref ShapePointDataScriptBase > > GetPointDataMap (TypeName wantedType=ShapePointDataScriptBase)
 
override void _WB_OnCreate (IEntitySource src)
 
- Static Protected Member Functions inherited from SCR_GeneratorBaseEntity
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)
 

Detailed Description

A Forest Generator uses the following data:

  • Levels (Top trees, Middle trees, Outlines)
  • Clusters (Circles, Strips) These are loaded, processed (data check) Then trees are "generated" in a grid, managed C++ side Finally, the grid is used to create entities

Member Function Documentation

◆ _WB_OnInit()

override void ForestGeneratorEntity._WB_OnInit ( inout vector mat[4],
IEntitySource src )
protected

◆ _WB_OnKeyChanged()

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

◆ BeforeShapeTransformInternal()

override void ForestGeneratorEntity.BeforeShapeTransformInternal ( IEntitySource shapeEntitySrc,
ShapeEntity shapeEntity,
inout vector oldTransform[4] )
protected

◆ CalculateAreaForOutline() [1/2]

float ForestGeneratorEntity.CalculateAreaForOutline ( SCR_ForestGeneratorLine line,
ForestGeneratorOutline outline )
protected
Parameters
[in]line
[in]outline
Returns
the outline's surface in square metres

◆ CalculateAreaForOutline() [2/2]

float ForestGeneratorEntity.CalculateAreaForOutline ( SCR_ForestGeneratorPoint point,
ForestGeneratorOutline outline )
protected
Parameters
[in]point
[in]outline
Returns

◆ CalculateOutlineAnglesForPoints()

void ForestGeneratorEntity.CalculateOutlineAnglesForPoints ( notnull array< ref SCR_ForestGeneratorPoint > points)
protected
Parameters
[in]points

◆ DeletePreviousEntities()

int ForestGeneratorEntity.DeletePreviousEntities ( notnull array< float > currentPoints2D,
SCR_ForestGeneratorOutlinePositionChecker outlineChecker,
bool forceRegeneration = false )
protected

Delete previous entities - either all of them for a full regeneration, or out of shape (hehe) ones for partial regeneration.

Parameters
[in]currentPoints2D
[in]outlineChecker
[in]forceRegeneration
Returns

◆ Direction()

int ForestGeneratorEntity.Direction ( SCR_ForestGeneratorPoint a,
SCR_ForestGeneratorPoint b,
SCR_ForestGeneratorPoint c )
protected
Parameters
[in]a
[in]b
[in]c
Returns
0 for colinear, 2 for counter-clockwise, 1 for clockwise

◆ FillOutlineLinesAndPoints()

void ForestGeneratorEntity.FillOutlineLinesAndPoints ( notnull array< ref SCR_ForestGeneratorPoint > points)
protected
Parameters
[in]points

◆ FindRectanglesInCircle()

int ForestGeneratorEntity.FindRectanglesInCircle ( vector center,
float radius,
out array< SCR_ForestGeneratorRectangle > rectangles )
protected
Parameters
[in]center
[in]radius
[out]rectangles
Returns

◆ GenerateBottomTrees()

void ForestGeneratorEntity.GenerateBottomTrees ( array< float > polygon,
SCR_AABB bbox,
ForestGeneratorBottomLevel bottomLevel )
protected
Parameters
[in]polygon
[in]bbox
[in]bottomLevel

◆ GenerateCircleCluster()

void ForestGeneratorEntity.GenerateCircleCluster ( notnull ForestGeneratorCircleCluster cluster,
notnull array< float > polygon2D,
notnull SCR_AABB bbox )
protected
Parameters
[in]cluster
[in]polygon2D
[in]bbox

◆ GenerateEntities()

int ForestGeneratorEntity.GenerateEntities ( notnull array< float > previousPoints2D,
SCR_ForestGeneratorOutlinePositionChecker outlineChecker,
bool forceRegeneration = false )
protected
Parameters
[in]previousPoints2D
[in]outlineChecker
[in]forceRegeneration
Returns

◆ GenerateForestGeneratorTrees()

void ForestGeneratorEntity.GenerateForestGeneratorTrees ( array< float > polygon2D,
SCR_AABB bbox )
protected
Parameters
[in]polygon2D
[in]bbox

◆ GenerateOutlineTrees()

void ForestGeneratorEntity.GenerateOutlineTrees ( array< float > polygon,
SCR_AABB bbox,
ForestGeneratorOutline outline )
protected
Parameters
[in]polygon
[in]bbox
[in]outline

◆ GeneratePointInCircle() [1/2]

vector ForestGeneratorEntity.GeneratePointInCircle ( float innerRadius,
float outerRadius,
SCR_ForestGeneratorPoint point )
protected

Density is more important at the centre (random 0-radius)

Parameters
[in]innerRadius
[in]outerRadius
[in]point
Returns

◆ GeneratePointInCircle() [2/2]

vector ForestGeneratorEntity.GeneratePointInCircle ( float innerRadius,
float outerRadius,
vector circleCenter )
protected

Density is more important at the centre (random 0-radius)

Parameters
[in]innerRadius
[in]outerRadius
[in]circleCenter
Returns

◆ GenerateRandomPointInRectangle()

vector ForestGeneratorEntity.GenerateRandomPointInRectangle ( notnull SCR_ForestGeneratorRectangle rectangle)
protected
Parameters
[in]rectangle
Returns

◆ GenerateStripCluster()

void ForestGeneratorEntity.GenerateStripCluster ( notnull ForestGeneratorStripCluster cluster,
notnull array< float > polygon2D,
notnull SCR_AABB bbox )
protected
Parameters
[in]cluster
[in]polygon2D
[in]bbox

◆ GenerateTopTrees()

void ForestGeneratorEntity.GenerateTopTrees ( array< float > polygon,
SCR_AABB bbox,
ForestGeneratorTopLevel topLevel )
protected
Parameters
[in]polygon
[in]bbox
[in]topLevel

◆ GenerateTreeInsideRectangle()

void ForestGeneratorEntity.GenerateTreeInsideRectangle ( notnull SCR_ForestGeneratorRectangle rectangle,
notnull SCR_ForestGeneratorTreeLevel level,
notnull array< float > polygon,
vector worldMat[4] )
protected
Parameters
[in]rectangle
[in]level
[in]polygon
[in]worldMat

◆ GetClockWisePoints()

array< ref SCR_ForestGeneratorPoint > ForestGeneratorEntity.GetClockWisePoints ( notnull IEntitySource shapeEntitySource)
protected

Create a list of Forest Generator Points for each shape's vertices.

Parameters
[in]shapeEntitySourcean IEntitySource from a ShapeEntity (spline or polyline)
Returns
created Forest Generator Points or null if the provided IEntitySource is not a shape (has no Points object array)

◆ GetClusterObjectCount()

int ForestGeneratorEntity.GetClusterObjectCount ( notnull SmallForestGeneratorClusterObject clusterObject)
protected
Parameters
[in]clusterObject
Returns

◆ GetClusterPoint()

bool ForestGeneratorEntity.GetClusterPoint ( notnull array< float > polygon2D,
notnull SCR_AABB bbox,
out vector clusterCenter,
float additionalDistance,
bool allowInForest,
bool allowInOutline )
protected
Parameters
[in]polygon2D
[in]bbox
[out]clusterCenter
[in]additionalDistance
[in]allowInForest
[in]allowInOutline
Returns

◆ GetColorForTree()

int ForestGeneratorEntity.GetColorForTree ( int index,
SCR_ETreeType type )
protected
Parameters
[in]index
[in]type
Returns

◆ GetGaussianDistributionRandomIntInclusive()

int ForestGeneratorEntity.GetGaussianDistributionRandomIntInclusive ( int min,
float mid,
int max )
protected

SCR_Math.GetGaussianDistributionRandom but we use our own random generator and round the result.

Parameters
[in]min(included)
[in]midGaussian curve's middle point
[in]max(included)
Returns

◆ GetIsAnyTreeValid()

bool ForestGeneratorEntity.GetIsAnyTreeValid ( notnull array< ref TreeGroupClass > treeGroups)
protected
Parameters
[in]treeGroups
Returns

◆ IsBeforeOutlineBorder()

bool ForestGeneratorEntity.IsBeforeOutlineBorder ( notnull SCR_ForestGeneratorRectangle rectangle,
vector pointLocal,
float offset = 0 )
protected

same as IsInOutline but reversed

Parameters
[in]rectangle
[in]pointLocal
[in]offsetpositive to allow getting closer to shape inside outline, negative to get away from the outline border

◆ IsEntryValid()

bool ForestGeneratorEntity.IsEntryValid ( ForestGeneratorTree tree,
vector pointLocal )
protected
Parameters
[in]tree
[in]pointLocal
Returns

◆ IsInOutline()

bool ForestGeneratorEntity.IsInOutline ( notnull SCR_ForestGeneratorRectangle rectangle,
vector pointLocal,
float additionalDistance = 0 )
protected
Parameters
[in]rectangle
[in]pointLocal
[in]additionalDistance
Returns
whether or not pointLocal is in rectangle's outline

◆ IsIntersect() [1/2]

bool ForestGeneratorEntity.IsIntersect ( SCR_ForestGeneratorLine line,
SCR_ForestGeneratorRectangle rectangle )
protected
Parameters
[in]line
[in]rectangle
Returns

◆ IsIntersect() [2/2]

bool ForestGeneratorEntity.IsIntersect ( SCR_ForestGeneratorLine line1,
SCR_ForestGeneratorLine line2 )
protected
Parameters
[in]line1
[in]line2
Returns

◆ IsPointInProperDistanceFromLine()

bool ForestGeneratorEntity.IsPointInProperDistanceFromLine ( vector point,
SCR_ForestGeneratorLine line,
float minDistance,
float maxDistance )
protected
Parameters
[in]point
[in]line
[in]minDistance
[in]maxDistance
Returns

◆ MemoryCleanup()

void ForestGeneratorEntity.MemoryCleanup ( )
protected

Empty now-useless arrays.

◆ NeedsCheck()

bool ForestGeneratorEntity.NeedsCheck ( SCR_ForestGeneratorLine line,
SCR_ForestGeneratorRectangle rectangle )
protected
Parameters
[in]line
[in]rectangle
Returns

◆ OnLine()

bool ForestGeneratorEntity.OnLine ( SCR_ForestGeneratorLine line,
SCR_ForestGeneratorPoint point )
protected
Parameters
[in]line
[in]point
Returns

◆ OnPointChangedInternal()

override void ForestGeneratorEntity.OnPointChangedInternal ( IEntitySource shapeEntitySrc,
ShapeEntity shapeEntity,
PointChangedSituation situation,
int pointIndex,
vector position )
protected

◆ OnRegenerate()

override void ForestGeneratorEntity.OnRegenerate ( )
protected

◆ OnShapeChangedInternal()

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

◆ OnShapeInitInternal()

override void ForestGeneratorEntity.OnShapeInitInternal ( IEntitySource shapeEntitySrc,
ShapeEntity shapeEntity )
protected

◆ OnShapeTransformInternal()

override void ForestGeneratorEntity.OnShapeTransformInternal ( IEntitySource shapeEntitySrc,
ShapeEntity shapeEntity,
array< vector > mins,
array< vector > maxes )
protected

◆ PopulateGrid()

void ForestGeneratorEntity.PopulateGrid ( array< float > polygon2D,
array< vector > polygon3D )
protected
Parameters
[in]polygon2D
[in]polygon3D

◆ PreprocessAllTrees()

void ForestGeneratorEntity.PreprocessAllTrees ( )
protected

◆ PreprocessTreeArray()

bool ForestGeneratorEntity.PreprocessTreeArray ( notnull array< ref ForestGeneratorTree > trees,
int groupIdx,
SCR_ETreeType type,
int debugGroupIdx )
protected
Parameters
[in]trees
[in]groupIdx
[in]type
[in]debugGroupIdx
Returns

◆ Rectangulate()

void ForestGeneratorEntity.Rectangulate ( notnull SCR_AABB bbox,
notnull array< float > polygon2D )
protected
Parameters
[in]bbox
[in]polygon2D

◆ RegenerateForest()

void ForestGeneratorEntity.RegenerateForest ( bool forceRegeneration = false)
protected
Parameters
[in]forceRegeneration

◆ SafeRandomFloatInclusive()

float ForestGeneratorEntity.SafeRandomFloatInclusive ( float min,
float max )
protected

Get a random value between min and max, if min > max they are reversed.

Parameters
[in]min
[in]max
Returns

◆ SelectTreeToSpawn()

ForestGeneratorTree ForestGeneratorEntity.SelectTreeToSpawn ( vector point,
array< ref ForestGeneratorTree > trees )
protected
Parameters
[in]point
[in]trees
Returns

◆ SetObjectScale()

void ForestGeneratorEntity.SetObjectScale ( notnull SCR_ForestGeneratorTreeBase object)
protected
Parameters
[in]object

Member Data Documentation

◆ DEBUG_VERTICAL_LINE

const vector ForestGeneratorEntity.DEBUG_VERTICAL_LINE = "0 30 0"
staticprotected

◆ GRID_SIZE

const int ForestGeneratorEntity.GRID_SIZE = 10
staticprotected

◆ HECTARE_CONVERSION_FACTOR

const float ForestGeneratorEntity.HECTARE_CONVERSION_FACTOR = 0.0001
staticprotected

◆ m_aClusters

ref array<ref ForestGeneratorCluster> ForestGeneratorEntity.m_aClusters
protected

◆ m_aGlobalOutlineScaleCurve

ref Curve ForestGeneratorEntity.m_aGlobalOutlineScaleCurve
protected

◆ m_aGridEntries

ref array<ref ForestGeneratorTreeBase> ForestGeneratorEntity.m_aGridEntries = {}
protected

◆ m_aLevels

ref array<ref ForestGeneratorLevel> ForestGeneratorEntity.m_aLevels
protected

◆ m_aLines

ref array<ref SCR_ForestGeneratorLine> ForestGeneratorEntity.m_aLines = {}
protected

◆ m_aMiddleOutlineLines

ref array<ref SCR_ForestGeneratorLine> ForestGeneratorEntity.m_aMiddleOutlineLines = {}
protected

◆ m_aMiddleOutlinePoints

ref array<ref SCR_ForestGeneratorPoint> ForestGeneratorEntity.m_aMiddleOutlinePoints = {}
protected

◆ m_aNonOutlineRectangles

ref array<ref SCR_ForestGeneratorRectangle> ForestGeneratorEntity.m_aNonOutlineRectangles = {}
protected

◆ m_aOutlineRectangles

ref array<ref SCR_ForestGeneratorRectangle> ForestGeneratorEntity.m_aOutlineRectangles = {}
protected

◆ m_aOutlines

ref array<ref ForestGeneratorOutline> ForestGeneratorEntity.m_aOutlines = {}
protected

◆ m_aRectangles

ref array<ref SCR_ForestGeneratorRectangle> ForestGeneratorEntity.m_aRectangles = {}
protected

◆ m_aShapePoints

ref array<vector> ForestGeneratorEntity.m_aShapePoints
protected

◆ m_aSmallOutlineLines

ref array<ref SCR_ForestGeneratorLine> ForestGeneratorEntity.m_aSmallOutlineLines = {}
protected

◆ m_aSmallOutlinePoints

ref array<ref SCR_ForestGeneratorPoint> ForestGeneratorEntity.m_aSmallOutlinePoints = {}
protected

◆ m_bAllowPartialRegeneration

bool ForestGeneratorEntity.m_bAllowPartialRegeneration
protected

◆ m_bDrawDebugShapes

bool ForestGeneratorEntity.m_bDrawDebugShapes
protected

◆ m_bDrawDebugShapesObstacles

bool ForestGeneratorEntity.m_bDrawDebugShapesObstacles
protected

◆ m_bDrawDebugShapesRectangulation

bool ForestGeneratorEntity.m_bDrawDebugShapesRectangulation
protected

◆ m_bDrawDebugShapesRegeneration

bool ForestGeneratorEntity.m_bDrawDebugShapesRegeneration
protected

◆ m_bEntitiesFollowTerrainOnShapeMove

bool ForestGeneratorEntity.m_bEntitiesFollowTerrainOnShapeMove
protected

◆ m_bPrintArea

bool ForestGeneratorEntity.m_bPrintArea
protected

◆ m_bPrintEntitiesCount

bool ForestGeneratorEntity.m_bPrintEntitiesCount
protected

◆ m_bPrintPerformanceDetails

bool ForestGeneratorEntity.m_bPrintPerformanceDetails
protected

◆ m_bRegenerateEntireForest

bool ForestGeneratorEntity.m_bRegenerateEntireForest
protected

not saved to layer (see _WB_OnKeyChanged), used as a button

◆ m_fArea

float ForestGeneratorEntity.m_fArea
protected

◆ m_fGlobalOutlineScaleCurveDistance

float ForestGeneratorEntity.m_fGlobalOutlineScaleCurveDistance
protected

◆ m_fMaxOutlinesWidth

float ForestGeneratorEntity.m_fMaxOutlinesWidth
protected

◆ m_Grid

ref ForestGeneratorGrid ForestGeneratorEntity.m_Grid
protected

◆ m_mEntitySourceATLHeights

ref map<IEntitySource, float> ForestGeneratorEntity.m_mEntitySourceATLHeights
protected

◆ MAX_CLUSTER_ATTEMPT

const int ForestGeneratorEntity.MAX_CLUSTER_ATTEMPT = 10
staticprotected

◆ MIN_POSSIBLE_SCALE_VALUE

const float ForestGeneratorEntity.MIN_POSSIBLE_SCALE_VALUE = 0.001
staticprotected

◆ POINTDATA_CLASSNAME

const string ForestGeneratorEntity.POINTDATA_CLASSNAME = ((TypeName)ForestGeneratorPointData).ToString()
staticprotected

◆ RECTANGULATION_SIZE

const float ForestGeneratorEntity.RECTANGULATION_SIZE = 50
staticprotected

◆ REGENERATION_CREATION_COLOUR

const int ForestGeneratorEntity.REGENERATION_CREATION_COLOUR = Color.GREEN
staticprotected

◆ REGENERATION_DELETION_COLOUR

const int ForestGeneratorEntity.REGENERATION_DELETION_COLOUR = Color.RED
staticprotected

◆ s_aPreviousPoints2D

ref array<float> ForestGeneratorEntity.s_aPreviousPoints2D
staticprotected

◆ s_Benchmark

ref SCR_TimeMeasurementHelper ForestGeneratorEntity.s_Benchmark
staticprotected

◆ s_DebugShapeManager

ref SCR_DebugShapeManager ForestGeneratorEntity.s_DebugShapeManager
staticprotected

◆ SCALE_CURVE_MAX_VALUE

const float ForestGeneratorEntity.SCALE_CURVE_MAX_VALUE = 1
staticprotected

◆ SCALE_CURVE_MIN_VALUE

const float ForestGeneratorEntity.SCALE_CURVE_MIN_VALUE = 0
staticprotected

◆ SCALE_CURVE_RANGE

const float ForestGeneratorEntity.SCALE_CURVE_RANGE = 100
staticprotected

distance from shape in metre

◆ TREE_GROUPS_OFFSET_HACK

const int ForestGeneratorEntity.TREE_GROUPS_OFFSET_HACK = 10
staticprotected

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