[440] | 1 | #ifndef _ViewCellsManager_H__
|
---|
| 2 | #define _ViewCellsManager_H__
|
---|
| 3 |
|
---|
| 4 | #include "Ray.h"
|
---|
[2105] | 5 | #include "SimpleRay.h"
|
---|
[440] | 6 | #include "VssRay.h"
|
---|
| 7 | #include "Containers.h"
|
---|
[475] | 8 | #include "ViewCell.h"
|
---|
[440] | 9 |
|
---|
[2332] | 10 | #define TEST_PACKETS 0
|
---|
[2176] | 11 |
|
---|
[860] | 12 | namespace GtpVisibilityPreprocessor {
|
---|
| 13 |
|
---|
[440] | 14 | class ViewCell;
|
---|
| 15 | class Intersectable;
|
---|
| 16 | class RenderSimulator;
|
---|
[480] | 17 | class Renderer;
|
---|
[440] | 18 | class Mesh;
|
---|
| 19 | struct Triangle3;
|
---|
| 20 | class SimulationStatistics;
|
---|
| 21 | class BspTree;
|
---|
| 22 | class KdTree;
|
---|
[1006] | 23 | class VspOspTree;
|
---|
[440] | 24 | class VspBspTree;
|
---|
| 25 | class KdNode;
|
---|
| 26 | class KdLeaf;
|
---|
| 27 | class AxisAlignedBox3;
|
---|
[448] | 28 | class BspLeaf;
|
---|
[475] | 29 | class ViewCellsStatistics;
|
---|
[482] | 30 | class Exporter;
|
---|
[532] | 31 | class Beam;
|
---|
[570] | 32 | class Preprocessor;
|
---|
[580] | 33 | class ViewCellsTree;
|
---|
| 34 | class MergeCandidate;
|
---|
[931] | 35 | class BoundingBoxConverter;
|
---|
[1021] | 36 | class VspTree;
|
---|
| 37 | class OspTree;
|
---|
| 38 | class VspNode;
|
---|
[1027] | 39 | class HierarchyManager;
|
---|
[1259] | 40 | class BvHierarchy;
|
---|
[1264] | 41 | class ViewCellsTree;
|
---|
[1786] | 42 | class ViewCell;
|
---|
[1903] | 43 | class MixtureDistribution;
|
---|
[1047] | 44 | struct AxisAlignedPlane;
|
---|
[475] | 45 | struct BspRay;
|
---|
[2116] | 46 | class BspTree;
|
---|
[475] | 47 |
|
---|
[1903] | 48 |
|
---|
[2015] | 49 |
|
---|
[2116] | 50 | struct PvsFilterStatistics
|
---|
| 51 | {
|
---|
[1773] | 52 | PvsFilterStatistics():
|
---|
[2116] | 53 | mAvgFilterRadius(0.0f), mLocalFilterCount(0), mGlobalFilterCount(0) {}
|
---|
| 54 |
|
---|
[1761] | 55 | float mAvgFilterRadius;
|
---|
| 56 | int mLocalFilterCount;
|
---|
| 57 | int mGlobalFilterCount;
|
---|
[2116] | 58 | };
|
---|
| 59 |
|
---|
[1145] | 60 | /** Probably Visible Set
|
---|
| 61 | */
|
---|
[697] | 62 | class PrVs
|
---|
| 63 | {
|
---|
| 64 | public:
|
---|
[2116] | 65 | /// root of view cells tree
|
---|
| 66 | ViewCell *mViewCell;
|
---|
| 67 | // input parameter is the render budget for the PrVs
|
---|
| 68 | float mRenderBudget;
|
---|
[677] | 69 | };
|
---|
| 70 |
|
---|
[1786] | 71 |
|
---|
| 72 | class LocalMergeNode
|
---|
| 73 | {
|
---|
| 74 | public:
|
---|
| 75 | virtual ~LocalMergeNode() {};
|
---|
| 76 | virtual bool IsLeaf() const = 0;
|
---|
| 77 | };
|
---|
| 78 |
|
---|
[2017] | 79 | typedef pair<ViewCell *, SimpleRayContainer> ViewCellPoints;
|
---|
[1786] | 80 |
|
---|
[850] | 81 | /** Manages different higher order operations on the view cells.
|
---|
[440] | 82 | */
|
---|
| 83 | class ViewCellsManager
|
---|
| 84 | {
|
---|
| 85 | public:
|
---|
[1983] | 86 |
|
---|
[2116] | 87 | struct PerViewCellStat
|
---|
| 88 | {
|
---|
| 89 | float pvsSize;
|
---|
| 90 | float relPvsIncrease;
|
---|
[1983] | 91 | };
|
---|
| 92 |
|
---|
[2116] | 93 | struct SamplesStatistics
|
---|
[728] | 94 | {
|
---|
[2116] | 95 | int mRays;
|
---|
| 96 | int mViewCells;
|
---|
| 97 | int mContributingRays;
|
---|
| 98 | int mPvsContributions;
|
---|
| 99 | void Reset()
|
---|
| 100 | {
|
---|
| 101 | mRays = 0;
|
---|
| 102 | mViewCells = 0;
|
---|
| 103 | mContributingRays = 0;
|
---|
| 104 | mPvsContributions = 0;
|
---|
| 105 | };
|
---|
| 106 | };
|
---|
[1974] | 107 |
|
---|
[2116] | 108 | struct PvsStatistics
|
---|
| 109 | {
|
---|
| 110 | float minPvs;
|
---|
| 111 | float maxPvs;
|
---|
| 112 | float avgPvs;
|
---|
[2205] | 113 | float renderCost;
|
---|
[2116] | 114 | float avgPvsEntries;
|
---|
| 115 |
|
---|
| 116 | float avgFilteredPvs;
|
---|
| 117 | float avgFilteredPvsEntries;
|
---|
| 118 |
|
---|
| 119 | float avgFilterContribution;
|
---|
| 120 | float avgFilterRadius;
|
---|
| 121 | float avgFilterRatio;
|
---|
| 122 | float avgRelPvsIncrease;
|
---|
| 123 | float devRelPvsIncrease;
|
---|
| 124 | int viewcells;
|
---|
[2224] | 125 |
|
---|
| 126 | float mem;
|
---|
[2227] | 127 | float renderCostRatio;
|
---|
[1545] | 128 | };
|
---|
[1942] | 129 |
|
---|
[728] | 130 | /// view cell container types
|
---|
[1021] | 131 | enum {BSP, KD, VSP_KD, VSP_BSP, VSP_OSP};
|
---|
[466] | 132 |
|
---|
[931] | 133 | /// render cost evaluation type
|
---|
[728] | 134 | enum {PER_OBJECT, PER_TRIANGLE};
|
---|
| 135 |
|
---|
[1545] | 136 | friend class X3dViewCellsParseHandlers;
|
---|
[1709] | 137 |
|
---|
[1004] | 138 | /** Default constructor.
|
---|
[440] | 139 | */
|
---|
[1264] | 140 | ViewCellsManager(ViewCellsTree *viewCellsTree);
|
---|
[2539] | 141 | /** Destructor.
|
---|
| 142 | */
|
---|
[462] | 143 | virtual ~ViewCellsManager();
|
---|
[527] | 144 | /** Constructs view cells container taking a preprocessor
|
---|
[570] | 145 | @returns the output rays (if not null)
|
---|
| 146 | */
|
---|
| 147 | int Construct(Preprocessor *preprocessor, VssRayContainer *outRays = NULL);
|
---|
[527] | 148 |
|
---|
[440] | 149 | /** Constructs view cell container with a given number of samples.
|
---|
| 150 | */
|
---|
[1709] | 151 | virtual int ConstructSubdivision(const ObjectContainer &objects,
|
---|
| 152 | const VssRayContainer &rays) = 0;
|
---|
[440] | 153 |
|
---|
[441] | 154 | /** Computes sample contributions of the rays to the view cells PVS.
|
---|
| 155 |
|
---|
| 156 | @param rays bundle of rays used to find intersections with view cells and
|
---|
| 157 | adding the contribution
|
---|
[563] | 158 | @param addRays true if rays should be added to the PVSs of the viewcells they
|
---|
[574] | 159 | intersect
|
---|
| 160 | @param storeViewCells true if view cells should be stored in the ray
|
---|
| 161 | */
|
---|
[2332] | 162 | virtual float ComputeSampleContributions(const VssRayContainer &rays,
|
---|
| 163 | const bool addContributions,
|
---|
| 164 | const bool storeViewCells,
|
---|
| 165 | const bool useHitObject = false);
|
---|
[440] | 166 |
|
---|
[475] | 167 | /** Computes sample contribution of a simgle ray to the view cells PVS.
|
---|
| 168 | @param ray finds intersections with view cells and holds the contribution
|
---|
[1570] | 169 | @param addSample if sample should be added to the pvs
|
---|
| 170 |
|
---|
[475] | 171 | @returns number of sample contributions
|
---|
| 172 | */
|
---|
[1159] | 173 | virtual float ComputeSampleContribution(VssRay &ray,
|
---|
[1981] | 174 | const bool addContributions,
|
---|
[1990] | 175 | const bool storeViewCells,
|
---|
| 176 | const bool useHitObject = false);
|
---|
[1977] | 177 | /** Compute sample contribution only for current view cell.
|
---|
| 178 | */
|
---|
| 179 | virtual float ComputeSampleContribution(VssRay &ray,
|
---|
[1981] | 180 | const bool addContributions,
|
---|
[1990] | 181 | ViewCell *currentViewCell,
|
---|
| 182 | const bool useHitObject = false);
|
---|
[452] | 183 | /** Prints out statistics of the view cells.
|
---|
| 184 | */
|
---|
[2176] | 185 | virtual void PrintStatistics(std::ostream &s) const;
|
---|
[440] | 186 | /** Post processes view cells givemŽa number of rays.
|
---|
| 187 | */
|
---|
[475] | 188 | virtual int PostProcess(const ObjectContainer &objects,
|
---|
| 189 | const VssRayContainer &rays) = 0;
|
---|
[440] | 190 | /** Show visualization of the view cells.
|
---|
| 191 | */
|
---|
| 192 | virtual void Visualize(const ObjectContainer &objects,
|
---|
[466] | 193 | const VssRayContainer &sampleRays) = 0;
|
---|
[1982] | 194 | /** collect objects intersecting a given spatial box.
|
---|
| 195 | */
|
---|
| 196 | virtual void CollectObjects(const AxisAlignedBox3 &box, ObjectContainer &objects);
|
---|
[440] | 197 | /** type of the view cell container.
|
---|
| 198 | */
|
---|
| 199 | virtual int GetType() const = 0;
|
---|
[463] | 200 | /** Load the input viewcells. The input viewcells should be given as a collection
|
---|
[1545] | 201 | of meshes. Each mesh is assume to form a bounded polyhedron
|
---|
| 202 | defining the interior of the viewcell. The view cells manager
|
---|
| 203 | is responsible for building a hierarchy over these view cells.
|
---|
[463] | 204 |
|
---|
| 205 | @param filename file to load
|
---|
| 206 | @return true on success
|
---|
[1982] | 207 | */
|
---|
| 208 | virtual bool LoadViewCellsGeometry(const string filename, const bool extrudeBaseTriangle);
|
---|
[440] | 209 | /** Merges two view cells.
|
---|
| 210 | @note the piercing rays of the front and back will be ordered
|
---|
| 211 | @returns new view cell based on the merging.
|
---|
| 212 | */
|
---|
[582] | 213 | ViewCellInterior *MergeViewCells(ViewCell *front, ViewCell *back) const;
|
---|
| 214 | /** Merges a container of view cells.
|
---|
| 215 | @returns new view cell based on the merging.
|
---|
| 216 | */
|
---|
| 217 | ViewCellInterior *MergeViewCells(ViewCellContainer &children) const;
|
---|
[1545] | 218 | /** Generates view cell of the type specified by this manager
|
---|
[440] | 219 | */
|
---|
[580] | 220 | virtual ViewCell *GenerateViewCell(Mesh *mesh = NULL) const = 0;
|
---|
[1545] | 221 | /** Constructs view cell from base triangle.
|
---|
| 222 | The view cell is extruded along the normal vector.
|
---|
| 223 | @param the base triangle
|
---|
| 224 | @param the height of the newly created view cell
|
---|
[440] | 225 | */
|
---|
[1545] | 226 | ViewCell *ExtrudeViewCell(const Triangle3 &baseTri, const float height) const;
|
---|
[2539] | 227 | /** Returns the intersectable that was hit by the ray.
|
---|
| 228 | */
|
---|
[1982] | 229 | virtual Intersectable *GetIntersectable(const VssRay &ray, const bool isTermination) const;
|
---|
[440] | 230 | /** Sets maximal number of samples used for the
|
---|
| 231 | construction of the view cells.
|
---|
| 232 | */
|
---|
| 233 | void SetVisualizationSamples(const int visSamples);
|
---|
[574] | 234 | /** Sets maximal number of samples used for the construction of the view cells.
|
---|
[440] | 235 | */
|
---|
| 236 | void SetConstructionSamples(const int constructionSamples);
|
---|
[574] | 237 | /** Sets maximal number of samples used for the visualization of the view cells.
|
---|
| 238 | */
|
---|
| 239 | void SetInitialSamples(const int initialSamples);
|
---|
[440] | 240 | /** Sets maximal number of samples used for the post processing of the view cells.
|
---|
| 241 | */
|
---|
| 242 | void SetPostProcessSamples(const int postProcessingSamples);
|
---|
| 243 | /** See set.
|
---|
| 244 | */
|
---|
| 245 | int GetVisualizationSamples() const;
|
---|
| 246 | /** See set.
|
---|
| 247 | */
|
---|
| 248 | int GetConstructionSamples() const;
|
---|
| 249 | /** See set.
|
---|
| 250 | */
|
---|
| 251 | int GetPostProcessSamples() const;
|
---|
[1002] | 252 | /** Returns true if view cells are already constructed.
|
---|
[440] | 253 | */
|
---|
| 254 | virtual bool ViewCellsConstructed() const = 0;
|
---|
[477] | 255 | /** cast line segment to get a list of unique viewcells which are intersected
|
---|
| 256 | by this line segment
|
---|
| 257 | */
|
---|
[1977] | 258 | virtual int CastLineSegment(const Vector3 &origin,
|
---|
[2539] | 259 | const Vector3 &termination,
|
---|
| 260 | ViewCellContainer &viewcells) = 0;
|
---|
[1977] | 261 | /** Tests if this line segment intersects a particular view cell.
|
---|
| 262 | */
|
---|
| 263 | virtual bool LineSegmentIntersects(const Vector3 &origin,
|
---|
| 264 | const Vector3 &termination,
|
---|
| 265 | ViewCell *viewCell) = 0;
|
---|
[1294] | 266 | /** Returns a stats about the global pvs.
|
---|
| 267 | */
|
---|
[477] | 268 | virtual void GetPvsStatistics(PvsStatistics &stat);
|
---|
[2539] | 269 | /** Returns the probably visible set of the view space filtered pvs.
|
---|
| 270 | */
|
---|
[904] | 271 | virtual void GetPrVS(const Vector3 &viewPoint, PrVs &prvs, const float filterWidth);
|
---|
[2111] | 272 | /** Get a viewcell containing the specified view point.
|
---|
[879] | 273 | @param active if the active or elementary view cell should be returned.
|
---|
[697] | 274 | */
|
---|
[879] | 275 | virtual ViewCell *GetViewCell(const Vector3 &point, const bool active = false) const = 0;
|
---|
[2539] | 276 | /** Returns the view cell with the given index (different from the id).
|
---|
| 277 | */
|
---|
[1982] | 278 | ViewCell *GetViewCell(const int idx) const {return mViewCells[idx];}
|
---|
[2539] | 279 | /** Prints the statistics over the view cell pvss.
|
---|
| 280 | */
|
---|
[2176] | 281 | virtual void PrintPvsStatistics(std::ostream &s);
|
---|
[719] | 282 | /** Updates pvs of the view cell hierarchy if necessary.
|
---|
| 283 | */
|
---|
| 284 | void UpdatePvs();
|
---|
[477] | 285 | /** Returns probability that view point lies in one view cell.
|
---|
| 286 | */
|
---|
| 287 | virtual float GetProbability(ViewCell *viewCell) = 0;
|
---|
| 288 | /** Returns render cost of a single view cell given the render cost of an object.
|
---|
| 289 | */
|
---|
[728] | 290 | float GetRendercost(ViewCell *viewCell) const;
|
---|
[720] | 291 | /** Returns reference to container of loaded / generated view cells.
|
---|
[477] | 292 | */
|
---|
| 293 | ViewCellContainer &GetViewCells();
|
---|
[485] | 294 | /** Helper function used to split ray sets uniformly
|
---|
| 295 | into one that is currently used and the other that
|
---|
| 296 | is saved for later processing.
|
---|
| 297 | @param sourceRays the input ray set
|
---|
| 298 | @param maxSize the maximal number of rays that will be used
|
---|
| 299 | @param usedRays returns the used ray set
|
---|
| 300 | @param savedRays if not null, returns the saved ray set
|
---|
[477] | 301 | */
|
---|
| 302 | void GetRaySets(const VssRayContainer &sourceRays,
|
---|
[485] | 303 | const int maxSize,
|
---|
| 304 | VssRayContainer &usedRays,
|
---|
| 305 | VssRayContainer *savedRays = NULL) const;
|
---|
[480] | 306 | /** Returns accumulated area of all view cells.
|
---|
| 307 | */
|
---|
| 308 | float GetAccVcArea();
|
---|
| 309 | /** Returns area of one view cell.
|
---|
| 310 | */
|
---|
| 311 | virtual float GetArea(ViewCell *viewCell) const;
|
---|
[551] | 312 | /** Returns volume of view cell.
|
---|
[480] | 313 | */
|
---|
| 314 | virtual float GetVolume(ViewCell *viewCell) const;
|
---|
| 315 | /** Sets the current renderer mainly for view cells statistics.
|
---|
| 316 | */
|
---|
| 317 | void SetRenderer(Renderer *renderer);
|
---|
[487] | 318 | /** Computes a (random) view point in the valid view space.
|
---|
| 319 | @returns true if valid view point was found
|
---|
| 320 | */
|
---|
| 321 | virtual bool GetViewPoint(Vector3 &viewPoint) const;
|
---|
[2539] | 322 | /** Returns the current view point given a vector for activating the halton sequence.
|
---|
| 323 | */
|
---|
[1982] | 324 | virtual bool GetViewPoint(Vector3 &viewPoint, const Vector3 ¶ms) const;
|
---|
[490] | 325 | /** Returns true if this view point is in the valid view space.
|
---|
| 326 | */
|
---|
| 327 | virtual bool ViewPointValid(const Vector3 &viewPoint) const;
|
---|
[487] | 328 | /** Sets a view space boundary.
|
---|
| 329 | */
|
---|
| 330 | void SetViewSpaceBox(const AxisAlignedBox3 &box);
|
---|
[2539] | 331 | /** Returns the boundaries of the view space.
|
---|
| 332 | */
|
---|
[519] | 333 | AxisAlignedBox3 GetViewSpaceBox() const;
|
---|
[503] | 334 | /** Creates mesh for this view cell.
|
---|
| 335 | */
|
---|
| 336 | virtual void CreateMesh(ViewCell *vc) = NULL;
|
---|
[508] | 337 | /** Writes view cells to disc.
|
---|
| 338 | */
|
---|
[1027] | 339 | virtual bool ExportViewCells(const string filename,
|
---|
| 340 | const bool exportPvs,
|
---|
| 341 | const ObjectContainer &objects);
|
---|
[532] | 342 | /** Casts beam to collect view cells.
|
---|
| 343 | */
|
---|
| 344 | virtual int CastBeam(Beam &beam);
|
---|
[547] | 345 | /** Checks if view cell is considered as valid.
|
---|
| 346 | */
|
---|
[561] | 347 | virtual bool CheckValidity(ViewCell *vc,
|
---|
[562] | 348 | int minPvsSize,
|
---|
| 349 | int maxPvsSize) const;
|
---|
[2539] | 350 | /** Resort pvss after a pass of the algorithm.
|
---|
| 351 | */
|
---|
[2117] | 352 | void SortViewCellPvs();
|
---|
[2539] | 353 | /** Map the ray intersection objects from triangles to high level objects.
|
---|
| 354 | */
|
---|
[2117] | 355 | void DeterminePvsObjects(VssRayContainer &rays,
|
---|
| 356 | const bool useHitObjects = false);
|
---|
[562] | 357 | /** Sets validity of view cell
|
---|
| 358 | */
|
---|
| 359 | virtual void SetValidity(ViewCell *vc,
|
---|
| 360 | int minPvsSize,
|
---|
| 361 | int maxPvsSize) const;
|
---|
[710] | 362 | /** sets validy of all viewcells
|
---|
| 363 | */
|
---|
[2539] | 364 | virtual void SetValidity(int minPvsSize, int maxPvsSize) const;
|
---|
[2117] | 365 | /** Set valid viewcells in the range of pvs. sorts the viewcells
|
---|
| 366 | according to the pvs and then pickups those in the ranges
|
---|
| 367 | */
|
---|
[710] | 368 | void SetValidityPercentage(const float minValid, const float maxValid);
|
---|
[1545] | 369 | /** Returns number of valid view cells.
|
---|
| 370 | */
|
---|
[609] | 371 | int CountValidViewcells() const;
|
---|
[547] | 372 | /** Returns maximal allowed pvs size.
|
---|
| 373 | */
|
---|
| 374 | int GetMaxPvsSize() const;
|
---|
[562] | 375 | /** Returns maximal allowed pvs size.
|
---|
| 376 | */
|
---|
| 377 | int GetMinPvsSize() const;
|
---|
[561] | 378 | /** Returns maximal ratio. i.e., currentPVs / maxPvs,
|
---|
| 379 | where pvs is still considered valid.
|
---|
| 380 | */
|
---|
| 381 | float GetMaxPvsRatio() const;
|
---|
[547] | 382 | /** Exports view cell geometry.
|
---|
| 383 | */
|
---|
[2117] | 384 | virtual void ExportViewCellGeometry(Exporter *exporter,
|
---|
| 385 | ViewCell *vc,
|
---|
| 386 | const AxisAlignedBox3 *box,
|
---|
| 387 | const AxisAlignedPlane *clipPlane = NULL
|
---|
| 388 | ) const = 0;
|
---|
[860] | 389 | /** Brings the view cells into their final state, computes meshes and volume.
|
---|
| 390 | */
|
---|
[551] | 391 | virtual void FinalizeViewCells(const bool createMesh);
|
---|
[579] | 392 | /** Evaluates statistics values on view cells.
|
---|
| 393 | */
|
---|
[580] | 394 | void EvaluateRenderStatistics(float &totalRenderCost,
|
---|
| 395 | float &expectedRenderCost,
|
---|
| 396 | float &deviation,
|
---|
| 397 | float &variance,
|
---|
[1709] | 398 | float &totalPvs,
|
---|
[580] | 399 | float &avgRenderCost);
|
---|
| 400 | /** Returns hierarchy of the view cells.
|
---|
| 401 | */
|
---|
| 402 | ViewCellsTree *GetViewCellsTree();
|
---|
[1545] | 403 | /** Collect candidates for the view cell merge.
|
---|
| 404 | */
|
---|
[581] | 405 | virtual void CollectMergeCandidates(const VssRayContainer &rays,
|
---|
[1022] | 406 | vector<MergeCandidate> &candidates);
|
---|
[1294] | 407 | /** Collects n view cells and stores it as the active view cells.
|
---|
| 408 | */
|
---|
[610] | 409 | void CollectViewCells(const int n);
|
---|
[1686] | 410 | /** Sets current view cells set to active,
|
---|
| 411 | i.e., the sampling is done in this view cell set.
|
---|
[660] | 412 | */
|
---|
| 413 | void SetViewCellsActive();
|
---|
[1145] | 414 | /** Evaluates render cost statistics of current view cell hierarchy.
|
---|
[660] | 415 | */
|
---|
[1178] | 416 | virtual void EvalViewCellPartition();
|
---|
[728] | 417 | /** Sets maximal size of a view cell filter.
|
---|
| 418 | */
|
---|
| 419 | void SetMaxFilterSize(const int size);
|
---|
[840] | 420 | /** Returns maximal filter size.
|
---|
| 421 | */
|
---|
| 422 | int GetMaxFilterSize() const;
|
---|
[1686] | 423 | /** Deletes interior nodes from the tree which have negative
|
---|
| 424 | merge cost set (local merge).
|
---|
[840] | 425 | */
|
---|
| 426 | void DeleteLocalMergeTree(ViewCell *vc) const;
|
---|
[728] | 427 | /** Evaluautes histogram for a given number of view cells.
|
---|
| 428 | */
|
---|
| 429 | void EvalViewCellHistogram(const string filename, const int nViewCells);
|
---|
[735] | 430 | /** Evaluautes histogram for a given number of view cells.
|
---|
| 431 | */
|
---|
[2117] | 432 | void EvalViewCellHistogramForPvsSize(const string filename,
|
---|
| 433 | const int nViewCells);
|
---|
[2539] | 434 | /** Evaluautes histogram for a given vector of view cells.
|
---|
| 435 | */
|
---|
[1919] | 436 | void EvalViewCellHistogramForPvsSize(const string filename,
|
---|
| 437 | ViewCellContainer &viewCells);
|
---|
[2332] | 438 | float ComputeRenderCost(const int tri, const int obj); //const
|
---|
[2569] | 439 | /** Sets pvs size of a view cell as a scalar. Used when storing pvs only in the leaves
|
---|
[1002] | 440 | of the hierarchy.
|
---|
| 441 | */
|
---|
[2117] | 442 | void UpdateScalarPvsSize(ViewCell *vc,
|
---|
| 443 | const float pvsCost,
|
---|
| 444 | const int entriesInPvs) const;
|
---|
[2569] | 445 | /** Sets render cost of a view cell as a scalar.
|
---|
| 446 | */
|
---|
| 447 | void UpdateScalarPvsCost(ViewCell *vc, const float pvsCost) const;
|
---|
| 448 |
|
---|
[870] | 449 | /** Returns bounding box of a view cell.
|
---|
| 450 | */
|
---|
| 451 | AxisAlignedBox3 GetViewCellBox(ViewCell *vc);
|
---|
[840] | 452 | /** Exports bounding boxes of objects to file.
|
---|
| 453 | */
|
---|
[2117] | 454 | bool ExportBoundingBoxes(const string filename,
|
---|
| 455 | const ObjectContainer &objects) const;
|
---|
[850] | 456 | /** Load the bounding boxes into the container.
|
---|
| 457 | */
|
---|
[2117] | 458 | bool LoadBoundingBoxes(const string filename,
|
---|
| 459 | IndexedBoundingBoxContainer &boxes) const;
|
---|
[1002] | 460 | /** Returns true if pvs should be exported together with the view cells.
|
---|
| 461 | */
|
---|
| 462 | bool GetExportPvs() const;
|
---|
[1786] | 463 | /** Efficiently merges the view cells in the container.
|
---|
| 464 | */
|
---|
[1787] | 465 | void MergeViewCellsRecursivly(ObjectPvs &pvs,
|
---|
| 466 | const ViewCellContainer &viewCells) const;
|
---|
[2539] | 467 | /** Compresses the view cells.
|
---|
[2117] | 468 | */
|
---|
[1845] | 469 | virtual void CompressViewCells();
|
---|
[2539] | 470 | /** Returns view cell with the given id.
|
---|
| 471 | */
|
---|
[2017] | 472 | ViewCell *GetViewCellById(const int id);
|
---|
| 473 | /** Returns number of view cells.
|
---|
| 474 | */
|
---|
[1982] | 475 | int GetNumViewCells() const;
|
---|
| 476 |
|
---|
[2017] | 477 | bool GenerateRandomViewCells(ViewCellContainer &viewCells,
|
---|
| 478 | const int numViewCells);
|
---|
| 479 |
|
---|
| 480 | bool GenerateRandomViewCells(vector<ViewCellPoints *> &viewCells,
|
---|
| 481 | const int nViewCells,
|
---|
| 482 | const int nViewPoints);
|
---|
| 483 |
|
---|
| 484 |
|
---|
| 485 | bool GenerateViewPoints(ViewCell *viewCell,
|
---|
| 486 | const int numViewPoints,
|
---|
| 487 | SimpleRayContainer &viewPoints);
|
---|
| 488 |
|
---|
| 489 | bool ImportRandomViewCells(const string &filename,
|
---|
| 490 | vector<ViewCellPoints *> &viewCells);
|
---|
| 491 |
|
---|
[2048] | 492 | bool ImportRandomViewCells(const string &filename);
|
---|
[2017] | 493 |
|
---|
| 494 | bool ExportRandomViewCells(const string &filename,
|
---|
| 495 | const vector<ViewCellPoints *> &viewCells);
|
---|
| 496 |
|
---|
[2048] | 497 | bool ExportRandomViewCells(const string &filename);
|
---|
| 498 |
|
---|
[2017] | 499 | bool GenerateViewPoint(ViewCell *viewCell, SimpleRay &ray);
|
---|
| 500 |
|
---|
| 501 | bool IsValidViewSpace(ViewCell *vc);
|
---|
| 502 |
|
---|
[2048] | 503 |
|
---|
[2017] | 504 | //////////////
|
---|
[1582] | 505 | // static members
|
---|
| 506 |
|
---|
| 507 | /** Loads view cells from file. The view cells manager is created with
|
---|
| 508 | respect to the loaded view cells.
|
---|
[870] | 509 |
|
---|
[1582] | 510 | @param filename the filename of the view cells
|
---|
| 511 | @param objects the scene objects
|
---|
[2115] | 512 | @param finalizeViewCells if the view cells should be post processed, i.e.,
|
---|
[2048] | 513 | a mesh is created representing the geometry
|
---|
[1582] | 514 | @param bconverter a conversion routine working with the similarities of bounding
|
---|
[2048] | 515 | boxes: if there is a certain similarity of overlap between
|
---|
| 516 | bounding boxes, two tested candidate objects are considered
|
---|
| 517 | to be the same objects
|
---|
[1582] | 518 | @returns the view cells manager if loading was successful, false otherwise
|
---|
| 519 | */
|
---|
| 520 | static ViewCellsManager *LoadViewCells(const string &filename,
|
---|
[2113] | 521 | ObjectContainer &pvsObjects,
|
---|
| 522 | ObjectContainer &preprocessorObjects,
|
---|
[1676] | 523 | bool finalizeViewCells = false,
|
---|
[1582] | 524 | BoundingBoxConverter *bconverter = NULL);
|
---|
[870] | 525 |
|
---|
[2542] | 526 | /** Convenience function assuming that there are no preprocessor objects.
|
---|
| 527 | */
|
---|
[2115] | 528 | static ViewCellsManager *LoadViewCells(const string &filename,
|
---|
| 529 | ObjectContainer &pvsObjects,
|
---|
| 530 | bool finalizeViewCells = false,
|
---|
| 531 | BoundingBoxConverter *bconverter = NULL);
|
---|
[904] | 532 |
|
---|
[2542] | 533 |
|
---|
[2113] | 534 | ///////////////////////
|
---|
[2542] | 535 | //-- visiblity filter options
|
---|
[1294] | 536 |
|
---|
[931] | 537 | // TODO: write own visibiltiy filter class
|
---|
[2048] | 538 | void ApplyFilter(KdTree *kdTree,
|
---|
| 539 | const float viewSpaceFilterSize,
|
---|
| 540 | const float spatialFilterSize);
|
---|
[904] | 541 |
|
---|
[2048] | 542 | // new adaptive version of the filter
|
---|
| 543 | PvsFilterStatistics ApplyFilter2(ViewCell *viewCell,
|
---|
| 544 | const bool useViewSpaceFilter,
|
---|
| 545 | const float filterSize,
|
---|
| 546 | ObjectPvs &pvs,
|
---|
| 547 | vector<AxisAlignedBox3> *filteredBoxes = NULL);
|
---|
[1715] | 548 |
|
---|
[931] | 549 | void ApplySpatialFilter(KdTree *kdTree,
|
---|
| 550 | const float spatialFilterSize,
|
---|
| 551 | ObjectPvs &pvs);
|
---|
[480] | 552 |
|
---|
[931] | 553 | void ApplyFilter(ViewCell *viewCell,
|
---|
| 554 | KdTree *kdTree,
|
---|
| 555 | const float viewSpaceFilterSize,
|
---|
| 556 | const float spatialFilterSize,
|
---|
| 557 | ObjectPvs &pvs);
|
---|
| 558 |
|
---|
| 559 | float GetFilterWidth();
|
---|
| 560 |
|
---|
| 561 | float GetAbsFilterWidth();
|
---|
[697] | 562 | /** Returns the bounding box of filter width.
|
---|
| 563 | */
|
---|
[2117] | 564 | AxisAlignedBox3 GetFilterBBox(const Vector3 &viewPoint,
|
---|
| 565 | const float width) const;
|
---|
[609] | 566 |
|
---|
[2199] | 567 |
|
---|
| 568 |
|
---|
[1294] | 569 | //////////////////////////////////////////////////////////////////
|
---|
[979] | 570 |
|
---|
[2048] | 571 |
|
---|
[1155] | 572 | /** If true, the kd nodes are stored instead of the object pvs.
|
---|
| 573 | */
|
---|
| 574 | void SetStoreKdPvs(const bool storeKdPvs);
|
---|
| 575 |
|
---|
| 576 | /** Returns true if the kd nodes are stored instead of the object pvs.
|
---|
| 577 | **/
|
---|
| 578 | bool GetStoreKdPVs() const;
|
---|
| 579 |
|
---|
[1570] | 580 | /** Exports single view cells for visualization.
|
---|
| 581 | @param objects the scene objects
|
---|
| 582 | @param limit the maximal number of output view cells
|
---|
| 583 | @param sortViewCells if the view cells should be sorted by pvs size
|
---|
| 584 | @param exportPvs if the pvs should also be exported
|
---|
| 585 | @param exportRays if sample rays should be exported as well
|
---|
[1580] | 586 | @param maxRays maximum number of rays to export
|
---|
| 587 | @param prefix the prefix for the output file
|
---|
[1570] | 588 | @param visRays additional rays
|
---|
| 589 | */
|
---|
[1686] | 590 | virtual void ExportSingleViewCells(const ObjectContainer &objects,
|
---|
| 591 | const int maxViewCells,
|
---|
| 592 | const bool sortViewCells,
|
---|
| 593 | const bool exportPvs,
|
---|
| 594 | const bool exportRays,
|
---|
| 595 | const int maxRays,
|
---|
[2394] | 596 | const string &prefix,
|
---|
[1686] | 597 | VssRayContainer *visRays = NULL) = NULL;
|
---|
[1570] | 598 |
|
---|
[1932] | 599 |
|
---|
[2048] | 600 | void ResetPvs();
|
---|
[1580] | 601 |
|
---|
[1932] | 602 | Preprocessor *GetPreprocessor() const {
|
---|
| 603 | return mPreprocessor;
|
---|
| 604 | }
|
---|
[1580] | 605 |
|
---|
[1932] | 606 | void SetPreprocessor(Preprocessor *p) {
|
---|
| 607 | mPreprocessor = p;
|
---|
| 608 | }
|
---|
[1608] | 609 |
|
---|
[2048] | 610 | vector<ViewCellPoints *> *GetViewCellPoints()
|
---|
| 611 | {
|
---|
| 612 | return &mViewCellPoints;
|
---|
| 613 | }
|
---|
| 614 |
|
---|
[1932] | 615 | void UpdatePvsForEvaluation();
|
---|
| 616 |
|
---|
[931] | 617 | protected:
|
---|
[1145] | 618 |
|
---|
[1932] | 619 | void ComputeViewCellContribution(ViewCell *viewCell,
|
---|
| 620 | VssRay &ray,
|
---|
| 621 | Intersectable *obj,
|
---|
| 622 | const Vector3 &pt,
|
---|
| 623 | const bool addRays);
|
---|
| 624 |
|
---|
[1787] | 625 | void MergeViewCellsRecursivly(ObjectPvs &pvs,
|
---|
| 626 | const ViewCellContainer &viewCells,
|
---|
| 627 | const int leftIdx,
|
---|
| 628 | const int rightIdx) const;
|
---|
[697] | 629 | /** Intersects box with the tree and returns the number of intersected boxes.
|
---|
[2539] | 630 | @returns number of view cells found
|
---|
[697] | 631 | */
|
---|
[710] | 632 | virtual int ComputeBoxIntersections(const AxisAlignedBox3 &box,
|
---|
| 633 | ViewCellContainer &viewCells) const;
|
---|
[880] | 634 | /** Tests the visibility filter functionality.
|
---|
| 635 | */
|
---|
[697] | 636 | virtual void TestFilter(const ObjectContainer &objects) {};
|
---|
[931] | 637 | /** If the view cells tree was already constructed or not.
|
---|
[581] | 638 | */
|
---|
| 639 | bool ViewCellsTreeConstructed() const;
|
---|
[1294] | 640 | /** Requests preprocessor to cast samplesPerPass samples of a specific type.
|
---|
| 641 | */
|
---|
[574] | 642 | int CastPassSamples(const int samplesPerPass,
|
---|
[1768] | 643 | const vector<int> &strategies,
|
---|
[574] | 644 | VssRayContainer &vssRays) const;
|
---|
[2542] | 645 | /** cast samples for the purpose of evaluating the view cells solution
|
---|
| 646 | */
|
---|
[2199] | 647 | int CastEvaluationSamples(const int samplesPerPass,
|
---|
| 648 | VssRayContainer &passSamples);// const;
|
---|
[931] | 649 | /** Parse the options from the environment file.
|
---|
| 650 | */
|
---|
[482] | 651 | void ParseEnvironment();
|
---|
[508] | 652 | /** Creates unique view cell ids.
|
---|
| 653 | */
|
---|
| 654 | void CreateUniqueViewCellIds();
|
---|
[551] | 655 | /** Finalizes, i.e., creates mesh, volume, area etc. for the view cell.
|
---|
| 656 | */
|
---|
| 657 | virtual void Finalize(ViewCell *viewCell, const bool createMesh);
|
---|
[480] | 658 | /** Recollects view cells and resets statistics.
|
---|
| 659 | */
|
---|
| 660 | void ResetViewCells();
|
---|
[1707] | 661 | /** Sets this view cell to active.
|
---|
| 662 | */
|
---|
| 663 | void SetViewCellActive(ViewCell *vc) const;
|
---|
[480] | 664 | /** Collects the view cells in the view cell container.
|
---|
| 665 | */
|
---|
| 666 | virtual void CollectViewCells() = 0;
|
---|
[2539] | 667 | /** Evaluates view cells statistics and stores it in mViewCellsStatistics.
|
---|
[479] | 668 | */
|
---|
| 669 | void EvaluateViewCellsStats();
|
---|
[2543] | 670 |
|
---|
[482] | 671 |
|
---|
[2570] | 672 | void UpdateStatsForViewCell(ViewCell *viewCell, Intersectable *obj);
|
---|
| 673 |
|
---|
| 674 |
|
---|
[1416] | 675 | ///////////////////////
|
---|
[482] | 676 | //-- helper functions for view cell visualization
|
---|
| 677 |
|
---|
| 678 | /** Exports the view cell partition.
|
---|
| 679 | */
|
---|
[1686] | 680 | void ExportViewCellsForViz(Exporter *exporter,
|
---|
| 681 | const AxisAlignedBox3 *box,
|
---|
[1760] | 682 | const bool colorCode,
|
---|
[1932] | 683 | const AxisAlignedPlane *clipPlane) const;
|
---|
[482] | 684 | /** Sets exporter color.
|
---|
| 685 | */
|
---|
[1773] | 686 | virtual void ExportColor(Exporter *exporter,
|
---|
| 687 | ViewCell *vc,
|
---|
[2394] | 688 | const int colorCode) const;
|
---|
[1416] | 689 | /** Creates meshes from the view cells.
|
---|
| 690 | */
|
---|
| 691 | void CreateViewCellMeshes();
|
---|
[1932] | 692 | /** Creates clip plane for visualization.
|
---|
[1416] | 693 | */
|
---|
| 694 | void CreateClipPlane();
|
---|
[482] | 695 |
|
---|
[1416] | 696 | AxisAlignedPlane *GetClipPlane();
|
---|
[1932] | 697 |
|
---|
[1551] | 698 | void ExportMergedViewCells(const ObjectContainer &objects);
|
---|
| 699 |
|
---|
[2048] | 700 |
|
---|
[1416] | 701 | ///////////////////////
|
---|
| 702 |
|
---|
[1002] | 703 | /** Returns volume of the view space.
|
---|
| 704 | */
|
---|
[557] | 705 | virtual float GetViewSpaceVolume();
|
---|
[1416] | 706 | /** Prepares the view cells for sampling after loading them from disc.
|
---|
[503] | 707 | */
|
---|
[577] | 708 | virtual void PrepareLoadedViewCells() {};
|
---|
[704] | 709 | /** Constructs local view cell merge hierarchy.
|
---|
| 710 | */
|
---|
| 711 | ViewCell *ConstructLocalMergeTree(ViewCell *currentViewCell,
|
---|
[2539] | 712 | const ViewCellContainer &viewCells);
|
---|
[713] | 713 | /** Constructs local view cell merge hierarchy based solely on similarity with the
|
---|
[2048] | 714 | current viewcell
|
---|
[713] | 715 | */
|
---|
| 716 | ViewCell *ConstructLocalMergeTree2(ViewCell *currentViewCell,
|
---|
| 717 | const ViewCellContainer &viewCells);
|
---|
[860] | 718 | /** Updates pvs of all view cells for statistical evaluation after some more sampling
|
---|
| 719 | */
|
---|
[1168] | 720 | void UpdatePvsForEvaluation(ViewCell *root, ObjectPvs &pvs);
|
---|
[2543] | 721 | /** Export statistics of the view cells tree.
|
---|
| 722 | */
|
---|
[1679] | 723 | virtual void ExportStats(const string &mergeStats);
|
---|
[2547] | 724 | /** Loads view cells in binary mode.
|
---|
| 725 | */
|
---|
| 726 | static ViewCellsManager *LoadViewCellsBinary(const string &filename,
|
---|
[2539] | 727 | ObjectContainer &pvsObjects,
|
---|
| 728 | bool finalizeViewCells,
|
---|
| 729 | BoundingBoxConverter *bconverter);
|
---|
[2543] | 730 | /** This helper function loads the bounding boxes for a binary solution.
|
---|
| 731 | */
|
---|
[2547] | 732 | static void LoadIndexedBoundingBoxesBinary(IN_STREAM &stream,
|
---|
| 733 | IndexedBoundingBoxContainer &iboxes);
|
---|
[2048] | 734 |
|
---|
[2539] | 735 |
|
---|
[752] | 736 |
|
---|
[2543] | 737 | ///////////
|
---|
| 738 | //-- members
|
---|
[2048] | 739 |
|
---|
[2199] | 740 | ofstream mStats;
|
---|
[1145] | 741 | Preprocessor *mPreprocessor;
|
---|
| 742 | /// if bounding boxes should be exported together with the view cells
|
---|
[840] | 743 | bool mExportBboxesForPvs;
|
---|
[1416] | 744 | /// the clip plane for visualization
|
---|
| 745 | AxisAlignedPlane mClipPlaneForViz;
|
---|
| 746 | /// if the visualization is using the clip plane
|
---|
[660] | 747 | bool mUseClipPlaneForViz;
|
---|
[480] | 748 | /// Renders the view cells.
|
---|
| 749 | Renderer *mRenderer;
|
---|
[440] | 750 | /// Loaded view cells
|
---|
[469] | 751 | ViewCellContainer mViewCells;
|
---|
[1416] | 752 | /// the view cell hierarchy (i.e., the logical description of view cells)
|
---|
[580] | 753 | ViewCellsTree *mViewCellsTree;
|
---|
[1414] | 754 |
|
---|
[1773] | 755 | std::vector<int> mStrategies;
|
---|
| 756 |
|
---|
[1416] | 757 | /** if the values in the view cell leaves and the interiors are up to date
|
---|
| 758 | this is meant for lazy storing of the pvs, where only a scalar indicating
|
---|
| 759 | pvs size is stored in interiors and not the pvs itself.
|
---|
| 760 | */
|
---|
[719] | 761 | bool mViewCellPvsIsUpdated;
|
---|
[1002] | 762 |
|
---|
[1416] | 763 | /// maximum number of samples for the view cell construction
|
---|
[440] | 764 | int mConstructionSamples;
|
---|
[574] | 765 | int mSamplesPerPass;
|
---|
| 766 | int mInitialSamples;
|
---|
[440] | 767 | int mPostProcessSamples;
|
---|
| 768 | int mVisualizationSamples;
|
---|
[441] | 769 |
|
---|
[2232] | 770 | int mEvaluationSamples;
|
---|
| 771 |
|
---|
[470] | 772 | float mTotalAreaValid;
|
---|
| 773 | float mTotalArea;
|
---|
[475] | 774 |
|
---|
[547] | 775 | int mMaxPvsSize;
|
---|
[562] | 776 | int mMinPvsSize;
|
---|
[547] | 777 | float mMaxPvsRatio;
|
---|
| 778 |
|
---|
[660] | 779 | int mSamplingType;
|
---|
[722] | 780 | int mEvaluationSamplingType;
|
---|
[600] | 781 | int mNumActiveViewCells;
|
---|
[586] | 782 | bool mCompressViewCells;
|
---|
| 783 |
|
---|
[2048] | 784 | vector<ViewCellPoints *> mViewCellPoints;
|
---|
| 785 |
|
---|
[1002] | 786 | /// holds the current view cell statistics
|
---|
[660] | 787 | ViewCellsStatistics mCurrentViewCellsStats;
|
---|
[2048] | 788 |
|
---|
[487] | 789 | /// the scene bounding box
|
---|
[542] | 790 | AxisAlignedBox3 mViewSpaceBox;
|
---|
[1001] | 791 |
|
---|
[508] | 792 | /// if view cells should be exported
|
---|
| 793 | bool mExportViewCells;
|
---|
[1002] | 794 | // if only valid view cells should be considered for processing
|
---|
[564] | 795 | bool mOnlyValidViewCells;
|
---|
[580] | 796 | /// if rays should be used to collect merge candidates
|
---|
| 797 | bool mUseRaysForMerge;
|
---|
[1002] | 798 | /// if there should be an additional merge step after the subdivision
|
---|
[592] | 799 | bool mMergeViewCells;
|
---|
[697] | 800 | /// the width of the box filter
|
---|
| 801 | float mFilterWidth;
|
---|
[1570] | 802 | /// Maximal size of the filter in terms of contributing view cells
|
---|
[697] | 803 | int mMaxFilterSize;
|
---|
[2538] | 804 | /// only for debugging: stores some rays used during view cell construction
|
---|
[1686] | 805 | VssRayContainer storedRays;
|
---|
[2538] | 806 | /// if kd node based pvs is used for preprocessing
|
---|
[1902] | 807 | bool mUseKdPvs;
|
---|
[2538] | 808 | /// types of distributions used for sampling
|
---|
[1903] | 809 | MixtureDistribution *mMixtureDistribution;
|
---|
| 810 |
|
---|
[2048] | 811 |
|
---|
[1545] | 812 | //////////////////
|
---|
[487] | 813 | //-- visualization options
|
---|
| 814 |
|
---|
[1002] | 815 | /// color code for view cells visualization
|
---|
[1570] | 816 | bool mShowVisualization;
|
---|
[487] | 817 | int mColorCode;
|
---|
| 818 | bool mExportGeometry;
|
---|
| 819 | bool mExportRays;
|
---|
[517] | 820 | bool mViewCellsFinished;
|
---|
[664] | 821 | bool mEvaluateViewCells;
|
---|
[844] | 822 |
|
---|
| 823 | /// if pvs should be exported with view cells
|
---|
| 824 | bool mExportPvs;
|
---|
[1155] | 825 |
|
---|
[1703] | 826 | /// if view cells geometry should be used from other sources
|
---|
[1545] | 827 | bool mUsePredefinedViewCells;
|
---|
[2538] | 828 | /// the weight for one triangle in the heuristics
|
---|
[2332] | 829 | float mTriangleWeight;
|
---|
[2538] | 830 | /// the weight for one object (= one entity issued with one draw call) in the heuristics
|
---|
[2332] | 831 | float mObjectWeight;
|
---|
| 832 |
|
---|
| 833 | vector<PerViewCellStat> mPerViewCellStat;
|
---|
| 834 | SamplesStatistics mSamplesStat;
|
---|
[440] | 835 | };
|
---|
| 836 |
|
---|
[441] | 837 |
|
---|
[1545] | 838 | /** Manages different higher order operations on the view cells.
|
---|
[440] | 839 | */
|
---|
| 840 | class BspViewCellsManager: public ViewCellsManager
|
---|
| 841 | {
|
---|
| 842 |
|
---|
| 843 | public:
|
---|
[485] | 844 | /** Constructor taking the bsp tree and the number of samples
|
---|
| 845 | used to construct the bsp tree.
|
---|
| 846 | */
|
---|
[1264] | 847 | BspViewCellsManager(ViewCellsTree *viewCellsTree, BspTree *tree);
|
---|
[440] | 848 |
|
---|
[477] | 849 | ~BspViewCellsManager();
|
---|
[1582] | 850 |
|
---|
[574] | 851 | int ConstructSubdivision(const ObjectContainer &objects,
|
---|
[487] | 852 | const VssRayContainer &rays);
|
---|
[440] | 853 |
|
---|
| 854 | int PostProcess(const ObjectContainer &objects,
|
---|
[466] | 855 | const VssRayContainer &rays);
|
---|
[440] | 856 |
|
---|
| 857 | void Visualize(const ObjectContainer &objects,
|
---|
[466] | 858 | const VssRayContainer &sampleRays);
|
---|
[440] | 859 |
|
---|
| 860 | int GetType() const;
|
---|
| 861 |
|
---|
| 862 | ViewCell *GenerateViewCell(Mesh *mesh = NULL) const;
|
---|
| 863 |
|
---|
| 864 | bool ViewCellsConstructed() const;
|
---|
| 865 |
|
---|
[475] | 866 | //void PrintStatistics(ostream &s) const;
|
---|
[452] | 867 |
|
---|
[468] | 868 | int CastLineSegment(const Vector3 &origin,
|
---|
| 869 | const Vector3 &termination,
|
---|
| 870 | ViewCellContainer &viewcells);
|
---|
| 871 |
|
---|
[1294] | 872 | /** Returns the probability that the view point lies
|
---|
| 873 | in this view cells.
|
---|
| 874 | */
|
---|
[471] | 875 | float GetProbability(ViewCell *viewCell);
|
---|
[466] | 876 |
|
---|
[1294] | 877 | /** Get a viewcell containing the specified point.
|
---|
[879] | 878 | */
|
---|
| 879 | ViewCell *GetViewCell(const Vector3 &point, const bool active = false) const;
|
---|
[492] | 880 |
|
---|
[1294] | 881 | /** Creates mesh for this view cell.
|
---|
| 882 | */
|
---|
[503] | 883 | void CreateMesh(ViewCell *vc);
|
---|
| 884 |
|
---|
[1416] | 885 | void ExportViewCellGeometry(Exporter *exporter,
|
---|
| 886 | ViewCell *vc,
|
---|
| 887 | const AxisAlignedBox3 *box,
|
---|
| 888 | const AxisAlignedPlane *clipPlane = NULL
|
---|
| 889 | ) const;
|
---|
[580] | 890 |
|
---|
[587] | 891 | void CollectMergeCandidates(const VssRayContainer &rays,
|
---|
| 892 | vector<MergeCandidate> &candidates);
|
---|
[547] | 893 |
|
---|
[587] | 894 | void Finalize(ViewCell *viewCell, const bool createMesh);
|
---|
| 895 |
|
---|
[1416] | 896 | bool ExportViewCells(const string filename,
|
---|
| 897 | const bool exportPvs,
|
---|
| 898 | const ObjectContainer &objects);
|
---|
[590] | 899 |
|
---|
[752] | 900 | /** Constructs merge hierarchy which corresponds to the spatial hierarchy.
|
---|
| 901 | */
|
---|
[650] | 902 | ViewCell *ConstructSpatialMergeTree(BspNode *root);
|
---|
[610] | 903 |
|
---|
[1686] | 904 | void ExportSingleViewCells(const ObjectContainer &objects,
|
---|
| 905 | const int maxViewCells,
|
---|
| 906 | const bool sortViewCells,
|
---|
| 907 | const bool exportPvs,
|
---|
| 908 | const bool exportRays,
|
---|
| 909 | const int maxRays,
|
---|
[2394] | 910 | const string &prefix,
|
---|
[1686] | 911 | VssRayContainer *visRays = NULL);
|
---|
[1545] | 912 |
|
---|
[1977] | 913 | bool LineSegmentIntersects(const Vector3 &origin,
|
---|
| 914 | const Vector3 &termination,
|
---|
| 915 | ViewCell *viewCell);
|
---|
| 916 |
|
---|
[440] | 917 | protected:
|
---|
| 918 |
|
---|
[480] | 919 | void CollectViewCells();
|
---|
[547] | 920 |
|
---|
[440] | 921 | /// the BSP tree.
|
---|
| 922 | BspTree *mBspTree;
|
---|
[475] | 923 | vector<BspRay *> mBspRays;
|
---|
[440] | 924 |
|
---|
| 925 | private:
|
---|
| 926 |
|
---|
[1545] | 927 | /** Constructs a spatial merge tree only 2 levels deep.
|
---|
| 928 | */
|
---|
| 929 | ViewCell *ConstructDummyMergeTree(BspNode *root);
|
---|
[440] | 930 | /** Exports visualization of the BSP splits.
|
---|
| 931 | */
|
---|
[477] | 932 | void ExportSplits(const ObjectContainer &objects);
|
---|
[1002] | 933 | /** test if subdivision is valid in terms of volume / area.
|
---|
| 934 | */
|
---|
[693] | 935 | void TestSubdivision();
|
---|
[440] | 936 | };
|
---|
| 937 |
|
---|
[1545] | 938 |
|
---|
[440] | 939 | /**
|
---|
| 940 | Manages different higher order operations on the KD type view cells.
|
---|
| 941 | */
|
---|
| 942 | class KdViewCellsManager: public ViewCellsManager
|
---|
| 943 | {
|
---|
| 944 |
|
---|
| 945 | public:
|
---|
| 946 |
|
---|
[1264] | 947 | KdViewCellsManager(ViewCellsTree *viewCellsTree, KdTree *tree);
|
---|
[440] | 948 |
|
---|
[574] | 949 | int ConstructSubdivision(const ObjectContainer &objects,
|
---|
[1686] | 950 | const VssRayContainer &rays);
|
---|
[440] | 951 |
|
---|
[478] | 952 | int CastLineSegment(const Vector3 &origin,
|
---|
| 953 | const Vector3 &termination,
|
---|
| 954 | ViewCellContainer &viewcells);
|
---|
[440] | 955 |
|
---|
| 956 | int PostProcess(const ObjectContainer &objects,
|
---|
[466] | 957 | const VssRayContainer &rays);
|
---|
[440] | 958 |
|
---|
| 959 | void Visualize(const ObjectContainer &objects,
|
---|
[466] | 960 | const VssRayContainer &sampleRays);
|
---|
[440] | 961 |
|
---|
| 962 | int GetType() const;
|
---|
| 963 |
|
---|
| 964 | bool ViewCellsConstructed() const;
|
---|
| 965 |
|
---|
[580] | 966 | ViewCell *GenerateViewCell(Mesh *mesh) const;
|
---|
[440] | 967 |
|
---|
[452] | 968 | /** Prints out statistics of this approach.
|
---|
| 969 | */
|
---|
[503] | 970 | // virtual void PrintStatistics(ostream &s) const;
|
---|
[1416] | 971 | ViewCell *GetViewCell(const Vector3 &point, const bool active = false) const
|
---|
| 972 | { return NULL; }
|
---|
[452] | 973 |
|
---|
[503] | 974 | float GetProbability(ViewCell *viewCell);
|
---|
[609] | 975 |
|
---|
[503] | 976 | void CreateMesh(ViewCell *vc);
|
---|
| 977 |
|
---|
[1686] | 978 | void ExportViewCellGeometry(Exporter *exporter,
|
---|
| 979 | ViewCell *vc,
|
---|
| 980 | const AxisAlignedBox3 *box,
|
---|
| 981 | const AxisAlignedPlane *clipPlane = NULL) const;
|
---|
[547] | 982 |
|
---|
[1416] | 983 |
|
---|
[591] | 984 | void CollectMergeCandidates(const VssRayContainer &rays,
|
---|
| 985 | vector<MergeCandidate> &candidates);
|
---|
[580] | 986 |
|
---|
[1686] | 987 | void ExportSingleViewCells(const ObjectContainer &objects,
|
---|
| 988 | const int maxViewCells,
|
---|
| 989 | const bool sortViewCells,
|
---|
| 990 | const bool exportPvs,
|
---|
| 991 | const bool exportRays,
|
---|
| 992 | const int maxRays,
|
---|
[2394] | 993 | const string &prefix,
|
---|
[1686] | 994 | VssRayContainer *visRays = NULL);
|
---|
[752] | 995 |
|
---|
[1977] | 996 | bool LineSegmentIntersects(const Vector3 &origin,
|
---|
| 997 | const Vector3 &termination,
|
---|
| 998 | ViewCell *viewCell);
|
---|
| 999 |
|
---|
[440] | 1000 | protected:
|
---|
| 1001 |
|
---|
[580] | 1002 | /** Collects view cells from a hierarchy.
|
---|
| 1003 | */
|
---|
[480] | 1004 | void CollectViewCells();
|
---|
[580] | 1005 |
|
---|
[480] | 1006 | KdNode *GetNodeForPvs(KdLeaf *leaf);
|
---|
[440] | 1007 |
|
---|
[1570] | 1008 | ////////////////////////////////////////
|
---|
[440] | 1009 |
|
---|
[480] | 1010 | /// the BSP tree.
|
---|
| 1011 | KdTree *mKdTree;
|
---|
[440] | 1012 |
|
---|
[480] | 1013 | /// depth of the KD tree nodes with represent the view cells
|
---|
| 1014 | int mKdPvsDepth;
|
---|
[938] | 1015 |
|
---|
| 1016 |
|
---|
[440] | 1017 | };
|
---|
| 1018 |
|
---|
[1570] | 1019 |
|
---|
| 1020 | /** Manages different higher order operations on the view cells.
|
---|
[442] | 1021 | */
|
---|
| 1022 | class VspBspViewCellsManager: public ViewCellsManager
|
---|
| 1023 | {
|
---|
| 1024 |
|
---|
| 1025 | public:
|
---|
| 1026 |
|
---|
[1264] | 1027 | VspBspViewCellsManager(ViewCellsTree *viewCellsTree, VspBspTree *tree);
|
---|
[475] | 1028 | ~VspBspViewCellsManager();
|
---|
[442] | 1029 |
|
---|
[574] | 1030 | int ConstructSubdivision(const ObjectContainer &objects,
|
---|
[1686] | 1031 | const VssRayContainer &rays);
|
---|
[442] | 1032 |
|
---|
| 1033 | int PostProcess(const ObjectContainer &objects,
|
---|
[466] | 1034 | const VssRayContainer &rays);
|
---|
[442] | 1035 |
|
---|
| 1036 | void Visualize(const ObjectContainer &objects,
|
---|
[466] | 1037 | const VssRayContainer &sampleRays);
|
---|
[442] | 1038 |
|
---|
| 1039 | int GetType() const;
|
---|
| 1040 |
|
---|
| 1041 | ViewCell *GenerateViewCell(Mesh *mesh = NULL) const;
|
---|
| 1042 |
|
---|
| 1043 | bool ViewCellsConstructed() const;
|
---|
[468] | 1044 |
|
---|
| 1045 | int CastLineSegment(const Vector3 &origin,
|
---|
| 1046 | const Vector3 &termination,
|
---|
| 1047 | ViewCellContainer &viewcells);
|
---|
[452] | 1048 |
|
---|
[471] | 1049 | float GetProbability(ViewCell *viewCell);
|
---|
[479] | 1050 |
|
---|
[879] | 1051 | ViewCell *GetViewCell(const Vector3 &point, const bool active = false) const;
|
---|
[477] | 1052 |
|
---|
[487] | 1053 | bool GetViewPoint(Vector3 &viewPoint) const;
|
---|
| 1054 |
|
---|
[490] | 1055 | bool ViewPointValid(const Vector3 &viewPoint) const;
|
---|
[503] | 1056 |
|
---|
| 1057 | void CreateMesh(ViewCell *vc);
|
---|
| 1058 |
|
---|
[1686] | 1059 | bool ExportViewCells(const string filename,
|
---|
| 1060 | const bool exportPvs,
|
---|
| 1061 | const ObjectContainer &objects);
|
---|
[508] | 1062 |
|
---|
[532] | 1063 | int CastBeam(Beam &beam);
|
---|
[1416] | 1064 |
|
---|
[1686] | 1065 | void ExportViewCellGeometry(Exporter *exporter,
|
---|
| 1066 | ViewCell *vc,
|
---|
| 1067 | const AxisAlignedBox3 *box,
|
---|
| 1068 | const AxisAlignedPlane *clipPlane = NULL) const;
|
---|
[532] | 1069 |
|
---|
[547] | 1070 |
|
---|
[555] | 1071 | void Finalize(ViewCell *viewCell, const bool createMesh);
|
---|
[551] | 1072 |
|
---|
[1686] | 1073 | void CollectMergeCandidates(const VssRayContainer &rays,
|
---|
| 1074 | vector<MergeCandidate> &candidates);
|
---|
[580] | 1075 |
|
---|
[1686] | 1076 | void ExportSingleViewCells(const ObjectContainer &objects,
|
---|
| 1077 | const int maxViewCells,
|
---|
| 1078 | const bool sortViewCells,
|
---|
| 1079 | const bool exportPvs,
|
---|
| 1080 | const bool exportRays,
|
---|
| 1081 | const int maxRays,
|
---|
[2394] | 1082 | const string &prefix,
|
---|
[1686] | 1083 | VssRayContainer *visRays = NULL);
|
---|
[1570] | 1084 |
|
---|
[1920] | 1085 |
|
---|
[1977] | 1086 | bool LineSegmentIntersects(const Vector3 &origin,
|
---|
| 1087 | const Vector3 &termination,
|
---|
| 1088 | ViewCell *viewCell);
|
---|
| 1089 |
|
---|
[442] | 1090 | protected:
|
---|
[475] | 1091 |
|
---|
[1686] | 1092 | int ComputeBoxIntersections(const AxisAlignedBox3 &box,
|
---|
| 1093 | ViewCellContainer &viewCells) const;
|
---|
[651] | 1094 |
|
---|
[1021] | 1095 | /** Merges view cells according to some criteria
|
---|
[442] | 1096 | */
|
---|
[508] | 1097 | void MergeViewCells(const VssRayContainer &rays,
|
---|
| 1098 | const ObjectContainer &objects);
|
---|
[503] | 1099 |
|
---|
[564] | 1100 | void RefineViewCells(const VssRayContainer &rays, const ObjectContainer &objects);
|
---|
[442] | 1101 |
|
---|
[480] | 1102 | void CollectViewCells();
|
---|
| 1103 |
|
---|
[482] | 1104 | /** Returns maximal depth difference of view cell
|
---|
| 1105 | leaves in tree.
|
---|
| 1106 | */
|
---|
| 1107 | int GetMaxTreeDiff(ViewCell *vc) const;
|
---|
| 1108 |
|
---|
[752] | 1109 | /** Prepare view cells for use after loading them from disc.
|
---|
| 1110 | */
|
---|
[577] | 1111 | void PrepareLoadedViewCells();
|
---|
| 1112 |
|
---|
[752] | 1113 | /** Constructs merge hierarchy which corresponds to the spatial hierarchy.
|
---|
| 1114 | */
|
---|
[650] | 1115 | ViewCell *ConstructSpatialMergeTree(BspNode *root);
|
---|
[649] | 1116 |
|
---|
[979] | 1117 | /// HACK for testing visibility filter functionality
|
---|
[697] | 1118 | void TestFilter(const ObjectContainer &objects);
|
---|
| 1119 |
|
---|
[979] | 1120 | /** Visualization of the pvs difference to exact visubility using
|
---|
| 1121 | from point queries.
|
---|
| 1122 | */
|
---|
| 1123 | void VisualizeWithFromPointQueries();
|
---|
[697] | 1124 |
|
---|
[991] | 1125 | /** Evaluate from point queries for the current scene.
|
---|
| 1126 | */
|
---|
| 1127 | void EvalFromPointQueries();
|
---|
[979] | 1128 |
|
---|
[1021] | 1129 | /** Exports visualization of the BSP splits.
|
---|
| 1130 | */
|
---|
| 1131 | void ExportSplits(const ObjectContainer &objects,
|
---|
| 1132 | const VssRayContainer &rays);
|
---|
[991] | 1133 |
|
---|
[1686] | 1134 |
|
---|
| 1135 | /////////////////////////
|
---|
| 1136 |
|
---|
[442] | 1137 | /// the view space partition BSP tree.
|
---|
| 1138 | VspBspTree *mVspBspTree;
|
---|
| 1139 |
|
---|
[591] | 1140 |
|
---|
[442] | 1141 | private:
|
---|
| 1142 |
|
---|
[1021] | 1143 | /** test if subdivision is valid in terms of volume / area.
|
---|
[442] | 1144 | */
|
---|
[1021] | 1145 | void TestSubdivision();
|
---|
| 1146 | };
|
---|
[442] | 1147 |
|
---|
[1021] | 1148 |
|
---|
[2353] | 1149 |
|
---|
| 1150 | /** Manages different higher order operations on the view cells.
|
---|
[1021] | 1151 | */
|
---|
| 1152 | class VspOspViewCellsManager: public ViewCellsManager
|
---|
| 1153 | {
|
---|
[1740] | 1154 | friend class ViewCellsParseHandlers;
|
---|
[2542] | 1155 | friend class ViewCellsManager;
|
---|
[1977] | 1156 |
|
---|
[1021] | 1157 | public:
|
---|
| 1158 |
|
---|
[2542] | 1159 | /** This version takes a view cells tree and a hierarchy
|
---|
| 1160 | as input.
|
---|
| 1161 | */
|
---|
[2113] | 1162 | VspOspViewCellsManager(ViewCellsTree *vcTree,
|
---|
| 1163 | const string &hierarchyType);
|
---|
[1278] | 1164 |
|
---|
[1021] | 1165 | ~VspOspViewCellsManager();
|
---|
| 1166 |
|
---|
| 1167 | int ConstructSubdivision(const ObjectContainer &objects,
|
---|
| 1168 | const VssRayContainer &rays);
|
---|
| 1169 |
|
---|
| 1170 | int PostProcess(const ObjectContainer &objects,
|
---|
| 1171 | const VssRayContainer &rays);
|
---|
| 1172 |
|
---|
[1686] | 1173 | void Visualize(const ObjectContainer &objects,
|
---|
[1021] | 1174 | const VssRayContainer &sampleRays);
|
---|
| 1175 |
|
---|
| 1176 | int GetType() const;
|
---|
| 1177 |
|
---|
| 1178 | ViewCell *GenerateViewCell(Mesh *mesh = NULL) const;
|
---|
| 1179 |
|
---|
[2539] | 1180 | virtual Intersectable *GetIntersectable(const VssRay &ray,
|
---|
| 1181 | const bool isTermination) const;
|
---|
[1743] | 1182 |
|
---|
[1021] | 1183 | bool ViewCellsConstructed() const;
|
---|
| 1184 |
|
---|
| 1185 | int CastLineSegment(const Vector3 &origin,
|
---|
| 1186 | const Vector3 &termination,
|
---|
| 1187 | ViewCellContainer &viewcells);
|
---|
| 1188 |
|
---|
[1977] | 1189 | bool LineSegmentIntersects(const Vector3 &origin,
|
---|
| 1190 | const Vector3 &termination,
|
---|
| 1191 | ViewCell *viewCell);
|
---|
| 1192 |
|
---|
[1021] | 1193 | float GetProbability(ViewCell *viewCell);
|
---|
| 1194 |
|
---|
[2113] | 1195 | ViewCell *GetViewCell(const Vector3 &point,
|
---|
| 1196 | const bool active = false) const;
|
---|
[1021] | 1197 |
|
---|
| 1198 | bool GetViewPoint(Vector3 &viewPoint) const;
|
---|
| 1199 |
|
---|
| 1200 | bool ViewPointValid(const Vector3 &viewPoint) const;
|
---|
| 1201 |
|
---|
| 1202 | void CreateMesh(ViewCell *vc);
|
---|
| 1203 |
|
---|
[1027] | 1204 | bool ExportViewCells(const string filename,
|
---|
| 1205 | const bool exportPvs,
|
---|
| 1206 | const ObjectContainer &objects);
|
---|
[1021] | 1207 |
|
---|
| 1208 | int CastBeam(Beam &beam);
|
---|
| 1209 |
|
---|
| 1210 | void Finalize(ViewCell *viewCell, const bool createMesh);
|
---|
| 1211 |
|
---|
[1666] | 1212 | void ExportSingleViewCells(const ObjectContainer &objects,
|
---|
| 1213 | const int maxViewCells,
|
---|
| 1214 | const bool sortViewCells,
|
---|
| 1215 | const bool exportPvs,
|
---|
| 1216 | const bool exportRays,
|
---|
| 1217 | const int maxRays,
|
---|
[2394] | 1218 | const string &prefix,
|
---|
[1666] | 1219 | VssRayContainer *visRays = NULL);
|
---|
[2539] | 1220 | /** See parent class.
|
---|
| 1221 | */
|
---|
[2124] | 1222 | virtual void FinalizeViewCells(const bool createMesh);
|
---|
| 1223 |
|
---|
[2543] | 1224 | bool ExportViewCellsBinary(const string filename,
|
---|
[2539] | 1225 | const bool exportPvs,
|
---|
| 1226 | const ObjectContainer &objects);
|
---|
| 1227 |
|
---|
[2332] | 1228 | #if TEST_PACKETS
|
---|
| 1229 |
|
---|
[2353] | 1230 | float ComputeSampleContributions(const VssRayContainer &rays,
|
---|
| 1231 | const bool addContributions,
|
---|
| 1232 | const bool storeViewCells,
|
---|
| 1233 | const bool useHitObjects = false);
|
---|
[2332] | 1234 | #endif
|
---|
| 1235 |
|
---|
[2539] | 1236 |
|
---|
[1021] | 1237 | protected:
|
---|
[1180] | 1238 |
|
---|
[2539] | 1239 | /** View cells manager taking a view cells tree and a hierarchy as input.
|
---|
| 1240 | */
|
---|
[1740] | 1241 | VspOspViewCellsManager(ViewCellsTree *vcTree, HierarchyManager *hm);
|
---|
| 1242 |
|
---|
[1709] | 1243 | virtual void EvalViewCellPartition();
|
---|
[1027] | 1244 | /** Exports view cell geometry.
|
---|
| 1245 | */
|
---|
[1666] | 1246 | void ExportViewCellGeometry(Exporter *exporter,
|
---|
| 1247 | ViewCell *vc,
|
---|
| 1248 | const AxisAlignedBox3 *box,
|
---|
| 1249 | const AxisAlignedPlane *clipPlane = NULL) const;
|
---|
[1027] | 1250 |
|
---|
[1666] | 1251 | int ComputeBoxIntersections(const AxisAlignedBox3 &box,
|
---|
| 1252 | ViewCellContainer &viewCells) const;
|
---|
[1021] | 1253 |
|
---|
| 1254 | void CollectViewCells();
|
---|
| 1255 |
|
---|
[1845] | 1256 | virtual void CompressViewCells();
|
---|
[1021] | 1257 | /** Prepare view cells for use after loading them from disc.
|
---|
| 1258 | */
|
---|
| 1259 | void PrepareLoadedViewCells();
|
---|
| 1260 | /** Constructs merge hierarchy which corresponds to the spatial hierarchy.
|
---|
| 1261 | */
|
---|
| 1262 | ViewCell *ConstructSpatialMergeTree(VspNode *root);
|
---|
[1074] | 1263 | /** Exports visualization of the PVS.
|
---|
[442] | 1264 | */
|
---|
[1666] | 1265 | void ExportPvs(const ObjectContainer &objects, const VssRayContainer &rays);
|
---|
[1740] | 1266 | /** Returns a hierarchy manager of the given name.
|
---|
| 1267 | */
|
---|
| 1268 | static HierarchyManager *CreateHierarchyManager(const string &name);
|
---|
[1887] | 1269 | /** collect objects intersecting a given spatial box
|
---|
[1845] | 1270 | */
|
---|
| 1271 | virtual void CollectObjects(const AxisAlignedBox3 &box, ObjectContainer &objects);
|
---|
[2539] | 1272 | /** Update the cost of pvss for hierarchy objects.
|
---|
| 1273 | */
|
---|
| 1274 | float UpdateObjectCosts();
|
---|
[1737] | 1275 |
|
---|
[2539] | 1276 |
|
---|
| 1277 | ////////////////
|
---|
| 1278 |
|
---|
| 1279 | /** Fast view cell loader in binary mode.
|
---|
| 1280 | */
|
---|
[2547] | 1281 | friend ViewCellsManager *ViewCellsManager::
|
---|
| 1282 | LoadViewCellsBinary(const std::string &filename,
|
---|
| 1283 | ObjectContainer &pvsObjects,
|
---|
| 1284 | bool finalizeViewCells,
|
---|
| 1285 | BoundingBoxConverter *bconverter);
|
---|
[2539] | 1286 |
|
---|
[2547] | 1287 |
|
---|
[2539] | 1288 | /** Print statistics about the view cells compression.
|
---|
| 1289 | */
|
---|
[2530] | 1290 | static void PrintCompressionStats(HierarchyManager *hm, const int pvsEntries);
|
---|
[1887] | 1291 |
|
---|
| 1292 |
|
---|
[2530] | 1293 | ////////////////////
|
---|
| 1294 |
|
---|
[2547] | 1295 | /// if we the objects are compressed after evaluation
|
---|
| 1296 | /// this makes only sense for testing purpose
|
---|
[1887] | 1297 | bool mCompressObjects;
|
---|
[2547] | 1298 | /// hierarchy manager managing view space / object subdivision.
|
---|
[1027] | 1299 | HierarchyManager *mHierarchyManager;
|
---|
[442] | 1300 | };
|
---|
| 1301 |
|
---|
[575] | 1302 |
|
---|
[860] | 1303 | }
|
---|
| 1304 |
|
---|
[440] | 1305 | #endif
|
---|