VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes
makVrv::DtCoordinateSystem Class Reference

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

Public Types

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

Public Member Functions

DtCoordinateSystem * clone () const
 
virtual ~DtCoordinateSystem ()
 
DtCoordinateSystem & operator= (const DtCoordinateSystem &)=delete
 
const std::string & type () const
 
bool isGeocentric () const
 
const std::string & parameters () const
 
bool set (const std::string &type, const std::string &origin)
 
bool addConverter (const std::string &t, DtCoordinateConverter *converter)
 
DtCoordinateConverter * converter () const
 
DtCoordinateConverter * converter (const std::string &type) const
 
virtual DtCoordinateDisplay * display (makArchives::DtDisplayUnitsSettingsRecord::CoordSys system) const
 
virtual DtCoordinateDisplay * display (const DtUnicode &coordSysName) const
 
virtual
DtCoordinateDisplayCollection & 
displays ()
 
virtual const
DtCoordinateDisplayCollection & 
displays () const
 
virtual DtUnitConverterCollection & units ()
 
virtual const
DtUnitConverterCollection & 
units () const
 
DtNoOpCoordinateConverter * noopConverter ()
 
const DtNoOpCoordinateConverter * noopConverter () const
 
DtUtmCoordinateConverter * utmConverter ()
 
const DtUtmCoordinateConverter * utmConverter () const
 
DtLambertCoordinateConverter * lambertConverter ()
 
const
DtLambertCoordinateConverter * 
lambertConverter () const
 
DtCartesianCoordinateConverter * cartesianConverter ()
 
const
DtCartesianCoordinateConverter * 
cartesianConverter () const
 
DtGeocentricCoordinateConverter * geocentricConverter ()
 
const
DtGeocentricCoordinateConverter * 
geocentricConverter () const
 
DtFlatEarthCoordinateConverter * flatEarthConverter ()
 
const
DtFlatEarthCoordinateConverter * 
flatEarthConverter () const
 
void setUseTopoForFlatEarthVectorConversion (bool flag)
 
bool useTopoForFlatEarthVectorConversion () const
 
const DtMapDatum & datum () const
 
void setDatum (const DtMapDatum &datum)
 
void netToLocalPos (const DtVector &netpos, DtVector &localpos) const
 
void netToLocalVec (const DtVector &localpos, const DtVector &netvec, DtVector &localvec) const
 
void netToLocalVec (const DtVector &localpos, const DtVector32 &netvec, DtVector32 &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
 
void localToNetPos (const DtVector &localpos, DtVector &netpos) const
 
void localToNetOri (const DtVector &localpos, const DtTaitBryan &localori, DtTaitBryan &netori) const
 
void localToNetVec (const DtVector &localpos, const DtVector &localvec, DtVector &netvec) const
 
void localToNetVec (const DtVector &localpos, const DtVector32 &localvec, DtVector32 &netvec) const
 
void localToNetPos (const double(&localpos)[3], double(&netpos)[3]) const
 
void localToNetOri (const double localpos[3], const double localori[3], double netori[3]) const
 

Static Public Member Functions

static DtCoordinateSystem * create ()
 
static
DtCoordinateConverterFactory & 
converterFactory ()
 
static void setCreator (CoordinateSystemCreatorFn fn)
 
static const DtReferenceEllipsoid * referenceEllipsoid ()
 

Protected Types

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

Protected Member Functions

 DtCoordinateSystem ()
 
 DtCoordinateSystem (const DtCoordinateSystem &)
 

Protected Attributes

ConverterMap myConverters
 
DtCoordinateConverter * myCurrentConverter
 
std::string myCoordinateSystemParameters
 
DtCoordinateDisplayCollection * myDisplays
 
DtUnitConverterCollection * myUnits
 
bool myUseTopoForFlatEarthVectorConversion
 

Static Protected Attributes

static CoordinateSystemCreatorFn theCreatorFn
 
static CoordinateSystemCloneFn theCloneFn
 
static DtCoordinateConverterFactory theCoordConverterFactory
 
static DtReferenceEllipsoid * theReferenceEllipsoidPtr
 

Member Typedef Documentation

typedef DtCoordinateSystem*(* makVrv::DtCoordinateSystem::CoordinateSystemCreatorFn)()
typedef DtCoordinateSystem*(* makVrv::DtCoordinateSystem::CoordinateSystemCloneFn)(const DtCoordinateSystem &)
typedef void(* makVrv::DtCoordinateSystem::TypeChangedFn)(DtCoordinateSystem *, void *)
typedef std::unordered_map<std::string, DtCoordinateConverter*> makVrv::DtCoordinateSystem::ConverterMap
protected

Constructor & Destructor Documentation

virtual makVrv::DtCoordinateSystem::~DtCoordinateSystem ( )
virtual

Destructor.

makVrv::DtCoordinateSystem::DtCoordinateSystem ( )
protected

Constructor.

makVrv::DtCoordinateSystem::DtCoordinateSystem ( const DtCoordinateSystem &  )
protected

Constructor.

Member Function Documentation

static DtCoordinateSystem* makVrv::DtCoordinateSystem::create ( )
static

Create an instance of this class.

DtCoordinateSystem* makVrv::DtCoordinateSystem::clone ( ) const

Create a copy of the coordinate system.

DtCoordinateSystem& makVrv::DtCoordinateSystem::operator= ( const DtCoordinateSystem &  )
delete

Not implemented.

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

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

bool makVrv::DtCoordinateSystem::isGeocentric ( ) const

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.

DtCoordinateConverter* makVrv::DtCoordinateSystem::converter ( ) const

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.

virtual DtCoordinateDisplay* makVrv::DtCoordinateSystem::display ( makArchives::DtDisplayUnitsSettingsRecord::CoordSys  system) const
virtual

Returns the converter for the specified unit type.

virtual DtCoordinateDisplay* makVrv::DtCoordinateSystem::display ( const DtUnicode &  coordSysName) const
virtual
virtual DtCoordinateDisplayCollection& makVrv::DtCoordinateSystem::displays ( )
virtual

Get the coordinate system displays.

virtual const DtCoordinateDisplayCollection& makVrv::DtCoordinateSystem::displays ( ) const
virtual
virtual DtUnitConverterCollection& makVrv::DtCoordinateSystem::units ( )
virtual

Get the unit converters.

virtual const DtUnitConverterCollection& makVrv::DtCoordinateSystem::units ( ) const
virtual
DtNoOpCoordinateConverter* makVrv::DtCoordinateSystem::noopConverter ( )

Get the NoOp converter.

const DtNoOpCoordinateConverter* makVrv::DtCoordinateSystem::noopConverter ( ) const
DtUtmCoordinateConverter* makVrv::DtCoordinateSystem::utmConverter ( )

Get the UTM converter.

const DtUtmCoordinateConverter* makVrv::DtCoordinateSystem::utmConverter ( ) const
DtLambertCoordinateConverter* makVrv::DtCoordinateSystem::lambertConverter ( )

Get the Lambert converter.

const DtLambertCoordinateConverter* makVrv::DtCoordinateSystem::lambertConverter ( ) const
DtCartesianCoordinateConverter* makVrv::DtCoordinateSystem::cartesianConverter ( )

Get the Cartesian converter.

const DtCartesianCoordinateConverter* makVrv::DtCoordinateSystem::cartesianConverter ( ) const
DtGeocentricCoordinateConverter* makVrv::DtCoordinateSystem::geocentricConverter ( )

Get the geocentric converter.

const DtGeocentricCoordinateConverter* makVrv::DtCoordinateSystem::geocentricConverter ( ) const
DtFlatEarthCoordinateConverter* makVrv::DtCoordinateSystem::flatEarthConverter ( )

Get the flat earth converter.

const DtFlatEarthCoordinateConverter* makVrv::DtCoordinateSystem::flatEarthConverter ( ) const
void makVrv::DtCoordinateSystem::setUseTopoForFlatEarthVectorConversion ( bool  flag)

We used to use a topo system to convert flat earth vectors. Now we find the point at the end of the vector, convert start and end points, and subtract for a more accurate result. However, when receiving data from a sim using the old method (including older versions of VR-Forces and DI-Guy) user's may want to revert to the old scheme.

bool makVrv::DtCoordinateSystem::useTopoForFlatEarthVectorConversion ( ) const
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

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

void makVrv::DtCoordinateSystem::netToLocalVec ( const DtVector &  localpos,
const DtVector &  netvec,
DtVector &  localvec 
) const
void makVrv::DtCoordinateSystem::netToLocalVec ( const DtVector &  localpos,
const DtVector32 &  netvec,
DtVector32 &  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::localToNetVec ( const DtVector &  localpos,
const DtVector32 &  localvec,
DtVector32 &  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.

static DtCoordinateConverterFactory& makVrv::DtCoordinateSystem::converterFactory ( )
static

Get a pointer to the coordinate converter factory.

static void makVrv::DtCoordinateSystem::setCreator ( CoordinateSystemCreatorFn  fn)
static

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.

static const DtReferenceEllipsoid* makVrv::DtCoordinateSystem::referenceEllipsoid ( )
static

Return the (static) reference ellipsoid, suitable for use with DtGeodeticCoord.

Member Data Documentation

ConverterMap makVrv::DtCoordinateSystem::myConverters
protected
DtCoordinateConverter* makVrv::DtCoordinateSystem::myCurrentConverter
protected
std::string makVrv::DtCoordinateSystem::myCoordinateSystemParameters
protected
DtCoordinateDisplayCollection* makVrv::DtCoordinateSystem::myDisplays
protected
DtUnitConverterCollection* makVrv::DtCoordinateSystem::myUnits
protected
bool makVrv::DtCoordinateSystem::myUseTopoForFlatEarthVectorConversion
protected
CoordinateSystemCreatorFn makVrv::DtCoordinateSystem::theCreatorFn
staticprotected
CoordinateSystemCloneFn makVrv::DtCoordinateSystem::theCloneFn
staticprotected
DtCoordinateConverterFactory makVrv::DtCoordinateSystem::theCoordConverterFactory
staticprotected
DtReferenceEllipsoid* makVrv::DtCoordinateSystem::theReferenceEllipsoidPtr
staticprotected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)