Arma Reforger Script API
Loading...
Searching...
No Matches
Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SCR_ImportShapefileTool Interface Reference
Inheritance diagram for SCR_ImportShapefileTool:
[legend]

Protected Member Functions

void Execute ()
 Load the SHP file and treat all the shapes present in it Multiple shape types can be present in the same SHP file (although it is not recommended data-wise)
 
void ProcessShapes (GeoShapeCollection shapeCollection, out notnull array< ref ForestGeneratorShapeImportData > forestShapeData)
 
void Load_Point (notnull GeoPoint point)
 Load from GeoPoint (using CreateFromPoints)
 
void Load_Multipoint (notnull GeoMultiPoint multipoint)
 Load from GeoMultiPoint (using CreateFromPoints)
 
array< ref ForestGeneratorShapeImportDataLoad_Polygons (notnull GeoPolygon polygon)
 Load polygons (closed shapes)
 
array< ref ForestGeneratorShapeImportDataLoad_Polylines (notnull GeoPolyline polyline)
 Load polylines (open shapes) - as polyline or spline, depending on m_bCreateAsSpline.
 
void CreateFromPoints (notnull GeoShape shape, notnull array< vector > points)
 Common method treating points from POINT or MULTI_POINT GeoShapes.
 
void CreateComment (string comment, vector pos, ResourceName commentPrefab=string.Empty)
 Create a comment from provided arguments. if the prefab is empty, creates a CommentEntity comment.
 
bool HasPrefabListPrefabs ()
 
ResourceName GetPrefab (int id=RANDOM_PREFAB_ID)
 
bool IsPointDuplicate (vector toCheck, array< vector > points)
 
void GenerateForestGeneratorPointData (notnull array< ref ForestGeneratorShapeImportData > forestShapeDataArray)
 modifies forestShapeData but sets it back to its original value afterwards (duplicates a point then removes it)
 
void AttachChildren (notnull array< ref ForestGeneratorShapeImportData > forestShapeDataArray)
 

Protected Attributes

ResourceName m_sSHPPath
 
vector m_vOffset
 
ref SCR_SHPPrefabDataList m_PrefabDataList
 
bool m_bRandomYaw
 
bool m_bGenerateForestGeneratorPointData
 
string m_sIDColumnName
 
string m_sCommentsColumnName
 
vector m_vShapeColor
 
bool m_bCreateAsSpline
 

Static Protected Attributes

static const float DUPLICATE_RADIUS_SQ = 0.1 * 0.1
 anything below this distance will be considered a duplicate point
 
static const int RANDOM_PREFAB_ID = -1
 
static const string COMMENT_ENTITY_CLASS = "CommentEntity"
 
static const string EDITABLE_COMMENT_COMPONENT_CLASS = "SCR_EditableCommentComponent"
 
static const string EDITABLE_COMMENT_UI_INFO_CLASS = "SCR_EditableCommentUIInfo"
 
static const string MAP_DESCRIPTOR_COMPONENT_CLASS = "SCR_MapDescriptorComponent"
 
static const string POLYLINE_SHAPE_ENTITY_CLASS = "PolylineShapeEntity"
 
static const string SPLINE_SHAPE_ENTITY_CLASS = "SplineShapeEntity"
 
static const vector COMMENT_TEXT_COLOUR = { 1, 0.960998, 0.297002 }
 
static const float COMMENT_TEXT_SIZE = 2
 
static const bool COMMENT_TEXT_BACKGROUND = true
 
static const bool COMMENT_FACE_CAMERA = true
 

Member Function Documentation

◆ AttachChildren()

void SCR_ImportShapefileTool.AttachChildren ( notnull array< ref ForestGeneratorShapeImportData forestShapeDataArray)
protected

◆ CreateComment()

void SCR_ImportShapefileTool.CreateComment ( string  comment,
vector  pos,
ResourceName  commentPrefab = string::Empty 
)
protected

Create a comment from provided arguments. if the prefab is empty, creates a CommentEntity comment.

◆ CreateFromPoints()

void SCR_ImportShapefileTool.CreateFromPoints ( notnull GeoShape  shape,
notnull array< vector >  points 
)
protected

Common method treating points from POINT or MULTI_POINT GeoShapes.

◆ Execute()

void SCR_ImportShapefileTool.Execute ( )
protected

Load the SHP file and treat all the shapes present in it Multiple shape types can be present in the same SHP file (although it is not recommended data-wise)

◆ GenerateForestGeneratorPointData()

void SCR_ImportShapefileTool.GenerateForestGeneratorPointData ( notnull array< ref ForestGeneratorShapeImportData forestShapeDataArray)
protected

modifies forestShapeData but sets it back to its original value afterwards (duplicates a point then removes it)

◆ GetPrefab()

ResourceName SCR_ImportShapefileTool.GetPrefab ( int  id = RANDOM_PREFAB_ID)
protected

◆ HasPrefabListPrefabs()

bool SCR_ImportShapefileTool.HasPrefabListPrefabs ( )
protected
Returns
true if the prefab list has at least one non-empty prefab

◆ IsPointDuplicate()

bool SCR_ImportShapefileTool.IsPointDuplicate ( vector  toCheck,
array< vector >  points 
)
protected
Returns
true if the provided point distance is less than DUPLICATE_RADIUS from one of the provided points

◆ Load_Multipoint()

void SCR_ImportShapefileTool.Load_Multipoint ( notnull GeoMultiPoint  multipoint)
protected

Load from GeoMultiPoint (using CreateFromPoints)

◆ Load_Point()

void SCR_ImportShapefileTool.Load_Point ( notnull GeoPoint  point)
protected

Load from GeoPoint (using CreateFromPoints)

◆ Load_Polygons()

array< ref ForestGeneratorShapeImportData > SCR_ImportShapefileTool.Load_Polygons ( notnull GeoPolygon  polygon)
protected

Load polygons (closed shapes)

◆ Load_Polylines()

array< ref ForestGeneratorShapeImportData > SCR_ImportShapefileTool.Load_Polylines ( notnull GeoPolyline  polyline)
protected

Load polylines (open shapes) - as polyline or spline, depending on m_bCreateAsSpline.

◆ ProcessShapes()

void SCR_ImportShapefileTool.ProcessShapes ( GeoShapeCollection  shapeCollection,
out notnull array< ref ForestGeneratorShapeImportData forestShapeData 
)
protected

Member Data Documentation

◆ COMMENT_ENTITY_CLASS

const string SCR_ImportShapefileTool.COMMENT_ENTITY_CLASS = "CommentEntity"
staticprotected

◆ COMMENT_FACE_CAMERA

const bool SCR_ImportShapefileTool.COMMENT_FACE_CAMERA = true
staticprotected

◆ COMMENT_TEXT_BACKGROUND

const bool SCR_ImportShapefileTool.COMMENT_TEXT_BACKGROUND = true
staticprotected

◆ COMMENT_TEXT_COLOUR

const vector SCR_ImportShapefileTool.COMMENT_TEXT_COLOUR = { 1, 0.960998, 0.297002 }
staticprotected

◆ COMMENT_TEXT_SIZE

const float SCR_ImportShapefileTool.COMMENT_TEXT_SIZE = 2
staticprotected

◆ DUPLICATE_RADIUS_SQ

const float SCR_ImportShapefileTool.DUPLICATE_RADIUS_SQ = 0.1 * 0.1
staticprotected

anything below this distance will be considered a duplicate point

◆ EDITABLE_COMMENT_COMPONENT_CLASS

const string SCR_ImportShapefileTool.EDITABLE_COMMENT_COMPONENT_CLASS = "SCR_EditableCommentComponent"
staticprotected

◆ EDITABLE_COMMENT_UI_INFO_CLASS

const string SCR_ImportShapefileTool.EDITABLE_COMMENT_UI_INFO_CLASS = "SCR_EditableCommentUIInfo"
staticprotected

◆ m_bCreateAsSpline

bool SCR_ImportShapefileTool.m_bCreateAsSpline
protected

◆ m_bGenerateForestGeneratorPointData

bool SCR_ImportShapefileTool.m_bGenerateForestGeneratorPointData
protected

◆ m_bRandomYaw

bool SCR_ImportShapefileTool.m_bRandomYaw
protected

◆ m_PrefabDataList

ref SCR_SHPPrefabDataList SCR_ImportShapefileTool.m_PrefabDataList
protected

◆ m_sCommentsColumnName

string SCR_ImportShapefileTool.m_sCommentsColumnName
protected

◆ m_sIDColumnName

string SCR_ImportShapefileTool.m_sIDColumnName
protected

◆ m_sSHPPath

ResourceName SCR_ImportShapefileTool.m_sSHPPath
protected

◆ m_vOffset

vector SCR_ImportShapefileTool.m_vOffset
protected

◆ m_vShapeColor

vector SCR_ImportShapefileTool.m_vShapeColor
protected

◆ MAP_DESCRIPTOR_COMPONENT_CLASS

const string SCR_ImportShapefileTool.MAP_DESCRIPTOR_COMPONENT_CLASS = "SCR_MapDescriptorComponent"
staticprotected

◆ POLYLINE_SHAPE_ENTITY_CLASS

const string SCR_ImportShapefileTool.POLYLINE_SHAPE_ENTITY_CLASS = "PolylineShapeEntity"
staticprotected

◆ RANDOM_PREFAB_ID

const int SCR_ImportShapefileTool.RANDOM_PREFAB_ID = -1
staticprotected

◆ SPLINE_SHAPE_ENTITY_CLASS

const string SCR_ImportShapefileTool.SPLINE_SHAPE_ENTITY_CLASS = "SplineShapeEntity"
staticprotected

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