Class VirgisLayer
Abstract parent for all Layer entities
Assembly: cs.temp.dll.dll
Syntax
public abstract class VirgisLayer : MonoBehaviour, IVirgisLayer, IVirgisEntity
Fields
_layer
Declaration
Field Value
Type |
Description |
RecordSet |
|
m_crs
Declaration
protected SpatialReference m_crs
Field Value
Type |
Description |
SpatialReference |
|
m_editable
Declaration
protected bool m_editable
Field Value
m_id
Declaration
Field Value
Properties
changed
true if this layer has been changed from the original file
Declaration
public bool changed { get; set; }
Property Value
featureType
Declaration
public FeatureType featureType { get; protected set; }
Property Value
isContainer
Declaration
public bool isContainer { get; protected set; }
Property Value
isWriteable
Declaration
public bool isWriteable { get; set; }
Property Value
sourceName
Declaration
public string sourceName { get; set; }
Property Value
subLayers
Declaration
public List<IVirgisLayer> subLayers { get; protected set; }
Property Value
Methods
_addFeature(DMesh3)
Declaration
protected virtual VirgisFeature _addFeature(DMesh3 mesh)
Parameters
Type |
Name |
Description |
DMesh3 |
mesh |
|
Returns
_addFeature(Vector3[])
Declaration
protected abstract VirgisFeature _addFeature(Vector3[] geometry)
Parameters
Type |
Name |
Description |
Vector3[] |
geometry |
|
Returns
_checkpoint()
Implement the layer specific checkpoint code here
Declaration
protected abstract void _checkpoint()
_draw()
Implment the layer specific draw code in this method
Declaration
protected abstract Task _draw()
Returns
_init()
Implement the layer specific init code in this method
Declaration
protected abstract Task _init()
Returns
_onEditStart(Boolean)
Declaration
protected virtual void _onEditStart(bool test)
Parameters
_onEditStop(Boolean)
Declaration
protected virtual void _onEditStop(bool test)
Parameters
_save()
Implment the layer specific draw code in this method
Declaration
protected abstract Task _save()
Returns
_set_editable()
Declaration
protected virtual void _set_editable()
_set_visible()
Declaration
public virtual void _set_visible()
AddFeature(DMesh3)
Call this to create a new feature from a DMesh3 object in Map Space coordinates
Declaration
public VirgisFeature AddFeature(DMesh3 mesh)
Parameters
Type |
Name |
Description |
DMesh3 |
mesh |
|
Returns
AddFeature(Vector3[])
Call this to create a new feature
Declaration
public VirgisFeature AddFeature(Vector3[] geometry)
Parameters
Type |
Name |
Description |
Vector3[] |
geometry |
|
Returns
Awake()
Declaration
CheckPoint()
Call this to tell the layers to create a checkpoint.
Only valid outside of an Edit Session. Inside an Edit Session use Save() as CheckPoint() will do nothing
Declaration
Draw()
Draw the layer based upon the features in the features RecordSet
Declaration
Returns
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Equals(VirgisLayer)
Declaration
public bool Equals(VirgisLayer other)
Parameters
Returns
GetClosest(Vector3, Guid[])
Get the Closest Feature to the coordinates. Exclude any Component Ids in the Exclude Array. The exclude lis is primarily used to avoid a GetClosest to a Faeture picking up the feature itself
Declaration
public VirgisFeature GetClosest(Vector3 coords, Guid[] exclude)
Parameters
Type |
Name |
Description |
Vector3 |
coords |
coordinates
|
Guid[] |
exclude |
|
Returns
Type |
Description |
VirgisFeature |
returns the featue contained in an enitity of type S
|
GetCrs()
Declaration
public SpatialReference GetCrs()
Returns
Type |
Description |
SpatialReference |
|
GetFeature(Guid)
Get the feature that matches the ID provided
Declaration
public VirgisFeature GetFeature(Guid id)
Parameters
Type |
Name |
Description |
Guid |
id |
ID
|
Returns
Type |
Description |
VirgisFeature |
returns the featue contained in an enitity of type S
|
GetFeatureShape()
Fetches the feature shape to be used to create new features
Declaration
public virtual GameObject GetFeatureShape()
Returns
Type |
Description |
GameObject |
|
GetHashCode()
Declaration
public override int GetHashCode()
Returns
GetId()
Declaration
Returns
Type |
Description |
Guid |
GUID
|
GetInfo(VirgisFeature)
Declaration
public virtual Dictionary<string, object> GetInfo(VirgisFeature feat)
Parameters
Returns
GetLayer()
Declaration
public VirgisLayer GetLayer()
Returns
Get the metadata for this Layer
Declaration
public RecordSet GetMetadata()
Returns
Type |
Description |
RecordSet |
|
Init(RecordSet)
Called to initialise this layer
If the data cannot be read, fails quitely and creates an empty layer
Declaration
public async Task Init(RecordSet layer)
Parameters
Type |
Name |
Description |
RecordSet |
layer |
The RecordSet object that defines this layer
|
Returns
IsEditable()
Test to see if this layer is currently being edited
Declaration
Returns
IsVisible()
Test if this layer is currently visible
Declaration
Returns
MoveAxis(MoveArgs)
Called whenever a member entity is asked to Change Axis
Declaration
public virtual void MoveAxis(MoveArgs args)
Parameters
Type |
Name |
Description |
MoveArgs |
args |
MoveArgs Object
|
MoveTo(MoveArgs)
Declaration
public virtual void MoveTo(MoveArgs args)
Parameters
OnDestroy()
Declaration
protected void OnDestroy()
OnEdit(Boolean)
Declaration
public void OnEdit(bool inSession)
Parameters
Type |
Name |
Description |
Boolean |
inSession |
|
Save()
Called to save the current layer data to source
Declaration
public virtual async Task<RecordSet> Save()
Returns
Type |
Description |
Task<RecordSet> |
A copy of the data save dot the source
|
Selected(SelectionType)
called when a daughter IVirgisEntity is selected
Declaration
public virtual void Selected(SelectionType button)
Parameters
SetCrs(SpatialReference)
Declaration
public void SetCrs(SpatialReference crs)
Parameters
Type |
Name |
Description |
SpatialReference |
crs |
SpatialReference
|
SetEditable(Boolean)
Sets a marker that this particular layer is being edited.
Declaration
public void SetEditable(bool inSession)
Parameters
Type |
Name |
Description |
Boolean |
inSession |
|
Declaration
public void SetMetadata(RecordSet layer)
Parameters
Type |
Name |
Description |
RecordSet |
layer |
Data tyoe that inherits form RecordSet
|
SetVisible(Boolean)
Change the layer visibility
Declaration
public virtual void SetVisible(bool visible)
Parameters
Type |
Name |
Description |
Boolean |
visible |
|
Start()
Declaration
SubInit(RecordSet)
Called to Initialise a sublayer
Declaration
public async Task SubInit(RecordSet layer)
Parameters
Type |
Name |
Description |
RecordSet |
layer |
The RecordSet object that defines this layer
|
Returns
Translate(MoveArgs)
Called Whenever a member entity is asked to Translate
Declaration
public virtual void Translate(MoveArgs args)
Parameters
Type |
Name |
Description |
MoveArgs |
args |
MoveArge Object
|
UnSelected(SelectionType)
Called when a daughter IVirgisEntity is UnSelected
Declaration
public virtual void UnSelected(SelectionType button)
Parameters
VertexMove(MoveArgs)
Declaration
public virtual void VertexMove(MoveArgs args)
Parameters
Implements