![]() |
VR-Forces Developer's Guide
|
helper class, random osg debug helpers and math
Classes | |
| struct | DebrisPositionStruct |
| class | FidMetadataNode |
| class | OSMBuildingInfo |
Public Types | |
| enum | DtTerrainDeformation { DtTerrainDeformationNone = 0, DtTerrainDeformationBerm = 1, DtTerrainDeformationDitch = 2, DtTerrainDeformationTankScrape = 3, DtTerrainDeformationHill = 4 } |
| enum | DtCraterEffect { DtTerrainCraterNoEffect = 0, DtTerrainCraterElevationEffect = 1, DtTerrainCraterSoilEffect = 2, DtTerrainCraterElevAndSoilEffect = 3, DtTerrainCraterAerodromeEffect = 4 } |
| typedef std::map < osgEarth::MetadataNode *, DtOsgUtils::OSMBuildingInfo > | MetadaNodeMap |
| typedef std::map< std::string, DtOsgUtils::MetadaNodeMap > | ChangeIdMetadaNodeMap |
| typedef std::map< long long, osg::BoundingBoxd > | Fid2DebrisMapType |
| typedef std::vector < DebrisPositionStruct > | DebrisPositionListType |
Static Public Member Functions | |
| static void | makeRotate (osg::Quat &q, const double &angle, const double &x, const double &y, const double &z) |
| static osg::Matrixf | toOsgRotation (const DtTaitBryan &orientation) |
| static void | quatMult (osg::Quat &lhs, const osg::Quat &rhs) |
| static osg::MatrixTransform * | create_axis_primitive () |
| static osg::Matrix | getOrthoMatrix (bool useReverseZ, double left, double right, double bottom, double top, double zNear, double zFar) |
| static osg::Matrix | getProjMatrix (bool useReverseZ, double left, double right, double bottom, double top, double zNear, double zFar) |
| static osg::Matrixd | getRevZOrthoMatrix (double left, double right, double bottom, double top, double zNear, double zFar) |
| static bool | getRevZPerspectiveMatrixAsFrustum (const osg::Matrix &mat, double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) |
| static bool | getRevZOrthoMatrixAsFrustum (const osg::Matrix &orthoMat, double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) |
| static bool | getRevZPerspective (const osg::Matrix &mat, double &fovy, double &aspectRatio, double &zNear, double &zFar) |
| static osg::Matrix | makeRevZPerspective (double fovy, double aspectRatio, double zNear, double zFar) |
| static void | getYPR (const osg::Matrix &m, double &yaw, double &pitch, double &roll) |
| static void | osgPolytopeToFrustum (Frustum_64 &frustum, const osg::Polytope &polytope, bool hasNearFar) |
| static void | debugDumpShaderState (osg::State *state) |
| static void | debugDumpUniformState (const osg::Node *node) |
| static bool | clipLine (double xMin, double xMax, double yMin, double yMax, double x0src, double y0src, double x1src, double y1src, double &x0clip, double &y0clip, double &x1clip, double &y1clip) |
| static void | clipPolygon (double xMin, double xMax, double yMin, double yMax, std::vector< osg::Vec2 > &vertices) |
| template<class VecType > | |
| static VecType | DtModPerLoVec3 (const VecType &in, double min, double max) |
| static bool | insideTriangulate (const std::vector< osg::Vec2 > &contour, std::vector< int > &results) |
| static osg::Matrixd | calculateRevZProjectionMatrix (double left, double right, double bottom, double top, double zNear, double zFar) |
| static osg::Matrixd | calculateOrthoMatrix (double left, double right, double bottom, double top, double zNear, double zFar) |
| static osg::Matrixd | calculateRevZProjectionMatrixWithRevZAsNegativeOneForRttCamera (double left, double right, double bottom, double top, double zNear, double zFar) |
| static void | dynamicTerrainLineToFeature (const DtDynamicTerrainLine *line, osgEarth::Feature *feature, osg::ref_ptr< const osgEarth::SpatialReference > srs) |
| static void | dumpCommandValues (const DtDynamicTerrainChange &command) |
| static void | getGeometriesFID (osg::ref_ptr< osgEarth::MapNode > mapNode, const makVrv::DtDynamicTerrainSphere *sphere, std::set< long long > &OsmFidList, DtOsgUtils::Fid2DebrisMapType *fid2DebrisMap) |
| static void | hideGeometries (osg::ref_ptr< osgEarth::MapNode > mapNode, osg::BoundingSphere bs, const std::set< long long > &FidList, std::vector< DtOsgUtils::FidMetadataNode > &dataList) |
| static void | showGeometries (osg::ref_ptr< osgEarth::MapNode > mapNode, osg::BoundingSphere bs, const std::set< long long > &FidList) |
| static void | getDebrisModels (DtDe *de, const DtOsgUtils::Fid2DebrisMapType &fid2DebrisMap, DtOsgUtils::DebrisPositionListType &debrisPositionList, DtIntersector *intersector=nullptr) |
| static bool | addCraterState (const DtDynamicTerrainChange &command, osg::ref_ptr< osgEarth::MapNode > mapNode, DtDynamicTerrainRasterLibrary *rasterLibrary, osg::ref_ptr< osgEarth::LandCoverDictionary > landCoverDictionary_Splat, osg::ref_ptr< osgEarth::Contrib::DecalImageLayer > decalImageLayer, osg::ref_ptr< osgEarth::Contrib::DecalElevationLayer > decalElevLayer, osg::ref_ptr< osgEarth::Contrib::DecalLandCoverLayer > decalLandCoverLayer_Splat, osg::ref_ptr< osgEarth::Contrib::DecalImageLayer > decalLifeMapLayer, osg::ref_ptr< osgEarth::Contrib::DecalImageLayer > decalCoverageRasterLayer, unsigned coverageMappingValue, std::string &info, std::string &warn, osgEarth::GeoExtent &out_feature_extent, std::string &craterModelDefinition, int minInvalidateLod=-1) |
| static bool | addLinearStateDeformation (const DtDynamicTerrainChange &command, osg::ref_ptr< osgEarth::MapNode > mapNode, DtDynamicTerrainRasterLibrary *rasterLibrary, osg::ref_ptr< osgEarth::LandCoverDictionary > landCoverDictionary_Splat, osg::ref_ptr< osgEarth::Contrib::DecalImageLayer > decalImageLayer, osg::ref_ptr< osgEarth::Contrib::DecalElevationLayer > decalElevLayer, osg::ref_ptr< osgEarth::Contrib::DecalLandCoverLayer > decalLandCoverLayer_Splat, osg::ref_ptr< osgEarth::Contrib::DecalImageLayer > decalLifeMapLayer, osg::ref_ptr< osgEarth::Contrib::DecalImageLayer > decalCoverageRasterLayer, unsigned coverageMappingValue, std::string &info, std::string &warn, osgEarth::GeoExtent &out_feature_extent) |
| static bool | addTankScrapeState (const DtDynamicTerrainChange &command, osg::ref_ptr< osgEarth::MapNode > mapNode, DtDynamicTerrainRasterLibrary *rasterLibrary, osg::ref_ptr< osgEarth::LandCoverDictionary > landCoverDictionary_Splat, osg::ref_ptr< osgEarth::Contrib::DecalImageLayer > decalImageLayer, osg::ref_ptr< osgEarth::Contrib::DecalElevationLayer > decalElevLayer, osg::ref_ptr< osgEarth::Contrib::DecalLandCoverLayer > decalLandCoverLayer_Splat, osg::ref_ptr< osgEarth::Contrib::DecalImageLayer > decalLifeMapLayer, osg::ref_ptr< osgEarth::Contrib::DecalImageLayer > decalCoverageRasterLayer, unsigned coverageMappingValue, std::string &info, std::string &warn, osgEarth::GeoExtent &out_feature_extent, double start_angle=0.0, int minInvalidateLod=-1) |
| static std::string | osmFidStringFromList (std::set< long long > &osmFidList) |
| static void | osmFidStringToList (const std::string &osmFidString, std::set< long long > &osmFidList) |
| static int | getObjectID (unsigned int instance, osg::TextureBuffer *tbo) |
| static osg::Vec2 | rotateVec2 (const osg::Vec2 &v, double rad) |
| static osg::Vec2 | translateVec2 (const osg::Vec2 &v, const osg::Vec2 &translation) |
| static osg::Vec2 | scaleVec2 (const osg::Vec2 &v, double s) |
| static osg::Vec2 | scaleVec2 (const osg::Vec2 &v, double xScale, double yScale) |
Static Public Attributes | |
| static const std::string | CRATER_MAJOR_AXIS |
| static const std::string | CRATER_MINOR_AXIS |
| static const std::string | CRATER_HEADING |
| static const std::string | CRATER_EFFECT_ENUM |
| static const std::string | CRATER_SOIL_TYPE |
| static const std::string | CRATER_DEPTH |
| static const std::string | CRATER_TYPE |
| static const std::string | MODELDEFINITION_PROPS |
| static const std::string | COMMAND_UID |
| static const std::string | CRATER_RADIUS |
| static const std::string | TerrainDamageName |
| static const std::string | TerrainDamageSlight |
| static const std::string | TerrainDamageModerate |
| static const std::string | TerrainDamageDestroyed |
| static const std::string | TRACKS_LINE_WIDTH |
| static const std::string | TRACKS_TERRAIN_TIME |
| static const std::string | EffectMapTextureUniformName |
| static const std::string | EffectMapTextureMatrixUniformName |
| static const std::string | TrackModelDefinitionSchema |
| static const std::string | TrackTypeParameterName |
| static const std::string | TrackSoilTypeParameterName |
| static const std::string | TrackDepthParameterName |
| static const std::string | TrackPointAParameterName |
| static const std::string | TrackPointBParameterName |
| static const std::string | TrackTexureParameterName |
| static const std::string | TrackSegmentSpacingParameterName |
| static const std::string | TERRAIN_DEFORMATION_ENUM |
| static const std::string | TERRAIN_DEFORMATION_LANDCOVER_OVERRIDE |
| static const std::string | TERRAIN_DEFORMATION_WIDTH |
| static const std::string | TERRAIN_DEFORMATION_HEIGHT |
| static const std::string | TERRAIN_DEFORMATION_RESOLUTION |
Static Protected Member Functions | |
| static bool | snipTriangle (const std::vector< osg::Vec2 > &contour, int u, int v, int w, int n, int *V) |
| static bool | insideTriangle (float Ax, float Ay, float Bx, float By, float Cx, float Cy, float Px, float Py) |
| static float | triangulateAreaSize (const std::vector< osg::Vec2 > &contour) |
| typedef std::map<osgEarth::MetadataNode*, DtOsgUtils::OSMBuildingInfo> makVrv::DtOsgUtils::MetadaNodeMap |
map between a metadataNode and OSM object indexes (used to display/hide buildings)
| typedef std::map<std::string, DtOsgUtils::MetadaNodeMap> makVrv::DtOsgUtils::ChangeIdMetadaNodeMap |
map between a crater change ID and MetadaNodeMap changes (hidden OSM buildings)
| typedef std::map<long long, osg::BoundingBoxd> makVrv::DtOsgUtils::Fid2DebrisMapType |
map of FID and bounding sphere debris
| typedef std::vector<DebrisPositionStruct> makVrv::DtOsgUtils::DebrisPositionListType |
list of position / debris model definition
|
static |
Make a quaternion that rotates angle radians around (x, y, z)
|
static |
tait bryan to osg matrix helper function
|
static |
Multiply two quaternions together.
This is more efficient than the OSG built in implementation
|
static |
helper for visualizing a coordinate system
|
static |
helpers for matrix and reverse z matrixes
Create a regular or reverse orthographic projection matrix (near = 1, far = 0) out of frustum parameters
|
static |
Create a regular or reverse perspective projection matrix (near = 1, far = 0) out of frustum parameters.
|
static |
For Reverse Z buffer - get a reverse (near = 1, far = 0) orthographic matrix.
|
static |
For Reverse Z buffer - extract the frustum parameters out of a reverse perspective projection matrix (near = 1, far = 0)
|
static |
For Reverse Z buffer - extract the frustum parameters out of a reverse orthographic matrix (near = 1, far = 0)
|
static |
For Reverse Z buffer - extract the frustum parameters out of a reverse projection matrix (near = 1, far = 0)
|
static |
For Reverse Z buffer - create a reverse projection matrix (near = 1, far = 0) out of frustum parameters.
|
static |
converts a matrix to a human readable yaw/pitch/roll representation
|
static |
gets a converts a osg polytope to a vrv friendly class.
|
static |
only used for debugging prints out a bunch of uniform state for the current shader.
|
static |
only used for debugging
|
static |
Vec2 Helpers for DtOsgWindow classes.
Utility function to rotate a vec2
|
static |
Utility function to translate a vec2.
|
static |
Utility function to scale a vec2.
|
static |
Utility function to scale a vec2.
|
static |
2D clipping routine. Implements Liang / Barsky Clipping
|
static |
2D clipping routine. Implements Sutherland–Hodgman clipping
|
inlinestatic |
|
static |
OSG version of DtInsideTriangulate Triangulates the given points and returns the indicies that form the triangles. The triangles will be constrained to the inside of the polygon being triangulated. Note that if this polygon has crossing lines it will not be triangulated. This is also only a 2D triangulation routine. The Z value is ignored, however it can be passed in. Rearranges contour into results;.
|
static |
|
static |
|
static |
|
static |
Convert DtDynamicTerrainLine to osgEarth::Feature.
|
static |
|
static |
using a sphere radius get the list of OSM buildings found
|
static |
hide geometries from provided FID, this function will return the associated metadataNode hidden Only checks within bs for FIDs.
|
static |
show geometries from provided FID, this function will return the associated metadataNode hidden Only checks within bs for FIDs.
|
static |
by providing a list of debris spheres this function will return a list of position where to put a debris modelDefinition
|
static |
From Vantage you need to call the addCraterState member function that will call the static function. From VRF you need to call this static function return true if it succeed.
|
static |
From Vantage you need to call the addLinearStateDeformation member function that will call the static function. From VRF you need to call this static function return true if it succeed.
|
static |
From Vantage you need to call the addTankScrapeState member function that will call the static function. From VRF you need to call this static function return true if it succeed.
|
static |
convert a list of OSM buildings FID to a string like this: fid1,fid2,fid3
|
static |
convert a string that contain a list of OSM buildings FID to a std::list: fid1,fid2,fid3
|
static |
get osgEarth Object ID
|
staticprotected |
Utility function used in insideTriangulate.
|
staticprotected |
Utility function used in insideTriangulate.
|
staticprotected |
Utility function used in insideTriangulate.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |