Loading...
Searching...
No Matches
SCR_ImportShapefilePlugin Interface Reference
Inheritance diagram for SCR_ImportShapefilePlugin:

Protected Member Functions

override void Run ()
 
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 (notnull GeoShapeCollection shapeCollection, out notnull array< ref SCR_GeneratorShapeImportData > shapeDataArray, out GeoShapeType shapeType)
 
void Load_Point (notnull GeoPoint point)
 Load from GeoPoint (using CreateFromPoints)
 
void Load_Multipoint (notnull GeoMultiPoint multipoint)
 Load from GeoMultiPoint (using CreateFromPoints)
 
array< ref SCR_GeneratorShapeImportDataLoad_Polygons (notnull GeoPolygon polygon)
 Load polygons (closed shapes)
 
array< ref SCR_GeneratorShapeImportDataLoad_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 SCR_GeneratorShapeImportData > forestShapeDataArray)
 modifies forestShapeData but sets it back to its original value afterwards (duplicates a point then removes it)
 
void GeneratePowerLinePointData (notnull array< ref SCR_GeneratorShapeImportData > shapeDataArray)
 
void AttachChildren (notnull array< ref SCR_GeneratorShapeImportData > shapeDataArray)
 
int ButtonProcess ()
 
int ButtonCancel ()
 

Protected Attributes

string m_sSHPFilePath
 
vector m_vOffset
 
ref SCR_SHPPrefabDataList m_PrefabDataList
 
bool m_bRandomYaw
 
bool m_bGenerateForestGeneratorPointData
 
bool m_bGeneratePowerlinePerPointPointData
 
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
 
static const string PLUGIN_NAME = "Import Shapefile"
 

Member Function Documentation

◆ AttachChildren()

void SCR_ImportShapefilePlugin.AttachChildren ( notnull array< ref SCR_GeneratorShapeImportData > shapeDataArray)
protected

◆ ButtonCancel()

int SCR_ImportShapefilePlugin.ButtonCancel ( )
protected

◆ ButtonProcess()

int SCR_ImportShapefilePlugin.ButtonProcess ( )
protected

◆ CreateComment()

void SCR_ImportShapefilePlugin.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_ImportShapefilePlugin.CreateFromPoints ( notnull GeoShape shape,
notnull array< vector > points )
protected

Common method treating points from POINT or MULTI_POINT GeoShapes.

◆ Execute()

void SCR_ImportShapefilePlugin.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_ImportShapefilePlugin.GenerateForestGeneratorPointData ( notnull array< ref SCR_GeneratorShapeImportData > forestShapeDataArray)
protected

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

Parameters
[in]forestShapeDataArray

◆ GeneratePowerLinePointData()

void SCR_ImportShapefilePlugin.GeneratePowerLinePointData ( notnull array< ref SCR_GeneratorShapeImportData > shapeDataArray)
protected

◆ GetPrefab()

ResourceName SCR_ImportShapefilePlugin.GetPrefab ( int id = RANDOM_PREFAB_ID)
protected

◆ HasPrefabListPrefabs()

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

◆ IsPointDuplicate()

bool SCR_ImportShapefilePlugin.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_ImportShapefilePlugin.Load_Multipoint ( notnull GeoMultiPoint multipoint)
protected

Load from GeoMultiPoint (using CreateFromPoints)

◆ Load_Point()

void SCR_ImportShapefilePlugin.Load_Point ( notnull GeoPoint point)
protected

Load from GeoPoint (using CreateFromPoints)

◆ Load_Polygons()

array< ref SCR_GeneratorShapeImportData > SCR_ImportShapefilePlugin.Load_Polygons ( notnull GeoPolygon polygon)
protected

Load polygons (closed shapes)

◆ Load_Polylines()

array< ref SCR_GeneratorShapeImportData > SCR_ImportShapefilePlugin.Load_Polylines ( notnull GeoPolyline polyline)
protected

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

◆ ProcessShapes()

void SCR_ImportShapefilePlugin.ProcessShapes ( notnull GeoShapeCollection shapeCollection,
out notnull array< ref SCR_GeneratorShapeImportData > shapeDataArray,
out GeoShapeType shapeType )
protected
Parameters
[in]shapeCollection
[out]shapeDataArray
[out]shapeType

◆ Run()

override void SCR_ImportShapefilePlugin.Run ( )
protected

Member Data Documentation

◆ COMMENT_ENTITY_CLASS

const string SCR_ImportShapefilePlugin.COMMENT_ENTITY_CLASS = "CommentEntity"
staticprotected

◆ COMMENT_FACE_CAMERA

const bool SCR_ImportShapefilePlugin.COMMENT_FACE_CAMERA = true
staticprotected

◆ COMMENT_TEXT_BACKGROUND

const bool SCR_ImportShapefilePlugin.COMMENT_TEXT_BACKGROUND = true
staticprotected

◆ COMMENT_TEXT_COLOUR

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

◆ COMMENT_TEXT_SIZE

const float SCR_ImportShapefilePlugin.COMMENT_TEXT_SIZE = 2
staticprotected

◆ DUPLICATE_RADIUS_SQ

const float SCR_ImportShapefilePlugin.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_ImportShapefilePlugin.EDITABLE_COMMENT_COMPONENT_CLASS = "SCR_EditableCommentComponent"
staticprotected

◆ EDITABLE_COMMENT_UI_INFO_CLASS

const string SCR_ImportShapefilePlugin.EDITABLE_COMMENT_UI_INFO_CLASS = "SCR_EditableCommentUIInfo"
staticprotected

◆ m_bCreateAsSpline

bool SCR_ImportShapefilePlugin.m_bCreateAsSpline
protected

◆ m_bGenerateForestGeneratorPointData

bool SCR_ImportShapefilePlugin.m_bGenerateForestGeneratorPointData
protected

◆ m_bGeneratePowerlinePerPointPointData

bool SCR_ImportShapefilePlugin.m_bGeneratePowerlinePerPointPointData
protected

◆ m_bRandomYaw

bool SCR_ImportShapefilePlugin.m_bRandomYaw
protected

◆ m_PrefabDataList

ref SCR_SHPPrefabDataList SCR_ImportShapefilePlugin.m_PrefabDataList
protected

◆ m_sCommentsColumnName

string SCR_ImportShapefilePlugin.m_sCommentsColumnName
protected

◆ m_sIDColumnName

string SCR_ImportShapefilePlugin.m_sIDColumnName
protected

◆ m_sSHPFilePath

string SCR_ImportShapefilePlugin.m_sSHPFilePath
protected

◆ m_vOffset

vector SCR_ImportShapefilePlugin.m_vOffset
protected

◆ m_vShapeColor

vector SCR_ImportShapefilePlugin.m_vShapeColor
protected

◆ MAP_DESCRIPTOR_COMPONENT_CLASS

const string SCR_ImportShapefilePlugin.MAP_DESCRIPTOR_COMPONENT_CLASS = "SCR_MapDescriptorComponent"
staticprotected

◆ PLUGIN_NAME

const string SCR_ImportShapefilePlugin.PLUGIN_NAME = "Import Shapefile"
staticprotected

◆ POLYLINE_SHAPE_ENTITY_CLASS

const string SCR_ImportShapefilePlugin.POLYLINE_SHAPE_ENTITY_CLASS = "PolylineShapeEntity"
staticprotected

◆ RANDOM_PREFAB_ID

const int SCR_ImportShapefilePlugin.RANDOM_PREFAB_ID = -1
staticprotected

◆ SPLINE_SHAPE_ENTITY_CLASS

const string SCR_ImportShapefilePlugin.SPLINE_SHAPE_ENTITY_CLASS = "SplineShapeEntity"
staticprotected

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