A view object representing a Pin in the world as 2.5D billboard sprite. More...
#include <PinView.h>
Public Member Functions | |
PinView (Pin &pin, const Eegeo::Geometry::Bounds3D &modelVertexBounds) | |
~PinView () | |
Pin & | GetPin () const |
void | SetScale (float value) |
float | GetScale () const |
void | SetDimensions (const v2 &value) |
v2 | GetDimensions () const |
void | SetEcefOrigin (const dv3 &ecefOrigin) |
const dv3 & | GetEcefOrigin () const |
float | GetHeightAboveTerrain () const |
void | SetModelViewProjection (const m44 &modelViewProjection) |
const m44 & | GetModelViewProjection () const |
void | UpdateBounds (int screenWidth, int screenHeight) |
const Geometry::Bounds3D & | GetViewSpaceBounds () const |
const Geometry::Bounds2D & | GetScreenSpaceBounds () const |
void | SetTransform (const m44 &transform) |
void | SetTransformOrigin (const dv3 &ecefOrigin) |
const m44 & | GetTransform () const |
const dv3 & | GetTransformOrigin () const |
void | SetColor (const v4 &color) |
const v4 & | GetColor () const |
Additional Inherited Members | |
Protected Member Functions inherited from Eegeo::NonCopyable | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
A view object representing a Pin in the world as 2.5D billboard sprite.
This class deals with the concerns of displaying a Pin in the 3D scene as a 2.5D billboard sprite.
Eegeo::Pins::PinView::PinView | ( | Pin & | pin, |
const Eegeo::Geometry::Bounds3D & | modelVertexBounds | ||
) |
Eegeo::Pins::PinView::~PinView | ( | ) |
Delete a PinView and its underlying sprite.
const v4 & Eegeo::Pins::PinView::GetColor | ( | ) | const |
v2 Eegeo::Pins::PinView::GetDimensions | ( | ) | const |
Get the world space dimensions for the sprite
const dv3 & Eegeo::Pins::PinView::GetEcefOrigin | ( | ) | const |
float Eegeo::Pins::PinView::GetHeightAboveTerrain | ( | ) | const |
const m44 & Eegeo::Pins::PinView::GetModelViewProjection | ( | ) | const |
Pin & Eegeo::Pins::PinView::GetPin | ( | ) | const |
float Eegeo::Pins::PinView::GetScale | ( | ) | const |
Retrieve the uniform scale for the view.
const Geometry::Bounds2D & Eegeo::Pins::PinView::GetScreenSpaceBounds | ( | ) | const |
Retrieve the 2D bounds of the PinView in Screen space. This method returns the last set of bounds that were calculated by a call to UpdateBounds().
const m44 & Eegeo::Pins::PinView::GetTransform | ( | ) | const |
const dv3 & Eegeo::Pins::PinView::GetTransformOrigin | ( | ) | const |
Get the origin point to apply the Pin Transform in ECEF.
const Geometry::Bounds3D & Eegeo::Pins::PinView::GetViewSpaceBounds | ( | ) | const |
Retrieve the 3D bounds of the PinView in View space. This method returns the last set of bounds that were calculated by a call to UpdateBounds().
void Eegeo::Pins::PinView::SetColor | ( | const v4 & | color | ) |
void Eegeo::Pins::PinView::SetDimensions | ( | const v2 & | value | ) |
Set the world space dimensions for the sprite
value | the dimensions in metres (x component = width, y component = height) |
void Eegeo::Pins::PinView::SetEcefOrigin | ( | const dv3 & | ecefOrigin | ) |
void Eegeo::Pins::PinView::SetModelViewProjection | ( | const m44 & | modelViewProjection | ) |
Set the model-view-projection matrix that will be used to position and orient the PinView's sprite.
modelViewProjection | The model-view-projection matrix to set. |
void Eegeo::Pins::PinView::SetScale | ( | float | value | ) |
Set the uniform scale for the view.
value | The uniform scale value for the view. |
void Eegeo::Pins::PinView::SetTransform | ( | const m44 & | transform | ) |
void Eegeo::Pins::PinView::SetTransformOrigin | ( | const dv3 & | ecefOrigin | ) |
Set the origin point to apply the Pin Transform in ECEF.
the | ECEF origin the transform will be applied at. |
void Eegeo::Pins::PinView::UpdateBounds | ( | int | screenWidth, |
int | screenHeight | ||
) |
Update the bounds for the PinView based on it's current model-view-projection matrix.
screenWidth | The width of the screen in pixels. |
screenHeight | The height of the screen in pixels. |