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

Renderer for a collection of PinView objects. More...

#include <PinViewRenderer.h>

Inheritance diagram for Eegeo::Pins::PinViewRenderer:
Eegeo::Rendering::IRenderableFilter

Public Member Functions

 PinViewRenderer (const Rendering::EnvironmentFlatteningService &environmentFlatteningService, Eegeo::Rendering::RenderableFilters &renderableFilters, const Eegeo::Rendering::ITexturePageLayout &texturePageLayout, Rendering::Renderables::BatchedSpriteRenderable *pRenderable, Rendering::Materials::BatchedSpriteMaterial *pMaterial, Rendering::Shaders::BatchedSpriteShader *pShader, const Eegeo::Rendering::ScreenProperties &screenProperties, const bool useLegacyScaling)
 
void AddView (PinView &viewToAdd)
 
void RemoveView (PinView &viewToRemove)
 
void Update (const Camera::RenderCamera &renderCamera)
 
void UpdateScreenProperties (const Eegeo::Rendering::ScreenProperties &screenProperties)
 
bool TryGetViewsIntersectingScreenPoint (const v2 &screenPoint, std::vector< PinView * > &outIntersectingViews) const
 
void EnqueueRenderables (const Rendering::RenderContext &renderContext, Rendering::RenderQueue &renderQueue)
 

Static Public Member Functions

static PinViewRendererCreate (const Rendering::EnvironmentFlatteningService &environmentFlatteningService, Eegeo::Rendering::RenderableFilters &renderableFilters, Rendering::Shaders::ShaderIdGenerator &shaderIdGenerator, Rendering::Materials::MaterialIdGenerator &materialIdGenerator, Eegeo::Rendering::VertexLayouts::VertexLayoutPool &vertexLayoutPool, Eegeo::Rendering::VertexLayouts::VertexBindingPool &vertexBindingPool, Eegeo::Rendering::GlBufferPool &glBufferPool, const Eegeo::Rendering::ITexturePageLayout &texturePageLayout, const Eegeo::Rendering::TTextureId textureId, const Eegeo::Rendering::LayerIds::Values layerId, const Rendering::ScreenProperties &screenProperties, const bool useLegacyScaling)
 

Detailed Description

Renderer for a collection of PinView objects.

This class deals with the on-screen representation of a collection of PinView objects.

Constructor & Destructor Documentation

Eegeo::Pins::PinViewRenderer::PinViewRenderer ( const Rendering::EnvironmentFlatteningService environmentFlatteningService,
Eegeo::Rendering::RenderableFilters renderableFilters,
const Eegeo::Rendering::ITexturePageLayout texturePageLayout,
Rendering::Renderables::BatchedSpriteRenderable pRenderable,
Rendering::Materials::BatchedSpriteMaterial pMaterial,
Rendering::Shaders::BatchedSpriteShader pShader,
const Eegeo::Rendering::ScreenProperties screenProperties,
const bool  useLegacyScaling 
)

Create an empty PinViewRenderer object.

Parameters
renderableFiltersthe renderable filters to which the pins will be registered
texturePageLayoutan ITexturePageLayout instance which will be used to map category ids to texture uvs
pRenderablepointer to a renderable that will be used to render sprites. Deleted when class is destroyed.
pMaterialpointer to a material that will be used to render sprites. Deleted when class is destroyed.
pShaderpointer to a shader that will be used to render sprites. Deleted when class is destroyed.
screenPropertiesThe ScreenProperties defining screen size and density
useLegacyScalingLegacy scaling sizes pins based on a fixed value rather than screen size & density.
Returns
A new, empty PinViewRenderer object.

Member Function Documentation

void Eegeo::Pins::PinViewRenderer::AddView ( PinView viewToAdd)

Add a PinView to the PinViewRenderer.

Parameters
viewToAddThe view to add to the renderer.
PinViewRenderer * Eegeo::Pins::PinViewRenderer::Create ( const Rendering::EnvironmentFlatteningService environmentFlatteningService,
Eegeo::Rendering::RenderableFilters renderableFilters,
Rendering::Shaders::ShaderIdGenerator shaderIdGenerator,
Rendering::Materials::MaterialIdGenerator materialIdGenerator,
Eegeo::Rendering::VertexLayouts::VertexLayoutPool vertexLayoutPool,
Eegeo::Rendering::VertexLayouts::VertexBindingPool vertexBindingPool,
Eegeo::Rendering::GlBufferPool glBufferPool,
const Eegeo::Rendering::ITexturePageLayout texturePageLayout,
const Eegeo::Rendering::TTextureId  textureId,
const Eegeo::Rendering::LayerIds::Values  layerId,
const Rendering::ScreenProperties screenProperties,
const bool  useLegacyScaling 
)
static

Factory method for creating an empty PinViewRenderer object.

Parameters
renderableFiltersthe renderable filters to which the pins will be registered
texturePageLayoutan ITexturePageLayout instance which will be used to map category ids to texture uvs
textureIdthe TextureId associated with the pins texture to be used for rendering pins
layerIdthe layer to which the pins will be rendered
screenPropertiesThe ScreenProperties defining screen size and density
useLegacyScalingLegacy scaling sizes pins based on a fixed value rather than screen size & density.
Returns
A new, empty PinViewRenderer object.
void Eegeo::Pins::PinViewRenderer::EnqueueRenderables ( const Rendering::RenderContext renderContext,
Rendering::RenderQueue renderQueue 
)
virtual

Enque the renderables for the views to be rendered.

Parameters
renderContextthe current render context.
renderQueuethe render queue to which renderables will be enqueued.

Implements Eegeo::Rendering::IRenderableFilter.

void Eegeo::Pins::PinViewRenderer::RemoveView ( PinView viewToRemove)

Remove a PinView to the PinViewRenderer.

Parameters
viewToRemoveThe view to remove from the renderer.
bool Eegeo::Pins::PinViewRenderer::TryGetViewsIntersectingScreenPoint ( const v2 screenPoint,
std::vector< PinView * > &  outIntersectingViews 
) const

Test the PinViews in the renderer for intersection with a given screen point.

Parameters
screenPointThe screen point (in screen pixel coordinates) to test for intersection with the PinViews.
outIntersectingViewsA vector to be populated, in order of increasing distance from the camera, with the PinViews which intersect screenPoint.
Returns
true if any views intersected screenPoint, otherwise false.
void Eegeo::Pins::PinViewRenderer::Update ( const Camera::RenderCamera renderCamera)

Update the model-view-projections, bounds and on-screen visibility for the PinViews in the renderer.

void Eegeo::Pins::PinViewRenderer::UpdateScreenProperties ( const Eegeo::Rendering::ScreenProperties screenProperties)

Update the screen properties of the renderer so it draws pins at the correct size


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