OpenSceneGraph  3.0.1
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
osgTerrain::Locator Class Reference
Inheritance diagram for osgTerrain::Locator:
Inheritance graph
[legend]

List of all members.

Public Types

enum  CoordinateSystemType { GEOCENTRIC, GEOGRAPHIC, PROJECTED }
 CoordinateSystemType provides the classification of the type coordinate system represented. More...

Public Member Functions

 Locator ()
 Locator (const Locator &, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 Copy constructor using CopyOp to manage deep vs shallow copy.
 META_Object (osgTerrain, Locator)
void setCoordinateSystemType (CoordinateSystemType type)
 Set the CoordinatesSyetemType.
CoordinateSystemType getCoordinateSystemType () const
 Get the CoordinatesSyetemType.
void setFormat (const std::string &format)
 Set the coordinate system format string.
const std::string & getFormat () const
 Get the coordinate system format string.
void setCoordinateSystem (const std::string &cs)
 Set the CoordinateSystem reference string, should be stored in a form consistent with the Format.
const std::string & getCoordinateSystem () const
 Get the CoordinateSystem reference string.
void setEllipsoidModel (osg::EllipsoidModel *ellipsode)
 Set EllipsoidModel to describe the model used to map lat, long and height into geocentric XYZ and back.
osg::EllipsoidModelgetEllipsoidModel ()
 Get the EllipsoidModel.
const osg::EllipsoidModelgetEllipsoidModel () const
 Get the const EllipsoidModel.
void setTransform (const osg::Matrixd &transform)
 Set the transformation from local coordinates to model coordinates.
const osg::MatrixdgetTransform () const
 Set the transformation from local coordinates to model coordinates.
void setTransformAsExtents (double minX, double minY, double maxX, double maxY)
 Set the extents of the local coords.
virtual bool orientationOpenGL () const
virtual bool convertLocalToModel (const osg::Vec3d &local, osg::Vec3d &world) const
virtual bool convertModelToLocal (const osg::Vec3d &world, osg::Vec3d &local) const
bool computeLocalBounds (Locator &source, osg::Vec3d &bottomLeft, osg::Vec3d &topRight) const
void setDefinedInFile (bool flag)
bool getDefinedInFile () const
void setTransformScaledByResolution (bool scaledByResolution)
bool getTransformScaledByResolution () const

Static Public Member Functions

static bool convertLocalCoordBetween (const Locator &source, const osg::Vec3d &sourceNDC, const Locator &destination, osg::Vec3d &destinationNDC)

Protected Member Functions

virtual ~Locator ()

Protected Attributes

CoordinateSystemType _coordinateSystemType
std::string _format
std::string _cs
osg::ref_ptr< osg::EllipsoidModel_ellipsoidModel
osg::Matrixd _transform
osg::Matrixd _inverse
bool _definedInFile
bool _transformScaledByResolution

Member Enumeration Documentation

CoordinateSystemType provides the classification of the type coordinate system represented.

Enumerator:
GEOCENTRIC 

GEOCENTRIC coordinate systems are ones mapped to the around the ellipsoid, i.e.

whole earth.

GEOGRAPHIC 

GEOGRAPHIC coordinate systems are ones mapped to latitude and longitude.

PROJECTED 

PROJECTED coordinate systems are ones projected to a local projected coordinate system i.e.

UTMs.


Constructor & Destructor Documentation

osgTerrain::Locator::Locator ( )
osgTerrain::Locator::Locator ( const Locator ,
const osg::CopyOp copyop = osg::CopyOp::SHALLOW_COPY 
)

Copy constructor using CopyOp to manage deep vs shallow copy.

virtual osgTerrain::Locator::~Locator ( ) [protected, virtual]

Member Function Documentation

bool osgTerrain::Locator::computeLocalBounds ( Locator source,
osg::Vec3d bottomLeft,
osg::Vec3d topRight 
) const
static bool osgTerrain::Locator::convertLocalCoordBetween ( const Locator source,
const osg::Vec3d sourceNDC,
const Locator destination,
osg::Vec3d destinationNDC 
) [inline, static]
virtual bool osgTerrain::Locator::convertLocalToModel ( const osg::Vec3d local,
osg::Vec3d world 
) const [virtual]
virtual bool osgTerrain::Locator::convertModelToLocal ( const osg::Vec3d world,
osg::Vec3d local 
) const [virtual]
const std::string& osgTerrain::Locator::getCoordinateSystem ( ) const [inline]

Get the CoordinateSystem reference string.

CoordinateSystemType osgTerrain::Locator::getCoordinateSystemType ( ) const [inline]

Get the CoordinatesSyetemType.

bool osgTerrain::Locator::getDefinedInFile ( ) const [inline]
osg::EllipsoidModel* osgTerrain::Locator::getEllipsoidModel ( ) [inline]

Get the EllipsoidModel.

const osg::EllipsoidModel* osgTerrain::Locator::getEllipsoidModel ( ) const [inline]

Get the const EllipsoidModel.

const std::string& osgTerrain::Locator::getFormat ( ) const [inline]

Get the coordinate system format string.

const osg::Matrixd& osgTerrain::Locator::getTransform ( ) const [inline]

Set the transformation from local coordinates to model coordinates.

bool osgTerrain::Locator::getTransformScaledByResolution ( ) const [inline]
osgTerrain::Locator::META_Object ( osgTerrain  ,
Locator   
)
virtual bool osgTerrain::Locator::orientationOpenGL ( ) const [virtual]
void osgTerrain::Locator::setCoordinateSystem ( const std::string &  cs) [inline]

Set the CoordinateSystem reference string, should be stored in a form consistent with the Format.

void osgTerrain::Locator::setCoordinateSystemType ( CoordinateSystemType  type) [inline]

Set the CoordinatesSyetemType.

Note, the user must keep the CoordinateSystemString consistent with the type of the CoordinateSystem.

void osgTerrain::Locator::setDefinedInFile ( bool  flag) [inline]
void osgTerrain::Locator::setEllipsoidModel ( osg::EllipsoidModel ellipsode) [inline]

Set EllipsoidModel to describe the model used to map lat, long and height into geocentric XYZ and back.

void osgTerrain::Locator::setFormat ( const std::string &  format) [inline]

Set the coordinate system format string.

Typical values would be WKT, PROJ4, USGS etc.

void osgTerrain::Locator::setTransform ( const osg::Matrixd transform) [inline]

Set the transformation from local coordinates to model coordinates.

References osg::Matrixd::invert().

void osgTerrain::Locator::setTransformAsExtents ( double  minX,
double  minY,
double  maxX,
double  maxY 
)

Set the extents of the local coords.

void osgTerrain::Locator::setTransformScaledByResolution ( bool  scaledByResolution) [inline]

Member Data Documentation

std::string osgTerrain::Locator::_cs [protected]
std::string osgTerrain::Locator::_format [protected]

The documentation for this class was generated from the following file:

osg logo
Generated at Mon Oct 3 2011 12:39:49 for the OpenSceneGraph by doxygen 1.7.5.