![]() |
VR-Forces 4.3 Class Documentation
|
This class will allow for the addition of features and their geometry for inclusion into the collision world. More...
Classes | |
| struct | AreaInformation |
| Area coverage. More... | |
| struct | LandArea |
| struct | LastIntersection |
| Convenience member to return the last intersection if geometries match. More... | |
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 () | |
| CTOR. | |
| virtual | ~DtFeatureToGeometryConverter () |
| DTOR. | |
| virtual void | convertToGeometry (const DtPoint &pnt, const DtTerrainImplementation *, DtCollisionWorld *) |
| Converts all current geometries into the collision world object. | |
| virtual void | reset () |
| Resets all information in the context creator and the queries. | |
| virtual void | addQuery (const std::string &key, const std::string &value, QueryType=QUERY_DEFAULT) |
| Adds a new query. | |
| virtual std::string | addQuery (const std::string &value, QueryType=QUERY_DEFAULT) |
| Adds a query "query<N>" and returns the query key. | |
| std::string | addQueryByAreaSelect (const std::string &value) |
| std::string | addQueryByPointSelect (const std::string &value) |
| virtual void | removeQuery (const std::string &key) |
| Removes a query. | |
| virtual const Queries & | queries () const |
| Returns the queries. | |
| virtual bool | determineSurfaceType (const DtPoint &, const DtTerrainImplementation *fc, const std::string &query, DtSurface &surface) |
| Returns true if there is a surface type specified by a feature at the given point. | |
| virtual bool | hasSurface (const MAKVRinTerra::DtFeatureGeometry &, DtSurface &) |
| Returns true if there is a cached surface at the given point and the surface. | |
| virtual void | setSeaLevel (double) |
| Accessor for current sea level. | |
| virtual double | seaLevel () const |
| virtual DtCollisionWorld * | collisionWorld () |
| Returns collision world. If not created creates and initializes. | |
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 |
| Saved queries. | |
Protected Member Functions | |
| virtual void | addForConversion (const MAKVRinTerra::DtFeature &, const DtTerrainImplementation *fc, DtCollisionWorld *c) |
| Adds a feature for conversion. | |
| virtual MAKVRinTerra::DtFeatureGeometry | generateIntersection (const DtPoint &, const DtTerrainImplementation *fc, QueryType, MAKVRinTerra::DtFeatureGeometry &coverageArea) |
| Generates a geometry to use for an intersection. | |
| virtual bool | shouldIntersectWith (const DtPoint &, const DtTerrainImplementation *, MAKVRinTerra::DtFeatureGeometry &, QueryType, const std::string &query, bool &firstTime, AreasCovered::iterator &) |
| Returns true if there should be a test made to see what features are at this point. | |
| virtual void | createGeometryFromPoints (const DtTerrainImplementation *, DtCollisionWorld *, const std::vector< MAKVRinTerra::DtFeatureGeometry > &) const |
| Triangulates points and creates bullet geometry from the points read in. | |
| virtual void | createGeometryFromAreas (const DtTerrainImplementation *, DtCollisionWorld *, const MAKVRinTerra::DtFeatureGeometry &) const |
| Creates polygonal representation in osg from areas and converts them to bullet geometry. | |
| virtual void | createGeometry (const std::vector< MAKVRinTerra::DtFeatureGeometry > &, const DtSurface &, const DtTerrainImplementation *, DtCollisionWorld *, bool triangulate) const |
| Creates geometry from a list of points, triangulated, and assigns surface to them. | |
| virtual bool | shouldAddAsSurface (const MAKVRinTerra::DtFeature &, DtSurface &surface) const |
| Returns true if this feature should be added as an intersected surface and the surface type. | |
| virtual void | addNewSurfaceGeometries (const Surfaces &, const DtTerrainImplementation *fc, const std::string &query) |
| Adds new surfaces into the current surface map. | |
| virtual bool | noIntersectionFound (const MAKVRinTerra::DtFeatureGeometry &, DtSurface &) const |
| What to do if a cell is intersected but no geometry in that cell is found. | |
| virtual std::auto_ptr < MAKVRinTerra::DtFeatureSet > | createOrReturnSavedQuery (const DtTerrainImplementation *fc, std::string query, bool readDirectly=false) |
| Creates or returns a saved query for faster lookup. | |
| virtual void | coverageArea (const MAKVRinTerra::DtFeature &feature) |
| Returns the intersection for a coverage area. | |
| virtual void | addAreaCovered (const MAKVRinTerra::DtFeatureGeometry geom, const std::string &query, int retries=0) |
| If covered area is not currently in myAreasCovered list then add it. | |
| virtual AreaInformation | createAreaInfo (const MAKVRinTerra::DtFeatureGeometry &geom, const std::string &query, int retries=0) const |
| Returns a new area information object based on the information given. The extent will be in geodetic with 0 altitude. | |
| virtual void | updateLastIntersection (const DtPoint &, bool valid, const DtSurface &surface) |
| Updates the last intersection by getting a mutex lock (myLastLocationMutex) and updating. | |
Protected Attributes | |
| std::vector < MAKVRinTerra::DtFeatureGeometry > | myPointFeatures |
| Queries | myQueries |
| Queries that can be used to perform specified functions. | |
| 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 |
| Default is false – use tessellator. | |
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
| 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 |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
protected |
Default is false – use tessellator.