|
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_ForestGeneratorPoint > | GetClockWisePoints (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) |
|
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) |
|
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) |
|
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