VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Typedefs | Enumerations | Functions
earthSurfaceCoord.h File Reference

Go to the source code of this file.

Classes

struct  DtHemisphereLimitsStruct
 

Typedefs

typedef struct
DtHemisphereLimitsStruct 
DtHemisphereLimits
 

Enumerations

enum  DtHemisphereSide { DtPositiveHemisphere, DtNegativeHemisphere, DtBothHemispheres }
 

Functions

DT_DLL_vrfutil bool earthArcsIntersect (const DtVector &a1, const DtVector &a2, const DtVector &normalA, const DtVector &middleA, const DtVector &b1, const DtVector &b2, const DtVector &normalB, const DtVector &middleB, DtVector &intersectionPoint)
 
DT_DLL_vrfutil bool earthArcsIntersect (const DtVector &a1, const DtVector &a2, const DtVector &b1, const DtVector &b2, DtVector &intersectionPoint)
 
DT_DLL_vrfutil bool earthArcsIntersect (const DtGeodeticCoord &a1, const DtGeodeticCoord &a2, const DtGeodeticCoord &b1, const DtGeodeticCoord &b2, DtGeodeticCoord &intersectionPoint)
 
DT_DLL_vrfutil bool earthArcIntersectsPath (const DtVector &v1, const DtVector &v2, const DtVector &arcNormal, const std::vector< DtVector > &pathVertices, const std::vector< DtVector > &pathEdgeNormals, const bool isPathClosed, DtVector &intersectionPoint, const bool debug=false)
 
DT_DLL_vrfutil bool earthArcIntersectsPath (const DtVector &v1, const DtVector &v2, const std::vector< DtVector > &pathVertices, DtVector &intersectionPoint, const bool debug=false)
 
DT_DLL_vrfutil bool earthPathIntersectsArea (const std::vector< DtVector > &pathVertices, const std::vector< DtVector > &pathEdgeNormals, const std::vector< DtVector > &areaVertices, const std::vector< DtVector > &areaEdgeNormals, const bool debug=false)
 
DT_DLL_vrfutil void setHemisphereLimits (const std::vector< DtVector > points, DtHemisphereLimits &limits)
 
DT_DLL_vrfutil bool pointOverlapsHemisphereLimits (const DtVector &point, const DtHemisphereLimits &limits)
 
DT_DLL_vrfutil bool hemisphereLimitsOverlap (const DtHemisphereLimits &limit1, const DtHemisphereLimits &limit2)
 

Typedef Documentation

Enumeration Type Documentation

Values for a limiting-hemisphere object in earthSurface functions.

Enumerator
DtPositiveHemisphere 
DtNegativeHemisphere 
DtBothHemispheres 

Function Documentation

DT_DLL_vrfutil bool earthArcsIntersect ( const DtVector &  a1,
const DtVector &  a2,
const DtVector &  normalA,
const DtVector &  middleA,
const DtVector &  b1,
const DtVector &  b2,
const DtVector &  normalB,
const DtVector &  middleB,
DtVector &  intersectionPoint 
)

Determines if one arc intersects another. The arcs A and B are each given by end points 1 and 2 defined in lat-lon or geocentric coordinates. The lat-lon version uses geodetic coordinates, but the altitude is not used. The arcs are assumed to lie along the great circle that joins the two points– on the shortest path along that circle.
The normal vectors correspond to the plane containing the great circle. The middle vectors point to the mid point of the arc. In the versions of this function where normal and middle are not provided, they are computed from the arc endpoints. In this case the magnitude of the arc end points (i.e., the vectors from the origin to the points) must be equal. (Differences in the radius to earth surface points, even between the poles and the equator, are < 1%, which is pretty close.)
The output is given an altitude corresponding to an average earth radius as define in kinematicTools.h (a more exact altitude can be found by the caller by using the terrain interface). IntersectionPoint is only modified if there is an intersection.

DT_DLL_vrfutil bool earthArcsIntersect ( const DtVector &  a1,
const DtVector &  a2,
const DtVector &  b1,
const DtVector &  b2,
DtVector &  intersectionPoint 
)
DT_DLL_vrfutil bool earthArcsIntersect ( const DtGeodeticCoord &  a1,
const DtGeodeticCoord &  a2,
const DtGeodeticCoord &  b1,
const DtGeodeticCoord &  b2,
DtGeodeticCoord &  intersectionPoint 
)
DT_DLL_vrfutil bool earthArcIntersectsPath ( const DtVector &  v1,
const DtVector &  v2,
const DtVector &  arcNormal,
const std::vector< DtVector > &  pathVertices,
const std::vector< DtVector > &  pathEdgeNormals,
const bool  isPathClosed,
DtVector &  intersectionPoint,
const bool  debug = false 
)

Determines if an arc on the earth intersects a path on the earth. The end points of the arc and the path vertices are in geocentric coordinates. The arc, and the edges of the path, are assumed to lie on great circles that are defined by pairs of points.
The normal vectors are the normals of the planes containing the great circles. In the version of the function where these are not supplied, they are computed from the pairs of points. The normal in pathEdgeNormals[0] is the normal for path points [0] and [1].
The intersectionPoint is only modified if there is an intersection. The point has an altitude that corresponds to an average earth radius. If the arc intersects the path on more than one edge, the first edge encountered in input array order will be returned.

DT_DLL_vrfutil bool earthArcIntersectsPath ( const DtVector &  v1,
const DtVector &  v2,
const std::vector< DtVector > &  pathVertices,
DtVector &  intersectionPoint,
const bool  debug = false 
)
DT_DLL_vrfutil bool earthPathIntersectsArea ( const std::vector< DtVector > &  pathVertices,
const std::vector< DtVector > &  pathEdgeNormals,
const std::vector< DtVector > &  areaVertices,
const std::vector< DtVector > &  areaEdgeNormals,
const bool  debug = false 
)

This function wraps earthArcIntersectsPath to check all segments of an (open) path for intersection with a closed path that represents the boundary of an area. Therefore, the function returns true if the path is inside the area as well as if it crosses the boundary.
WARNING. This implementation assumes that the boundary of the area occupies no more than a hemisphere of the earth, and that the inside of the area is the smaller part of the two portions of the earth that the boundary defines, i.e. the area is also smaller than a hemisphere. The inside calculation uses the inside function from kinematicTools, which projects the boundary points onto a plane tangent to the earth at the approximate area center. Thus the boundary edges do not follow great circles for the inside test.

DT_DLL_vrfutil void setHemisphereLimits ( const std::vector< DtVector >  points,
DtHemisphereLimits limits 
)

Given a vector of geocentric points, determine if they are all in one of the hemispheres defined by the coordinate axes, and fill in the values of a DtHemisphereLimits object.

DT_DLL_vrfutil bool pointOverlapsHemisphereLimits ( const DtVector &  point,
const DtHemisphereLimits limits 
)
DT_DLL_vrfutil bool hemisphereLimitsOverlap ( const DtHemisphereLimits limit1,
const DtHemisphereLimits limit2 
)

Given two hemisphere limits objects, determine if they represent overlapping regions of the earth. They will be non-overlapping if on any axis, one object has DtPositive and the other has DtNegative.


Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)