4 #include "PropResource.h"
7 #include "InteriorIdFloorIdPair.h"
8 #include "PropModelRepository.h"
9 #include "InteriorsInstanceRepository.h"
10 #include <unordered_map>
18 typedef std::vector<IProp::IdType> PropConsumerSet;
22 std::string m_propUrl;
23 std::unordered_map<InteriorIdFloorIdPair, PropConsumerSet, InteriorIdFloorIdPairHash> m_floorsToConsumers;
39 void AssignGeometryForProp(
const IProp& prop);
40 void AssignGeometryForProps(
const std::vector<const IProp*>& props);
42 void RemoveGeometryForProp(
const IProp& prop);
43 void RemoveGeometryForProps(
const std::vector<const IProp*>& props);
45 PropGeometry& GetGeometryForProp(
const IProp::IdType propId);
56 std::unordered_map<std::string, InFlightPropRequest> m_inflightPropRequests;
57 std::unordered_map<IProp::IdType, PropGeometry> m_propsToGeometry;
61 typedef std::unordered_map<Rendering::Renderables::InstancedInteriorFloorRenderable*, std::vector<int>> RenderableToTransformIndexRemappingTable;
62 typedef std::unordered_map<Rendering::Renderables::InstancedInteriorFloorRenderable*, std::vector<InteriorsInstanceRepository::InstanceData>> RenderableToRemappedInstanceDataTable;
66 void HandleLoadPropResource(
const std::string& propResourceUrl);
74 bool TryGetExistingGeometryForRenderable(
const InteriorId& interiorId,
int floorId,
const std::string& geometryId,
PropGeometry& outGeometry);
76 void LoadGeometryForProp(
const std::string& propGeometryId,
const IProp& prop);
84 RenderableToTransformIndexRemappingTable CalculateIndexRemappingForRenderablesAfterRemovals(
const std::vector<const IProp*>& propsToRemove);
86 RenderableToTransformIndexRemappingTable CalculateReferencedPropIndicesAfterRemovals(
const std::vector<const IProp*>& propsToRemove);
88 void DeleteUnreferencedRenderablesAndUpdateInstanceRepository(
const RenderableToTransformIndexRemappingTable& renderableTransformIndexRemappings,
const RenderableToRemappedInstanceDataTable& modifiedInstanceData);
90 RenderableToRemappedInstanceDataTable UpdateGeometryRecordsForRemapping(
const RenderableToTransformIndexRemappingTable& renderableTransformIndexRemappings);
92 void RemoveGeometryRecordsForDeletedProps(
const std::vector<const IProp*>& props);