6 #include "PlaceNames.h"
9 #include "VectorMathDecl.h"
22 PlaceNameView(
const std::vector<PlaceNameRenderable*>& renderables,
24 const dv3& positionEcef,
26 const v3& outlineColor,
28 float unflattenableHeightOffset);
31 const std::vector<PlaceNameRenderable*>& GetRenderables()
const {
return m_renderables; }
33 void UpdateVisibility(
const Camera::RenderCamera& renderCamera,
const v3& cameraSurfaceNormal,
float baseScale,
float environmentScale);
34 void UpdateTransforms(
const Camera::RenderCamera& renderCamera,
const v3& cameraSurfaceNormal,
float baseScale,
float environmentScale);
35 void UpdateTransformsAndVisibility(
const Camera::RenderCamera& renderCamera,
const v3& cameraSurfaceNormal,
float baseScale,
float environmentScale);
39 bool IsOccluded()
const {
return m_isOccluded; }
41 bool IsOcclusionPending()
const {
return m_occlusionPending; }
43 float GetAlpha()
const {
return m_alpha; }
45 bool IsCompletelyTransparent()
const {
return m_alpha < (1.0f / 255.0f); }
47 bool IsInFrustum()
const {
return m_isInFrustum; }
49 bool IsInFrontOfCamera()
const {
return m_isInFrontOfCamera; }
52 void SetOccluded(
bool isOccluded) { m_isOccluded = isOccluded; }
53 void SetOcclusionPending(
bool isPending) { m_occlusionPending = isPending; }
54 void SetAlpha(
float alpha) { m_alpha = alpha; }
55 void SetIsInFrustum(
bool isInFrustum) { m_isInFrustum = isInFrustum; }
56 void SetIsInFrontOfCamera(
bool isInFrontOfCamera) { m_isInFrontOfCamera = isInFrontOfCamera; }
58 float GetTransitionParam()
const {
return m_transitionParam; }
59 void SetTransitionParam(
float t) { m_transitionParam = t; }
61 void SetColor(
const v3& color) { m_color = color; }
62 void SetOutlineColor(
const v3& outlineColor) { m_outlineColor = outlineColor; }
63 void SetScale(
float scale) { m_scale = scale; }
65 void SetPositionTransform(
const m44& transform);
66 const m44& GetPositionTransform()
const;
67 void SetPositionTransformOrigin(
const dv3& ecefTransformOrigin);
68 const dv3& GetPositionTransformOrigin()
const;
71 const std::vector<PlaceNameRenderable*> m_renderables;
73 const dv3 m_positionEcef;
77 const float m_unflattenableHeightOffset;
81 bool m_occlusionPending;
83 bool m_isInFrontOfCamera;
85 float m_transitionParam;
87 dv3 m_positionTransformOrigin;
88 m44 m_positionTransform;
90 void UpdatePerInstanceData(
const m44& mvp);
92 dv3 GetTruePosition(
const v3& cameraSurfaceNormal,
float environmentScale)
const;