Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtAbstractLayer Class Reference

#include <AbstractLayer.h>

Inheritance diagram for vtAbstractLayer:
vtLayer

Public Member Functions

 vtAbstractLayer (vtTerrain *pTerr)
 
void SetLayerName (const vtString &fname)
 
vtString GetLayerName ()
 
void SetVisible (bool vis)
 
bool GetVisible ()
 
void SetFeatureSet (vtFeatureSet *pSet)
 
vtFeatureSetGetFeatureSet () const
 
vtGroupGetLabelGroup () const
 
vtGroupGetContainer () const
 
vtVisualGetViz (vtFeature *feat)
 
vtMultiTextureGetMultiTexture () const
 
void CreateContainer ()
 
void CreateStyledFeatures ()
 
bool CreateTextureOverlay ()
 
void CreateLineGeometryForPoints ()
 
void CreateStyledFeature (int iIndex)
 
void CreateObjectGeometry (uint iIndex)
 
void CreateLineGeometry (uint iIndex)
 
void CreateFeatureLabel (uint iIndex)
 
void ReleaseGeometry ()
 
void ReleaseFeatureGeometry (vtFeature *f)
 
void Rebuild ()
 
void RebuildFeature (uint iIndex)
 
void UpdateVisualSelection ()
 
void Reload ()
 
void EditBegin ()
 
void EditEnd ()
 
void DeleteFeature (vtFeature *f)
 
void SetProperties (const vtTagArray &props)
 Set the properties for this layer, which includes style.
 
vtTagArrayGetProperties ()
 Get the properties for this layer, which includes style.
 
- Public Member Functions inherited from vtLayer
 vtLayer (LayerType type)
 
LayerType GetType ()
 
bool SetVisible (bool bVisible)
 
bool GetVisible ()
 
void SetModified (bool bModified)
 
bool GetModified ()
 
void SetSticky (bool bSticky)
 
bool GetSticky ()
 
bool IsNative ()
 
wxString GetImportedFrom ()
 
void SetImportedFrom (const wxString &fname)
 
bool Save (bool progress_callback(int)=NULL)
 
bool SaveAs (const wxString &filename=_T(""), bool progress_callback(int)=NULL)
 
bool Load (const wxString &filename=_T(""))
 
virtual bool GetExtent (DRECT &rect)=0
 Get the extents.
 
virtual void DrawLayer (wxDC *pDC, vtScaledView *pView)=0
 
virtual bool TransformCoords (vtProjection &proj)=0
 Transform the coordinates into another CRS.
 
virtual bool OnSave (bool progress_callback(int)=NULL)=0
 
virtual bool OnLoad ()=0
 
virtual bool AppendDataFrom (vtLayer *pL)=0
 Merge the contents of another layer (of the same type)
 
virtual void GetProjection (vtProjection &proj)=0
 Get the CRS.
 
virtual void SetProjection (const vtProjection &proj)=0
 Set the CRS, which does not reproject.
 
virtual void Offset (const DPoint2 &p)
 Shift all the coordinates by a horizontal offset.
 
virtual bool SetExtent (const DRECT &rect)
 
virtual void GetPropertyText (wxString &str)
 
virtual wxString GetFileExtension ()
 
virtual bool CanBeSaved ()
 
virtual wxString GetLayerFilename ()
 
virtual void SetLayerFilename (const wxString &fname)
 
virtual bool AskForSaveFilename ()
 
vtString GetExportFilename (const wxString &format_filter)
 
bool GetAreaExtent (DRECT &rect)
 
virtual void OnLeftDown (BuilderView *pView, UIContext &ui)
 
virtual void OnLeftUp (BuilderView *pView, UIContext &ui)
 
virtual void OnRightDown (BuilderView *pView, UIContext &ui)
 
virtual void OnRightUp (BuilderView *pView, UIContext &ui)
 
virtual void OnLeftDoubleClick (BuilderView *pView, UIContext &ui)
 
virtual void OnMouseMove (BuilderView *pView, UIContext &ui)
 

Protected Member Functions

void CreateGeomGroup ()
 
void CreateLabelGroup ()
 
int GetObjectMaterialIndex (vtTagArray &style, uint iIndex)
 
bool CreateAtOnce ()
 
- Protected Member Functions inherited from vtLayer
wxString GetSaveFileDialogFilter ()
 
void SetMessageText (const wxString &msg)
 

Protected Attributes

vtTagArray m_StyleProps
 
vtTerrainm_pTerr
 
vtFeatureSetpSet
 This is the set of features which the layer contains.
 
vtGroupPtr pContainer
 
vtGrouppGeomGroup
 
vtGrouppLabelGroup
 
vtMultiTexturepMultiTexture
 
vtFeatureSetPoint2DpSetP2
 
vtFeatureSetPoint3DpSetP3
 
vtFeatureSetLineStringpSetLS2
 
vtFeatureSetLineString3DpSetLS3
 
vtFeatureSetPolygonpSetPoly
 
vtFontPtr m_pFont
 
vtMaterialArrayPtr pGeomMats
 
int material_index_object
 
int material_index_line
 
int material_index_yellow
 
vtGeodepGeodeObject
 
vtGeodepGeodeLine
 
VizMap m_Map
 
bool m_bNeedRebuild
 
- Protected Attributes inherited from vtLayer
wxString m_wsFilename
 
wxString m_wsImportedFrom
 
LayerType m_type
 
bool m_bVisible
 
bool m_bModified
 
bool m_bNative
 
bool m_bSticky
 

Additional Inherited Members

- Static Public Member Functions inherited from vtLayer
static vtLayerCreateNewLayer (LayerType ltype)
 
- Static Public Attributes inherited from vtLayer
static wxArrayString LayerTypeNames
 
static const wxChar * LayerFileExtension []
 

Detailed Description

An abstract layer is a traditional GIS-style set of geometry features with attributes. It can be shown on the terrain in a variety of ways (styles). Style is described with a set of properties, encoded as a vtTagArray. These are the supported style properties, all of which are optional:

When a terrain description (TParams) contains an abstract layer, these same style properties are encoded. On disk, they are stored as XML elements.

Member Function Documentation

void vtAbstractLayer::CreateFeatureLabel ( uint  iIndex)

Given a featureset and style description, create a labels and place it on the terrain.

If the features are 2D or 3D points (vtFeatureSetPoint2D or vtFeatureSetPoint3D) then the labels will be placed at those points. If the features are 2D polygons (vtFeatureSetPolygon) then the point used is the centroid of the polygon.

void vtAbstractLayer::CreateLineGeometry ( uint  iIndex)

Given a featureset and style description, create line geometry. If 2D, it will be draped on the terrain. Polygon features (vtFeatureSetPolygon) will also be created as line geometry (unfilled polygons) and draped on the ground.

void vtAbstractLayer::CreateLineGeometryForPoints ( )

Given a featureset and style description, create line geometry that goes through all the points.

void vtAbstractLayer::CreateObjectGeometry ( uint  iIndex)

Given a featureset and style description, create a geometry object (such as spheres) and place it on the terrain. If 2D, they will be draped on the terrain.

void vtAbstractLayer::CreateStyledFeatures ( )

Given a featureset, create the geometry and place it on the terrain.

void vtAbstractLayer::ReleaseFeatureGeometry ( vtFeature f)

Release all the 3D stuff created for a given feature.

void vtAbstractLayer::ReleaseGeometry ( )

Release all the 3D stuff created for the layer (including geometry and labels).


The documentation for this class was generated from the following files: