All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
Eegeo::Pins::Pin Class Reference

Defines the data model for a Pin placed in the 3D world. More...

#include <Pin.h>

Inheritance diagram for Eegeo::Pins::Pin:
Eegeo::NonCopyable

Public Member Functions

 Pin (const TPinId id, const Space::LatLong &latLong, float heightAboveTerrainInMetres, int categoryId, const void *pUserData=NULL)
 
TPinId GetId () const
 
int GetCategoryId () const
 
const void * GetUserData () const
 
const dv3GetEcefGeoidLocation () const
 
const dv3GetEcefPosition () const
 
void SetTerrainHeight (float terrainHeight, int terrainHeightLevel)
 
float GetHeightAboveTerrain () const
 
void SetHeightAboveTerrain (float heightAboveTerrainInMetres)
 
void SetCategoryId (int categoryId)
 
bool HasTerrainHeight () const
 
float TerrainHeight () const
 
int TerrainHeightLevel () const
 
void SetTransform (const m44 &transform)
 
void SetTransformOrigin (const dv3 &ecefOrigin)
 
const m44GetTransform () const
 
const dv3GetTransformOrigin () const
 
void SetColor (const v4 &color)
 
const v4GetColor () const
 

Additional Inherited Members

- Protected Member Functions inherited from Eegeo::NonCopyable
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 

Detailed Description

Defines the data model for a Pin placed in the 3D world.

Pin defines a Pin placed in the 3D world. It is intended to be used for the representation of items of point data such as Point Of Interests (POIs) within the world. The Pin class is a model class in the Model-View-Controller sense in that it doesn't deal with display concerns, simply the position of point data within the 3D environment.

Constructor & Destructor Documentation

Eegeo::Pins::Pin::Pin ( const TPinId  id,
const Space::LatLong latLong,
float  heightAboveTerrainInMetres,
int  categoryId,
const void *  pUserData = NULL 
)

Create a Pin object at a particular position in the world.

Parameters
idA unique identifier for the Pin.
latLongThe position of the Pin on the geoid. That is, the position of the Pin with an altitude of sea level.
heightAboveTerrainInMetresThe Pin's height above the terrain in metres.
categoryIdAn application provided identifier denoting the Pin's category.
pUserDataAn optional piece of application user data to be attached to the Pin. N.B. It is the application's responsibility to manage the lifetime of any user data it attaches to Pin objects.
Returns
A Pin object

Member Function Documentation

int Eegeo::Pins::Pin::GetCategoryId ( ) const

Get the category identifier for the Pin.

Returns
The Pin's category identifier.
const v4 & Eegeo::Pins::Pin::GetColor ( ) const

Get the color tint of the Pin. The X,Y,Z, and W components refer to Red, Green, Blue and Alpha values between 0 and 1.

Returns
The color vector applied to the Pin.
const dv3 & Eegeo::Pins::Pin::GetEcefGeoidLocation ( ) const

Get the Pin's ECEF location on the surface of the geoid. That is, the location of the Pin at sea level.

Returns
The Pin's location at sea level.
const dv3 & Eegeo::Pins::Pin::GetEcefPosition ( ) const

Get the ECEF position of the Pin, accounting for the terrain height at its latitude/longitude.

Returns
The Pin's position following adjustment for the terrain height at its latitude/longitude.
float Eegeo::Pins::Pin::GetHeightAboveTerrain ( ) const

Get the Pin's height above the terrain in metres.

Returns
The Pin's height above the terrain in metres.
TPinId Eegeo::Pins::Pin::GetId ( ) const

Get the unique identifier for the Pin.

Returns
The Pin's unique identifier.
const m44 & Eegeo::Pins::Pin::GetTransform ( ) const

Get the transform matrix for the Pin.

Returns
the transform matrix multiplied against the Pin's final position.
const dv3 & Eegeo::Pins::Pin::GetTransformOrigin ( ) const

Get the origin point to apply the Pin Transform in ECEF.

Returns
the ECEF origin the transform is applied at.
const void * Eegeo::Pins::Pin::GetUserData ( ) const

Get the application supplied user data for the Pin.

Returns
The Pin's application supplied user data.
bool Eegeo::Pins::Pin::HasTerrainHeight ( ) const

Test whether the Pin has previously had its terrain height set.

Returns
true is SetTerrainHeight() has been called for this Pin, otherwise false.
void Eegeo::Pins::Pin::SetCategoryId ( int  categoryId)

Set the Pin's category.

Parameters
categoryIdAn application provided identifier denoting the Pin's category.
void Eegeo::Pins::Pin::SetColor ( const v4 color)

Set the color tint of the Pin. The X,Y,Z, and W components will refer to Red, Green, Blue and Alpha values between 0 and 1.

Parameters
Thecolor vector to apply to the Pin.
void Eegeo::Pins::Pin::SetHeightAboveTerrain ( float  heightAboveTerrainInMetres)

Set the Pin's height above the terrain in metres.

Parameters
heightAboveTerrainInMetresThe Pin's height above the terrain in metres.
void Eegeo::Pins::Pin::SetTerrainHeight ( float  terrainHeight,
int  terrainHeightLevel 
)

Set the terrain height that should be used to adjust the Pin's altitude.

Parameters
terrainHeightheight of terrain above sea level in metres.
terrainHeightLevellevel of terrain resource in the environment spatial structure.
void Eegeo::Pins::Pin::SetTransform ( const m44 transform)

Set a transform matrix for the Pin.

Parameters
thetransform matrix to multiply against the Pin's position.
void Eegeo::Pins::Pin::SetTransformOrigin ( const dv3 ecefOrigin)

Set the origin point to apply the Pin Transform in ECEF.

Parameters
theECEF origin the transform will be applied at.
float Eegeo::Pins::Pin::TerrainHeight ( ) const

Get the terrain in metres at the ECEF location of the Pin.

Returns
The terrain height in meters at the ECEF location of the Pin if HasTerrainHeight() is true, otherwise 0.f.
int Eegeo::Pins::Pin::TerrainHeightLevel ( ) const

Get the level of the terrain height for the Pin.

Returns
the terrain height level if HasTerrainHeight() is true for this Pin, otherwise -1.

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