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

#include <StructArray.h>

Inheritance diagram for vtStructureArray:
vtArray< vtStructure * > vtStructureArray3d vtStructureLayer vtStructureLayer

Public Member Functions

virtual void DestructItems (uint first, uint last)
 
void SetFilename (const vtString &str)
 
vtString GetFilename ()
 
int GetFirstSelected ()
 
int GetNextSelected ()
 
int DeleteSelected ()
 
virtual void DestroyStructure (int i)
 
bool ReadSHP (const char *pathname, StructImportOptions &opt, bool progress_callback(int)=NULL)
 
void AddElementsFromOGR (class OGRDataSource *datasource, StructImportOptions &opt, bool progress_callback(int)=NULL)
 
void AddElementsFromOGR_SDTS (class OGRDataSource *datasource, bool progress_callback(int)=NULL)
 
void AddElementsFromOGR_RAW (class OGRDataSource *datasource, StructImportOptions &opt, bool progress_callback(int)=NULL)
 
void AddBuildingsFromOGR (class OGRLayer *pLayer, StructImportOptions &opt, bool progress_callback(int)=NULL)
 
void AddLinearsFromOGR (class OGRLayer *pLayer, StructImportOptions &opt, bool progress_callback(int)=NULL)
 
void AddInstancesFromOGR (class OGRLayer *pLayer, StructImportOptions &opt, bool progress_callback(int)=NULL)
 
bool ReadBCF (const char *pathname)
 
bool ReadBCF_Old (FILE *fp)
 
bool ReadXML (const char *pathname, bool progress_callback(int)=NULL)
 
bool WriteXML (const char *pathname, bool bGZip=false) const
 
bool WriteFootprintsToSHP (const char *pathname)
 
bool WriteFootprintsToCanoma3DV (const char *pathname, const DRECT *area, const vtHeightField *pHF)
 
bool FindClosestBuildingCorner (const DPoint2 &point, double epsilon, int &building, int &corner, double &distance)
 
bool FindClosestBuildingCenter (const DPoint2 &point, double epsilon, int &building, double &distance)
 
bool FindClosestLinearCorner (const DPoint2 &point, double epsilon, int &structure, int &corner, double &distance)
 
bool FindClosestStructure (const DPoint2 &point, double epsilon, int &structure, double &distance, float fMaxInstRadius=1E9f, float fLinearWidthBuffer=0.0f)
 
bool FindClosestBuilding (const DPoint2 &point, double epsilon, int &structure, double &closest)
 
bool IsEmpty ()
 
void GetExtents (DRECT &ext) const
 
void Offset (const DPoint2 &delta)
 
int AddFoundations (vtHeightField *pHF, bool progress_callback(int)=NULL)
 
void RemoveFoundations ()
 
int NumSelected ()
 
void DeselectAll ()
 
virtual vtBuildingNewBuilding ()
 
virtual vtFenceNewFence ()
 
virtual vtStructInstanceNewInstance ()
 
vtBuildingAddNewBuilding ()
 
vtFenceAddNewFence ()
 
vtStructInstanceAddNewInstance ()
 
vtBuildingAddBuildingFromLineString (class OGRLineString *pLineString)
 
virtual void SetEditedEdge (vtBuilding *bld, int lev, int edge)
 
- Public Member Functions inherited from vtArray< vtStructure * >
 vtArray (uint size=0)
 
 vtArray (const vtArray< vtStructure * > &)
 
uint GetSize () const
 
uint GetMaxSize () const
 
bool SetSize (uint)
 
bool SetMaxSize (uint)
 
uint GetElemSize () const
 
vtStructure ** GetData () const
 
void FreeData ()
 
bool IsEmpty () const
 
vtStructure *& GetAt (uint i) const
 
bool SetAt (uint i, vtStructure *)
 
vtArray< vtStructure * > & operator= (const vtArray< vtStructure * > &)
 
vtStructure *& operator[] (uint i)
 
const vtStructure *& operator[] (uint i) const
 
void Empty ()
 
bool RemoveAt (uint i, int n=1)
 
int Append (const vtStructure *&)
 
int Append (const vtArray< vtStructure * > &)
 
int Find (const vtStructure *&) const
 

Public Attributes

vtProjection m_proj
 

Protected Attributes

vtString m_strFilename
 
vtBuildingm_pEditBuilding
 
int m_iEditLevel
 
int m_iEditEdge
 
int m_iLastSelected
 
- Protected Attributes inherited from vtArray< vtStructure * >
uint m_Size
 
uint m_MaxSize
 
vtStructure ** m_Data
 

Additional Inherited Members

- Protected Member Functions inherited from vtArray< vtStructure * >
virtual bool Grow (uint)
 

Detailed Description

The vtStructureArray class contains a list of Built Structures (vtStructure objects). It can be loaded and saved to VTST files with the ReadXML and WriteXML methods.

Member Function Documentation

int vtStructureArray::DeleteSelected ( )

Delete any structures which are selected.

Returns
the number that were deleted.
bool vtStructureArray::FindClosestBuilding ( const DPoint2 point,
double  epsilon,
int &  structure,
double &  closest 
)

Find the building which is closest to the given point, if it is within 'epsilon' distance. The structure index and distance are returned by reference.

Returns
True if a building was found.
bool vtStructureArray::FindClosestBuildingCenter ( const DPoint2 point,
double  epsilon,
int &  building,
double &  closest 
)

Find the building center closest to the given point, if it is within 'epsilon' distance. The building index, and distance from the given point are returned by reference.

Returns
True if a building was found.
bool vtStructureArray::FindClosestBuildingCorner ( const DPoint2 point,
double  epsilon,
int &  building,
int &  corner,
double &  closest 
)

Find the building corner closest to the given point, if it is within 'epsilon' distance. The building index, corner index, and distance from the given point are all returned by reference.

Returns
True if a building was found.
bool vtStructureArray::FindClosestStructure ( const DPoint2 point,
double  epsilon,
int &  structure,
double &  closest,
float  fMaxInstRadius = 1E9f,
float  fLinearWidthBuffer = 0.0f 
)

Find the structure which is closest to the given point, if it is within 'epsilon' distance. The structure index and distance are returned by reference.

Returns
True if a building was found.
int vtStructureArray::GetFirstSelected ( )

Return the index of the first selected structure, or -1 if no structure is selected.

bool vtStructureArray::ReadSHP ( const char *  pathname,
StructImportOptions opt,
bool   progress_callbackint = NULL 
)

Import structure information from a Shapefile.

Parameters
pathnameA resolvable filename of a Shapefile (.shp)
optOptions which specify how to import structures from the file.
progress_callbackIf supplied, this function will be called back with a value of 0 to 100 as the operation progresses.
Returns
True if successful.
bool vtStructureArray::WriteFootprintsToCanoma3DV ( const char *  filename,
const DRECT area,
const vtHeightField pHF 
)

Write footprints to a Canoma file. Author of this code: BobMaX (Roberto Angeletti)


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