![]() |
VR-Forces Developer's Guide
|
Class to represent an area feature set operation (union, difference, intersection) between two area feature sets. This can be used to define complex area features made up of multiple area feature sets and operations between them.
Public Types | |
| enum | OperationType { NoOperation, Union, Difference, Intersection } |
| typedef MAKVRinTerra::DtFeatureGeometry::GeometryVector | GeometryVector |
| using | DuplicateRemover = MAKVRinTerra::DtGeometryDuplicateRemover |
Public Member Functions | |
| DtAreaFeatureSetOperation (const MAKVRinTerra::DtAreaFeatureSet &featureSet) | |
| DtAreaFeatureSetOperation (const DtAreaFeatureSetOperation &setA, const DtAreaFeatureSetOperation &setB, OperationType opType) | |
| DtAreaFeatureSetOperation (const MAKVRinTerra::DtAreaFeatureSet &setA, const MAKVRinTerra::DtAreaFeatureSet &setB, OperationType opType) | |
| DtAreaFeatureSetOperation (const DtAreaFeatureSetOperation &featureSet) | |
| virtual | ~DtAreaFeatureSetOperation () |
| virtual bool | processGeometryInAreaBlocking (const MAKVRinTerra::DtFeatureGeometry &area, const DtAlgorithmManager *mgr=nullptr) |
| virtual bool | processGeometryInArea (const MAKVRinTerra::DtFeatureGeometry &area, const DtAlgorithmManager *mgr=nullptr, bool *dataAvailable=nullptr) |
| virtual bool | processPendingGeometryInArea (const DtAlgorithmManager *mgr=nullptr, bool *dataAvailable=nullptr) |
| GeometryVector & | areas () |
| MAKVRinTerra::DtFeatureGeometry & | geometry () |
Static Public Member Functions | |
| static std::unique_ptr < DtAreaFeatureSetOperation > | parseFeatureSetQuery (const DtString &featureStr, DtTerrainInterface &terrainIf, double buffer=0) |
Protected Member Functions | |
| virtual void | addArea (const MAKVRinTerra::DtAreaFeature &area) |
| virtual bool | setupFilterArea (const MAKVRinTerra::DtFeatureGeometry &filterGeom, const DtAlgorithmManager *mgr) |
| virtual bool | processGeometryBlocking (const DtAlgorithmManager &mgr, const MAKVRinTerra::DtFeatureGeometry &filterArea) |
| virtual bool | processGeometry (const DtAlgorithmManager &mgr, const MAKVRinTerra::DtFeatureGeometry &filterArea, bool &dataAvailable) |
| virtual bool | processPendingGeometry (const DtAlgorithmManager &mgr, bool &dataAvailable) |
| virtual bool | performGeometryOperation () |
Static Protected Member Functions | |
| static std::unique_ptr < DtAreaFeatureSetOperation > | parseExpression (const std::string &str, size_t &pos, DtTerrainInterface &terrainIf, double buffer) |
| static std::unique_ptr < DtAreaFeatureSetOperation > | parseTerm (const std::string &str, size_t &pos, DtTerrainInterface &terrainIf, double buffer) |
| static std::unique_ptr < DtAreaFeatureSetOperation > | parseFeatureSet (const std::string &str, size_t &pos, DtTerrainInterface &terrainIf, double buffer) |
| static std::unique_ptr < DtAreaFeatureSetOperation > | parseFeatureSetBlock (const std::string &str, size_t &pos, DtTerrainInterface &terrainIf, double buffer) |
| static std::unique_ptr < DtAreaFeatureSetOperation > | parseGeoBlock (const std::string &str, size_t &pos, DtTerrainInterface &terrainIf, double buffer) |
| static void | skipWhitespace (const std::string &str, size_t &pos) |
Protected Attributes | |
| OperationType | myOperationType |
| std::unique_ptr < DtAreaFeatureSetOperation > | mySetA |
| std::unique_ptr < DtAreaFeatureSetOperation > | mySetB |
| std::unique_ptr < MAKVRinTerra::DtAreaFeatureSet > | myFeatureSet |
| std::unique_ptr < MAKVRinTerra::DtAreaFeatureSet > | myFilteredFeatureSet |
| bool | myWaitingForSetAData |
| bool | myWaitingForData |
| DuplicateRemover | myDuplicateRemover |
| GeometryVector | myAreas |
| MAKVRinTerra::DtFeatureGeometry | myGeometry |
| MAKVRinTerra::DtFeatureGeometry | myPagedInArea |
| MAKVRinTerra::DtFeatureGeometry | myNewFilterArea |
| DtAreaFeatureSetOperation::DtAreaFeatureSetOperation | ( | const MAKVRinTerra::DtAreaFeatureSet & | featureSet | ) |
Constructor for the base case operation, made from just a single area feature set.
| DtAreaFeatureSetOperation::DtAreaFeatureSetOperation | ( | const DtAreaFeatureSetOperation & | setA, |
| const DtAreaFeatureSetOperation & | setB, | ||
| OperationType | opType | ||
| ) |
Constructor for operation made from two area feature set operations.
| DtAreaFeatureSetOperation::DtAreaFeatureSetOperation | ( | const MAKVRinTerra::DtAreaFeatureSet & | setA, |
| const MAKVRinTerra::DtAreaFeatureSet & | setB, | ||
| OperationType | opType | ||
| ) |
Constructor for operation made from two area feature sets.
| DtAreaFeatureSetOperation::DtAreaFeatureSetOperation | ( | const DtAreaFeatureSetOperation & | featureSet | ) |
Copy constructor.
|
virtual |
Destructor.
|
static |
Parse a complex area feature string into an area feature set operation. Supports FEATURE_SET() and GEO() blocks for explicit control over parsing. FEATURE_SET() blocks contain feature set names that are used directly without parsing. GEO() blocks contain geometric operations that are parsed recursively. If no block type is specified, the entire string is treated as FEATURE_SET(). Examples: "FEATURE_SET(MAK_DEPTH_AREAS AND MAK_MIN_DEPTH <= 7.5)" - multi-term feature set "GEO(MAK_OBSTACLE | (MAK_WATERWAY - MAK_ROAD))" - geometric operations "GEO(FEATURE_SET(MAK_DEPTH_AREAS AND MAK_MIN_DEPTH <= 7.5) | MAK_BRIDGE)" - mixed operations The buffer parameter specifies a buffer distance to apply around the borders of each area feature set when performing the operations, in meters.
|
virtual |
Process the area feature set operation to produce the resulting areas and geometry. If successful, the resulting areas can be accessed via the areas() method. This version blocks until the operation is complete. Returns false on failure.
|
virtual |
The same as processGeometryInAreaBlocking, but may return before processing is complete. The dataAvailable, if provided, will be set to true if all data was loaded and processed, or false if data not finished loading. Returns false on failure.
|
virtual |
Continues the processing of the area feature set operation started in processGeometryInArea(), to produce the resulting areas and geometry, if data was not yet available previously. The dataAvailable, if provided, will be set to true if all data was loaded and processed. Returns false on failure.
|
inline |
Get the resulting areas from the operation.
|
inline |
Get the resulting geometry from the operation.
|
staticprotected |
Parse an expression from the string starting at pos.
|
staticprotected |
Parse a term from the string starting at pos.
|
staticprotected |
Parse a feature set or parenthesized expression from the string starting at pos.
|
staticprotected |
Parse a FEATURE_SET() block from the string starting at pos.
|
staticprotected |
Parse a GEO() block from the string starting at pos.
|
staticprotected |
Skip whitespace characters in the string starting at pos.
|
protectedvirtual |
Add an area to the resulting areas, checking for duplicates.
|
protectedvirtual |
Update internal structures to filter to the given area. updates the paged in area and the new filter area.
|
protectedvirtual |
Process the geometry in the given area according to the operation type.
{
|
protectedvirtual |
|
protectedvirtual |
}
If a non-blocking processGeometry() call is made, this function is called to continue processing once data has been loaded in.
|
protectedvirtual |
Called by processGeometry to perform the specific operation once data has been loaded in.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |