#include <AbstractLayer.h>
Public Member Functions | |
vtAbstractLayer (vtTerrain *pTerr) | |
void | SetLayerName (const vtString &fname) |
vtString | GetLayerName () |
void | SetVisible (bool vis) |
bool | GetVisible () |
void | SetFeatureSet (vtFeatureSet *pSet) |
vtFeatureSet * | GetFeatureSet () const |
vtGroup * | GetLabelGroup () const |
vtGroup * | GetContainer () const |
vtVisual * | GetViz (vtFeature *feat) |
vtMultiTexture * | GetMultiTexture () 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. | |
vtTagArray & | GetProperties () |
Get the properties for this layer, which includes style. | |
![]() | |
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 () |
![]() | |
wxString | GetSaveFileDialogFilter () |
void | SetMessageText (const wxString &msg) |
Protected Attributes | |
vtTagArray | m_StyleProps |
vtTerrain * | m_pTerr |
vtFeatureSet * | pSet |
This is the set of features which the layer contains. | |
vtGroupPtr | pContainer |
vtGroup * | pGeomGroup |
vtGroup * | pLabelGroup |
vtMultiTexture * | pMultiTexture |
vtFeatureSetPoint2D * | pSetP2 |
vtFeatureSetPoint3D * | pSetP3 |
vtFeatureSetLineString * | pSetLS2 |
vtFeatureSetLineString3D * | pSetLS3 |
vtFeatureSetPolygon * | pSetPoly |
vtFontPtr | m_pFont |
vtMaterialArrayPtr | pGeomMats |
int | material_index_object |
int | material_index_line |
int | material_index_yellow |
vtGeode * | pGeodeObject |
vtGeode * | pGeodeLine |
VizMap | m_Map |
bool | m_bNeedRebuild |
![]() | |
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 vtLayer * | CreateNewLayer (LayerType ltype) |
![]() | |
static wxArrayString | LayerTypeNames |
static const wxChar * | LayerFileExtension [] |
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.
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).