Arma Reforger Script API
|
NEW SLOT SYSTEM: More...
Protected Member Functions | |
bool | HasCommonPointXZ (notnull SCR_PowerlineGeneratorEntity other) |
void | FindCommonJunctionSourcesPointsXZ (notnull map< IEntitySource, IEntitySource > otherJunctionSources) |
Fills m_mOtherJunctionEntitySources with the provided junction poles that are on the current shape's anchor points It prevents duplicates but does not filter out if the provided junction poles belong to the current generator. | |
void | GenerateJunctions () |
Generate junctions, happening before generating poles. | |
override bool | _WB_OnKeyChanged (BaseContainer src, string key, BaseContainerList ownerContainers, IEntity parent) |
void | GeneratePoles () |
Generates power poles position first then creates poles and cables if valid. | |
bool | GetPolesRelPosition (notnull map< int, ref ShapePointDataScriptBase > pointsData, notnull out array< vector > polePointsRelPos, notnull out map< int, ref SCR_PowerlineGeneratorPointData > pointDataMap) |
Generates poles relative positions for powerline generator based on anchor points, tesselated points and powerline data. | |
void | CreatePolesAndCables (notnull array< vector > polePointsRelPos, notnull array< vector > anchorPointsRelPos, notnull map< int, ref SCR_PowerlineGeneratorPointData > pointsData) |
Creates poles and cables between given points with optional random pitch and roll, snaps to terrain if no junction found. | |
IEntitySource | FindJunctionSourceOnPointXZ (vector point, out bool sameLine) |
Get the junction holder present on the provided point. | |
array< IEntitySource > | CreatePowerLines (SCR_PowerPole existingPole, SCR_PowerPole addedPole, bool isSameLine) |
Creates power lines between two power poles based on their cable types, if they have compatible slots. | |
override void | OnShapeInitInternal (IEntitySource shapeEntitySrc, ShapeEntity shapeEntity) |
override void | OnShapeChangedInternal (IEntitySource shapeEntitySrc, ShapeEntity shapeEntity, array< vector > mins, array< vector > maxes) |
![]() | |
override void | OnShapeTransformInternal (IEntitySource shapeEntitySrc, ShapeEntity shapeEntity, array< vector > mins, array< vector > maxes) |
void | UpdateTerrainSimple (bool forceUpdate=false) |
wrapper method around UpdateTerrain that sets m_ShapeEntity up | |
void | UpdateTerrain (notnull ShapeEntity shapeEntity, bool forceUpdate, notnull array< vector > updateMins, notnull array< vector > updateMaxes) |
void | SCR_LineTerrainShaperGeneratorBaseEntity (IEntitySource src, IEntity parent) |
![]() | |
void | ResetShapeNextPointHelper () |
override void | _WB_AfterWorldUpdate (float timeSlice) |
override int | _WB_GetAfterWorldUpdateSpecs (IEntitySource src) |
![]() | |
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 void | GenerateGeneratorJunctions (notnull IEntitySource generator, bool drawDebugShapes=false) |
Generates junctions for selected powerline generators, optionally drawing debug shapes, and generates poles for them. | |
static void | CreateStaticDebugShapes (notnull array< vector > absolutePoints) |
static IEntitySource | GetPowerPoleSourceFromEntitySource (notnull IEntitySource powerPoleEntitySource) |
Get the first power pole, either the entity or one of its direct children. | |
static void | QueryGenerators (notnull IEntitySource generator, out array< IEntitySource > checkedGenerators=null) |
Get all connected generators and store them in s_CurrentQueryGenerator. | |
static bool | QueryFilter (IEntity entity) |
Filter used by QueryGenerators' QueryEntitiesByAABB call (QueryEntitiesCallback signature) | |
![]() | |
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) |
Static Protected Attributes | |
static ref array< IEntitySource > | s_aGenerators = {} |
static IEntitySource | s_CurrentQueryGenerator |
static ref SCR_DebugShapeManager | s_DebugShapeManager |
static const float | TOLERANCE_SQUARED = 0.01 |
static const float | MIN_CABLE_LENGTH_SQ = 0.01 |
static const float | GENERATOR_BBOX_TOLERANCE = 5 |
static const string | POWER_LINE_CLASS = "PowerlineEntity" |
static const SCR_EPoleCableType | DEFAULT_CABLE_TYPE = SCR_EPoleCableType.POWER_LV |
static const float | POLE_DISTANCE_TOLERANCE = 1.0 |
static const int | DEBUG_POLE_COLOUR_POS = Color.BLUE & 0x00FFFFFF | 0x88000000 |
static const int | DEBUG_POLE_COLOUR_ERROR = Color.RED & 0x00FFFFFF | 0x88000000 |
static const float | DEBUG_POLE_SIZE = 1 |
static const vector | DEBUG_POLE_POS = "0 5 0" |
static const int | DEBUG_SLOT_COLOUR_POS = Color.DARK_GREEN & 0x00FFFFFF | 0x88000000 |
static const int | DEBUG_SLOT_COLOUR_UNUSED = Color.ORANGE & 0x00FFFFFF | 0x88000000 |
static const float | DEBUG_SLOT_SIZE = 0.1 |
static const int | DEBUG_CABLE_LENGTH_COLOUR_ERROR_SPHERE = Color.RED & 0x00FFFFFF | 0xAA000000 |
static const int | DEBUG_CABLE_LENGTH_COLOUR_ERROR_LINE = Color.RED |
static const vector | DEBUG_CABLE_LENGTH_POS = "0 3 0" |
static const float | DEBUG_CABLE_LENGTH_POS_MAX_DIST = DEBUG_CABLE_LENGTH_POS.Length() |
static const float | DEBUG_CABLE_LENGTH_SIZE = 0.5 |
static const int | DEBUG_CABLE_COLOUR_POS = Color.YELLOW & 0x00FFFFFF | 0x88000000 |
virtual power cables | |
static const int | DEBUG_GENERATOR_COLOUR = Color.GREEN |
generators's bounding box | |
static const int | DEBUG_GENERATOR_MIN_HEIGHT = 20 |
![]() | |
static const ref array< string > | TERRAIN_UPDATE_KEYS |
static const string | OFFSET_SHAPE_COLOUR = "1 0 1 1" |
![]() | |
static const int | BASE_GENERATOR_COLOUR = Color.WHITE |
Additional Inherited Members | |
![]() | |
override void | _WB_OnInit (inout vector mat[4], IEntitySource src) |
override void | _WB_OnCreate (IEntitySource src) |
override void | _WB_OnParentChange (IEntitySource src, IEntitySource prevParentSrc) |
override void | _WB_OnDelete (IEntitySource src) |
![]() | |
override bool | _WB_CanSelect (IEntitySource src) |
map< int, ref ShapePointDataScriptBase > | GetFirstPointDataMap (TypeName wantedType=ShapePointDataScriptBase) |
map< int, ref array< ref ShapePointDataScriptBase > > | GetPointDataMap (TypeName wantedType=ShapePointDataScriptBase) |
NEW SLOT SYSTEM:
Power Poles have slot groups of a certain type (Low Voltage, High Voltage, Ultra High Voltage, Telephone, etc - see SCR_EPoleCableType)
|
protected |
Implements SCR_LineTerrainShaperGeneratorBaseEntity.
|
protected |
Creates poles and cables between given points with optional random pitch and roll, snaps to terrain if no junction found.
[in] | polePointsRelpos | |
[in] | anchorPointsRelPos | |
[in] | pointsData |
|
protected |
Creates power lines between two power poles based on their cable types, if they have compatible slots.
[in] | existingPole | existing pole represents the current power pole in the scene |
[in] | addedPole | added pole represents the new pole being added to the power line |
[in] | isSameLine | true if poles are on the same line, false if a junction is connecting another line |
|
staticprotected |
[in] | absolutePoints |
|
protected |
Fills m_mOtherJunctionEntitySources with the provided junction poles that are on the current shape's anchor points It prevents duplicates but does not filter out if the provided junction poles belong to the current generator.
[in] | otherJunctionPoles |
|
protected |
Get the junction holder present on the provided point.
[in] | point | the relative position to check |
[out] | sameLine | whether the found junction is one of the current generator's junction points |
|
staticprotected |
Generates junctions for selected powerline generators, optionally drawing debug shapes, and generates poles for them.
[in] | generator | Generates junctions for powerline generators in the world editor, also handles pole generation based on new placement system. |
[in] | drawDebugShapes | Determines whether debug shapes for generator junctions are drawn during execution. |
|
protected |
Generate junctions, happening before generating poles.
|
protected |
Generates power poles position first then creates poles and cables if valid.
|
protected |
Generates poles relative positions for powerline generator based on anchor points, tesselated points and powerline data.
[in] | pointsData | |
[out] | polePointsRelPos | pole positions |
[out] | pointDataMap | map of <pole point index, pointData> (unrelated to position, only index) |
|
staticprotected |
Get the first power pole, either the entity or one of its direct children.
[in] | powerPoleEntitySource | the power pole's entity source |
|
protected |
[in] | other | the other power line generator |
|
protected |
Implements SCR_LineTerrainShaperGeneratorBaseEntity.
|
protected |
Implements SCR_LineTerrainShaperGeneratorBaseEntity.
|
staticprotected |
Filter used by QueryGenerators' QueryEntitiesByAABB call (QueryEntitiesCallback signature)
|
staticprotected |
Get all connected generators and store them in s_CurrentQueryGenerator.
[in] | generator | the generator to check |
[out] | checkedGenerators | an array of already-checked generators (if not provided, will be created and filled) |
|
protected |
Used by Obstacle Detector.
|
staticprotected |
virtual power cables
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
generators's bounding box
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |