VR-Forces 4.0.4 Class Documentation
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
makVrv::DtCoordinateSystem Class Reference

The DtCoordinateSystem is used to manage the current coordinate system of the scene. More...

List of all members.

Public Types

typedef DtCoordinateSystem *(* CoordinateSystemCreatorFn )()
typedef DtCoordinateSystem *(* CoordinateSystemCloneFn )(const DtCoordinateSystem &)
typedef void(* TypeChangedFn )(DtCoordinateSystem *, void *)

Public Member Functions

DtCoordinateSystemclone () const
 Create a copy of the coordinate system.
 ~DtCoordinateSystem ()
 Destructor.
const std::string & type () const
 The coordinate system type is determined by the active coordinate converter.
bool isGeocentric () const
 Is the active coordinate system geocentric.
const std::string & parameters () const
 The coordinate system parameters.
bool set (const std::string &type, const std::string &origin)
 Set the current coordinate system based on type and origin string.
bool addConverter (const std::string &t, DtCoordinateConverter *converter)
 Add a new converter.
DtCoordinateConverterconverter () const
 Get the current coordinate converter for this system.
DtCoordinateConverterconverter (const std::string &type) const
 Get the coordinate converter for the given type.
virtual DtCoordinateDisplaydisplay (makArchives::DtDisplayUnitsSettingsRecord::CoordSys system) const
 Returns the converter for the specified unit type.
virtual DtCoordinateDisplaydisplay (const DtUnicode &coordSysName) const
virtual
DtCoordinateDisplayCollection
displays ()
 Get the coordinate system displays.
virtual const
DtCoordinateDisplayCollection
displays () const
virtual DtUnitConverterCollectionunits ()
 Get the unit converters.
virtual const
DtUnitConverterCollection
units () const
DtNoOpCoordinateConverternoopConverter ()
 Get the NoOp converter.
const DtNoOpCoordinateConverternoopConverter () const
DtUtmCoordinateConverterutmConverter ()
 Get the UTM converter.
const DtUtmCoordinateConverterutmConverter () const
DtLambertCoordinateConverterlambertConverter ()
 Get the Lambert converter.
const
DtLambertCoordinateConverter
lambertConverter () const
DtCartesianCoordinateConvertercartesianConverter ()
 Get the Cartesian converter.
const
DtCartesianCoordinateConverter
cartesianConverter () const
DtGeocentricCoordinateConvertergeocentricConverter ()
 Get the geocentric converter.
const
DtGeocentricCoordinateConverter
geocentricConverter () const
DtFlatEarthCoordinateConverterflatEarthConverter ()
 Get the flat earth converter.
const
DtFlatEarthCoordinateConverter
flatEarthConverter () const
const DtMapDatum & datum () const
 Return our map datum.
void setDatum (const DtMapDatum &datum)
 Set our map datum This function should be called rather than calling DtUseMapDatum to ensure that our converters can be kept in sync.
void netToLocalPos (const DtVector &netpos, DtVector &localpos) const
 All orientation conversions use radians Convert an entity's spatial information between network and database coords.
void netToLocalVec (const DtVector &localpos, const DtVector &netvec, DtVector &localvec) const
void netToLocalOri (const DtVector &localpos, const DtTaitBryan &netori, DtTaitBryan &localori) const
void netToLocalHpr (const DtVector &localpos, const DtTaitBryan &netori, DtTaitBryan &localhpr) const
void netBodyToLocalBody (const DtVector &localpos, const DtDcm &netdcm, DtDcm &localdcm) const
void netToLocalOri (const double localpos[3], const double netori[3], double localori[3]) const
 These functions are useful for converting raw double values coords.
void localToNetPos (const DtVector &localpos, DtVector &netpos) const
 All orientation conversions use radians Convert an entity's spatial information between database (local) and network coords.
void localToNetOri (const DtVector &localpos, const DtTaitBryan &localori, DtTaitBryan &netori) const
void localToNetVec (const DtVector &localpos, const DtVector &localvec, DtVector &netvec) const
void localToNetPos (const double(&localpos)[3], double(&netpos)[3]) const
 These functions are useful for converting raw double values coords.
void localToNetOri (const double localpos[3], const double localori[3], double netori[3]) const
 Orientation is in degrees.

Static Public Member Functions

static DtCoordinateSystemcreate ()
 Create an instance of this class.
static
DtCoordinateConverterFactory
converterFactory ()
 Get a pointer to the coordinate converter factory.
static void setCreator (CoordinateSystemCreatorFn fn)
 To override instances of this class, register a creator for the child class with this function.

Protected Types

typedef boost::unordered_map
< std::string,
DtCoordinateConverter * > 
ConverterMap

Protected Member Functions

 DtCoordinateSystem ()
 Constructor.
 DtCoordinateSystem (const DtCoordinateSystem &)
 Constructor.

Protected Attributes

ConverterMap myConverters
DtCoordinateConvertermyCurrentConverter
DtMapDatum * myCurrentDatum
std::string myCoordinateSystemParameters
DtCoordinateDisplayCollectionmyDisplays
DtUnitConverterCollectionmyUnits

Static Protected Attributes

static CoordinateSystemCreatorFn theCreatorFn
static CoordinateSystemCloneFn theCloneFn
static DtCoordinateConverterFactory theCoordConverterFactory

Private Member Functions

DtCoordinateSystemoperator= (const DtCoordinateSystem &)
 Not implemented.

Detailed Description

The DtCoordinateSystem is used to manage the current coordinate system of the scene.


Member Typedef Documentation

typedef boost::unordered_map<std::string, DtCoordinateConverter*> makVrv::DtCoordinateSystem::ConverterMap [protected]

Constructor & Destructor Documentation

Destructor.

Constructor.

Constructor.


Member Function Documentation

Create an instance of this class.

Create a copy of the coordinate system.

const std::string& makVrv::DtCoordinateSystem::type ( ) const

The coordinate system type is determined by the active coordinate converter.

Is the active coordinate system geocentric.

This mode is not flat so many operations benefit from a quick lookup. a quick test to see if the system is geocentric

const std::string& makVrv::DtCoordinateSystem::parameters ( ) const

The coordinate system parameters.

bool makVrv::DtCoordinateSystem::set ( const std::string &  type,
const std::string &  origin 
)

Set the current coordinate system based on type and origin string.

The format of the origin string varies for each coordinate system type

bool makVrv::DtCoordinateSystem::addConverter ( const std::string &  t,
DtCoordinateConverter converter 
)

Add a new converter.

If a converter already exists for the given type, the old converter will be replaced with the new one. This class will delete the given converter on close.

Get the current coordinate converter for this system.

DtCoordinateConverter* makVrv::DtCoordinateSystem::converter ( const std::string &  type) const

Get the coordinate converter for the given type.

Returns the converter for the specified unit type.

virtual DtCoordinateDisplay* makVrv::DtCoordinateSystem::display ( const DtUnicode coordSysName) const [virtual]

Get the coordinate system displays.

Get the unit converters.

Get the NoOp converter.

Get the UTM converter.

Get the Lambert converter.

Get the Cartesian converter.

Get the geocentric converter.

Get the flat earth converter.

const DtMapDatum& makVrv::DtCoordinateSystem::datum ( ) const

Return our map datum.

void makVrv::DtCoordinateSystem::setDatum ( const DtMapDatum &  datum)

Set our map datum This function should be called rather than calling DtUseMapDatum to ensure that our converters can be kept in sync.

void makVrv::DtCoordinateSystem::netToLocalPos ( const DtVector netpos,
DtVector localpos 
) const
void makVrv::DtCoordinateSystem::netToLocalVec ( const DtVector localpos,
const DtVector netvec,
DtVector localvec 
) const
void makVrv::DtCoordinateSystem::netToLocalOri ( const DtVector localpos,
const DtTaitBryan &  netori,
DtTaitBryan &  localori 
) const
void makVrv::DtCoordinateSystem::netToLocalHpr ( const DtVector localpos,
const DtTaitBryan &  netori,
DtTaitBryan &  localhpr 
) const
void makVrv::DtCoordinateSystem::netBodyToLocalBody ( const DtVector localpos,
const DtDcm &  netdcm,
DtDcm &  localdcm 
) const
void makVrv::DtCoordinateSystem::netToLocalOri ( const double  localpos[3],
const double  netori[3],
double  localori[3] 
) const

These functions are useful for converting raw double values coords.

These functions are useful for converting raw orientation is in degrees.

void makVrv::DtCoordinateSystem::localToNetPos ( const DtVector localpos,
DtVector netpos 
) const

All orientation conversions use radians Convert an entity's spatial information between database (local) and network coords.

void makVrv::DtCoordinateSystem::localToNetOri ( const DtVector localpos,
const DtTaitBryan &  localori,
DtTaitBryan &  netori 
) const
void makVrv::DtCoordinateSystem::localToNetVec ( const DtVector localpos,
const DtVector localvec,
DtVector netvec 
) const
void makVrv::DtCoordinateSystem::localToNetPos ( const double(&)  localpos[3],
double(&)  netpos[3] 
) const [inline]

These functions are useful for converting raw double values coords.

void makVrv::DtCoordinateSystem::localToNetOri ( const double  localpos[3],
const double  localori[3],
double  netori[3] 
) const

Orientation is in degrees.

Get a pointer to the coordinate converter factory.

To override instances of this class, register a creator for the child class with this function.

When create() is next called the derived class will be created.

DtCoordinateSystem& makVrv::DtCoordinateSystem::operator= ( const DtCoordinateSystem ) [private]

Not implemented.


Member Data Documentation


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)