![]() |
VR-Forces Developer's Guide
|
This class will allow for the addition of features and their geometry for inclusion into the collision world. Basic assumptions as to soil type will be made in that if it is below 0 it will be considered a water surface and above ground a hard packed surface. Each area will be transformed into it's own collision object. Point objects will be gatherd up and once the convertToGeometry routine is called, they will be triangulated and transformed into polygons.
Classes | |
| struct | AreaInformation |
| struct | LandArea |
| struct | LastIntersection |
Public Types | |
| enum | QueryType { QUERY_DEFAULT = 0, POINT_SELECT = 1, AREA_SELECT = 2, SURFACE_SELECT = 3 } |
| typedef std::pair< std::string, QueryType > | Query |
| typedef std::map< std::string, Query > | Queries |
Public Member Functions | |
| DtFeatureToGeometryConverter () | |
| virtual | ~DtFeatureToGeometryConverter () |
| virtual void | convertToGeometry (const DtPoint &pnt, const DtTerrainImplementation *, DtCollisionWorld *) |
| virtual void | reset () |
| virtual void | addQuery (const std::string &key, const std::string &value, QueryType=QUERY_DEFAULT) |
| virtual std::string | addQuery (const std::string &value, QueryType=QUERY_DEFAULT) |
| std::string | addQueryByAreaSelect (const std::string &value) |
| std::string | addQueryByPointSelect (const std::string &value) |
| virtual void | removeQuery (const std::string &key) |
| virtual const Queries & | queries () const |
| virtual bool | determineSurfaceType (const DtPoint &, const DtTerrainImplementation *fc, const std::string &query, DtSurface &surface) |
| virtual bool | hasSurface (const MAKVRinTerra::DtFeatureGeometry &, DtSurface &) |
| virtual void | setSeaLevel (double) |
| virtual double | seaLevel () const |
| virtual DtCollisionWorld * | collisionWorld () |
Protected Types | |
| typedef std::pair < MAKVRinTerra::DtFeatureGeometry, DtSurface > | SurfaceDefinition |
| typedef std::vector < SurfaceDefinition > | Surfaces |
| typedef std::vector < AreaInformation > | AreasCovered |
| typedef std::vector< LandArea > | LandAreas |
| typedef boost::ptr_map < std::string, MAKVRinTerra::DtFeatureSet > | SavedQueries |
Protected Attributes | |
| std::vector < MAKVRinTerra::DtFeatureGeometry > | myPointFeatures |
| Queries | myQueries |
| std::vector< std::string > | myQueryStringList |
| Surfaces | myNewSurfaces |
| LandAreas | myLandAreas |
| LastIntersection | myLastIntersection |
| double | mySeaLevel |
| SavedQueries | mySavedQueries |
| AreasCovered | myAreasCovered |
| AreasCovered | myCoverageAreas |
| MAKVRinTerra::DtFeatureGeometry | myIntersectArea |
| DtCollisionWorld * | myCollisionWorld |
| bool | myCoverageAreasInitialized |
| DtThreadedTriangulator * | myThreadedGeometryTriangulator |
| DtThreadedTriangulator * | myThreadedSurfaceTriangulator |
| tbb::spin_rw_mutex | myMutex |
| tbb::spin_rw_mutex | myLastLocationMutex |
| bool | myUseGeosGeometryForLandAreas |
| typedef std::pair<std::string, QueryType> DtFeatureToGeometryConverter::Query |
| typedef std::map<std::string, Query> DtFeatureToGeometryConverter::Queries |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Saved queries.
| DtFeatureToGeometryConverter::DtFeatureToGeometryConverter | ( | ) |
CTOR.
|
virtual |
DTOR.
|
virtual |
Converts all current geometries into the collision world object.
|
virtual |
Resets all information in the context creator and the queries.
|
virtual |
Adds a new query.
|
virtual |
Adds a query "query<N>" and returns the query key. This query will be used when selecting features for geometry.
|
inline |
|
inline |
|
virtual |
Removes a query.
|
virtual |
Returns the queries.
|
virtual |
Returns true if there is a surface type specified by a feature at the given point.
|
virtual |
Returns true if there is a cached surface at the given point and the surface.
|
virtual |
Accessor for current sea level.
|
virtual |
|
virtual |
Returns collision world. If not created creates and initializes.
|
protectedvirtual |
Adds a feature for conversion. If the geometry for this feature has already been converted it will not be added for conversion.
|
protectedvirtual |
Generates a geometry to use for an intersection.
|
protectedvirtual |
Returns true if there should be a test made to see what features are at this point. If the result is should intersect, the intersectWith supplied should be filled with the geometry to intersect with.
|
protectedvirtual |
Triangulates points and creates bullet geometry from the points read in.
|
protectedvirtual |
Creates polygonal representation in osg from areas and converts them to bullet geometry.
|
protectedvirtual |
Creates geometry from a list of points, triangulated, and assigns surface to them.
|
protectedvirtual |
Returns true if this feature should be added as an intersected surface and the surface type.
|
protectedvirtual |
Adds new surfaces into the current surface map.
|
protectedvirtual |
What to do if a cell is intersected but no geometry in that cell is found.
|
protectedvirtual |
Creates or returns a saved query for faster lookup.
|
protectedvirtual |
Returns the intersection for a coverage area.
|
protectedvirtual |
If covered area is not currently in myAreasCovered list then add it.
|
protectedvirtual |
Returns a new area information object based on the information given. The extent will be in geodetic with 0 altitude.
|
protectedvirtual |
Updates the last intersection by getting a mutex lock (myLastLocationMutex) and updating.
|
protected |
|
protected |
Queries that can be used to perform specified functions. These queries will be used by particluar subclasses in order to refine searches. Keywords are specific to the particular subclass. For example, the S57 loader will use an "COVERAGE_AREA" search to refine the area to include when looking for feature objects. For queries that can be applied as refinement for what to create geometries from, they should be called "QUERY<N>" where N is a number of a query. Those queries will be performed in order.
|
protected |
Predefine a list of Query string (QUERY1, QUERY2, etc) to speed up convertToGeometry() and addQuery()
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
protected |
Default is false – use tessellator.