5 #include "PlaceNames.h"
6 #include "PlaceNameModel.h"
7 #include "PlaceNameView.h"
9 #include "ICityThemeChangedObserver.h"
11 #include "Rendering.h"
12 #include "CityThemes.h"
13 #include "ITextRenderablesSource.h"
14 #include "PlaceNameCategory.h"
24 class PlaceNamePrioritySort :
public std::binary_function<const Eegeo::Resources::PlaceNames::PlaceNameModel*, const Eegeo::Resources::PlaceNames::PlaceNameModel*, bool>
30 float aPri = pA->GetPriority();
31 float bPri = pB->GetPriority();
37 float aY = viewA.GetScreenBounds().GetMax().GetY();
38 float bY = viewB.GetScreenBounds().GetMax().GetY();
41 return viewA.GetScreenBounds().GetMax().GetX() > viewB.GetScreenBounds().GetMax().GetX();
52 static const float DefaultTargetAlpha = 1.0f;
53 static const double DefaultTextMinOpaqueAltitude = 100.0;
54 static const float DefaultTransitionSpeed = 5;
55 static const int MaxOcclusionChecksPerFrame = 750;
60 static const float OtherSideOfWorldDotProdThreshold;
75 void SetTargetAlpha(
const float targetAlpha);
76 float GetTargetAlpha()
const;
78 void SetTextMinOpaqueAltitude(
double minOpaqueAltitutde);
79 double GetTextMinOpaqueAltitude()
const;
81 void SetTransitionSpeed(
float transitionSpeed);
82 float GetTransitionSpeed()
const;
84 float GetBaseScale()
const;
85 void SetBaseScale(
float baseScale);
93 typedef std::vector<PlaceNameModel*> TPlaceNameModels;
94 const TPlaceNameModels& GetSortedPlaceNamesInFrustum()
const {
return m_sortedPlaceNameModels; }
const
96 void GetRenderablesInScene(Eegeo::Rendering::TTextRenderables& out_Renderables)
const;
99 typedef std::vector<PlaceNameModel*> TPlaceNameModelVec;
107 double m_minOpaqueAltitude;
108 float m_targetTextAlpha;
110 float m_transitionSpeed;
113 int m_nextCheckIndex;
114 int m_nextCheckInnerIndex;
115 TPlaceNameModelVec m_sortedPlaceNameModels;
116 TPlaceNameModelVec m_placeNamesUpdatedThisFrame;
121 void UpdateTransitions(
float deltaTime);
122 void PrunePlaceNames();
123 void RestartOcclusionChecking();
125 void ApplyCategoryStyleToView(
PlaceNameView& view,
const std::string& categoryKey,
const std::map<std::string, Resources::PlaceNames::PlaceNameCategoryStyle>& styleMap);
129 static int GetPriorityForCategory(PlaceNameCategory category);