Public Types | |
typedef std::vector < osg::Vec3d > | Vec3dList |
typedef std::pair < double, double > | DistanceHeight |
typedef std::vector < DistanceHeight > | DistanceHeightList |
Public Member Functions | |
ElevationSlice () | |
void | setStartPoint (const osg::Vec3d &startPoint) |
Set the start point of the slice. | |
const osg::Vec3d & | getStartPoint () const |
Get the start point of the slice. | |
void | setEndPoint (const osg::Vec3d &endPoint) |
Set the end point of the slice. | |
const osg::Vec3d & | getEndPoint () const |
Get the end point of the slice. | |
const Vec3dList & | getIntersections () const |
Get the intersections in the form of a vector of Vec3d. | |
const DistanceHeightList & | getDistanceHeightIntersections () const |
Get the intersections in the form a vector of pair<double,double> representing distance along the slice and height. | |
void | computeIntersections (osg::Node *scene, osg::Node::NodeMask traversalMask=0xffffffff) |
Compute the intersections with the specified scene graph, the results are stored in vectors of Vec3d. | |
void | clearDatabaseCache () |
Clear the database cache. | |
void | setDatabaseCacheReadCallback (DatabaseCacheReadCallback *dcrc) |
Set the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs. | |
DatabaseCacheReadCallback * | getDatabaseCacheReadCallback () |
Get the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs. | |
Static Public Member Functions | |
static Vec3dList | computeElevationSlice (osg::Node *scene, const osg::Vec3d &startPoint, const osg::Vec3d &endPoint, osg::Node::NodeMask traversalMask=0xffffffff) |
Compute the vertical distance between the specified scene graph and a single HAT point. | |
Protected Attributes | |
osg::Vec3d | _startPoint |
osg::Vec3d | _endPoint |
Vec3dList | _intersections |
DistanceHeightList | _distanceHeightIntersections |
osg::ref_ptr < DatabaseCacheReadCallback > | _dcrc |
osgUtil::IntersectionVisitor | _intersectionVisitor |
typedef std::vector<osg::Vec3d> osgSim::ElevationSlice::Vec3dList |
typedef std::pair<double,double> osgSim::ElevationSlice::DistanceHeight |
typedef std::vector<DistanceHeight> osgSim::ElevationSlice::DistanceHeightList |
osgSim::ElevationSlice::ElevationSlice | ( | ) |
void osgSim::ElevationSlice::setStartPoint | ( | const osg::Vec3d & | startPoint | ) | [inline] |
Set the start point of the slice.
const osg::Vec3d& osgSim::ElevationSlice::getStartPoint | ( | ) | const [inline] |
Get the start point of the slice.
void osgSim::ElevationSlice::setEndPoint | ( | const osg::Vec3d & | endPoint | ) | [inline] |
Set the end point of the slice.
const osg::Vec3d& osgSim::ElevationSlice::getEndPoint | ( | ) | const [inline] |
Get the end point of the slice.
const Vec3dList& osgSim::ElevationSlice::getIntersections | ( | ) | const [inline] |
Get the intersections in the form of a vector of Vec3d.
const DistanceHeightList& osgSim::ElevationSlice::getDistanceHeightIntersections | ( | ) | const [inline] |
Get the intersections in the form a vector of pair<double,double> representing distance along the slice and height.
void osgSim::ElevationSlice::computeIntersections | ( | osg::Node * | scene, | |
osg::Node::NodeMask | traversalMask = 0xffffffff | |||
) |
Compute the intersections with the specified scene graph, the results are stored in vectors of Vec3d.
Note, if the topmost node is a CoordinateSystemNode then the input points are assumed to be geocentric, with the up vector defined by the EllipsoidModel attached to the CoordinateSystemNode. If the topmost node is not a CoordinateSystemNode then a local coordinates frame is assumed, with a local up vector.
static Vec3dList osgSim::ElevationSlice::computeElevationSlice | ( | osg::Node * | scene, | |
const osg::Vec3d & | startPoint, | |||
const osg::Vec3d & | endPoint, | |||
osg::Node::NodeMask | traversalMask = 0xffffffff | |||
) | [static] |
Compute the vertical distance between the specified scene graph and a single HAT point.
void osgSim::ElevationSlice::clearDatabaseCache | ( | ) | [inline] |
Clear the database cache.
void osgSim::ElevationSlice::setDatabaseCacheReadCallback | ( | DatabaseCacheReadCallback * | dcrc | ) |
Set the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs.
Note, if you have mulitple LineOfSight or ElevationSlice objects in use at one time then you should share a single DatabaseCacheReadCallback between all of them.
DatabaseCacheReadCallback* osgSim::ElevationSlice::getDatabaseCacheReadCallback | ( | ) | [inline] |
Get the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs.
osg::Vec3d osgSim::ElevationSlice::_startPoint [protected] |
osg::Vec3d osgSim::ElevationSlice::_endPoint [protected] |
Vec3dList osgSim::ElevationSlice::_intersections [protected] |