1 | #ifndef _ViewCellsManager_H__
|
---|
2 | #define _ViewCellsManager_H__
|
---|
3 |
|
---|
4 | #include "Ray.h"
|
---|
5 | #include "VssRay.h"
|
---|
6 | #include "Containers.h"
|
---|
7 | #include "ViewCell.h"
|
---|
8 | #include "ViewCellBsp.h"
|
---|
9 |
|
---|
10 | namespace GtpVisibilityPreprocessor {
|
---|
11 |
|
---|
12 | class ViewCell;
|
---|
13 | class Intersectable;
|
---|
14 | class RenderSimulator;
|
---|
15 | class Renderer;
|
---|
16 | class Mesh;
|
---|
17 | struct Triangle3;
|
---|
18 | class SimulationStatistics;
|
---|
19 | class BspTree;
|
---|
20 | class KdTree;
|
---|
21 | class VspOspTree;
|
---|
22 | class VspBspTree;
|
---|
23 | class KdNode;
|
---|
24 | class KdLeaf;
|
---|
25 | class AxisAlignedBox3;
|
---|
26 | class BspLeaf;
|
---|
27 | class ViewCellsStatistics;
|
---|
28 | class Exporter;
|
---|
29 | class Beam;
|
---|
30 | class Preprocessor;
|
---|
31 | class ViewCellsTree;
|
---|
32 | class MergeCandidate;
|
---|
33 | class BoundingBoxConverter;
|
---|
34 | class VspTree;
|
---|
35 | class OspTree;
|
---|
36 | class VspNode;
|
---|
37 | class HierarchyManager;
|
---|
38 | class BvHierarchy;
|
---|
39 | class ViewCellsTree;
|
---|
40 |
|
---|
41 | struct AxisAlignedPlane;
|
---|
42 | struct BspRay;
|
---|
43 |
|
---|
44 |
|
---|
45 | /** Probably Visible Set
|
---|
46 | */
|
---|
47 | class PrVs
|
---|
48 | {
|
---|
49 | public:
|
---|
50 | /// root of view cells tree
|
---|
51 | ViewCell *mViewCell;
|
---|
52 |
|
---|
53 | // input parameter is the render budget for the PrVs
|
---|
54 | float mRenderBudget;
|
---|
55 |
|
---|
56 | /// some characteristic values could be here
|
---|
57 |
|
---|
58 | };
|
---|
59 |
|
---|
60 |
|
---|
61 | /** Manages different higher order operations on the view cells.
|
---|
62 | */
|
---|
63 | class ViewCellsManager
|
---|
64 | {
|
---|
65 | public:
|
---|
66 | struct PvsStatistics
|
---|
67 | {
|
---|
68 | int minPvs;
|
---|
69 | int maxPvs;
|
---|
70 | float avgPvs;
|
---|
71 | int viewcells;
|
---|
72 | };
|
---|
73 |
|
---|
74 | /// view cell container types
|
---|
75 | enum {BSP, KD, VSP_KD, VSP_BSP, VSP_OSP};
|
---|
76 |
|
---|
77 | /// render cost evaluation type
|
---|
78 | enum {PER_OBJECT, PER_TRIANGLE};
|
---|
79 |
|
---|
80 | friend class X3dViewCellsParseHandlers;
|
---|
81 | /** Default constructor.
|
---|
82 | */
|
---|
83 | ViewCellsManager(ViewCellsTree *viewCellsTree);
|
---|
84 |
|
---|
85 | virtual ~ViewCellsManager();
|
---|
86 |
|
---|
87 | /** Constructs view cells container taking a preprocessor
|
---|
88 | @returns the output rays (if not null)
|
---|
89 | */
|
---|
90 | int Construct(Preprocessor *preprocessor, VssRayContainer *outRays = NULL);
|
---|
91 |
|
---|
92 | /** Constructs view cell container with a given number of samples.
|
---|
93 | */
|
---|
94 | virtual int ConstructSubdivision(
|
---|
95 | const ObjectContainer &objects,
|
---|
96 | const VssRayContainer &rays) = 0;
|
---|
97 |
|
---|
98 | /** Computes sample contributions of the rays to the view cells PVS.
|
---|
99 |
|
---|
100 | @param rays bundle of rays used to find intersections with view cells and
|
---|
101 | adding the contribution
|
---|
102 | @param addRays true if rays should be added to the PVSs of the viewcells they
|
---|
103 | intersect
|
---|
104 | @param storeViewCells true if view cells should be stored in the ray
|
---|
105 | */
|
---|
106 | float ComputeSampleContributions(const VssRayContainer &rays,
|
---|
107 | const bool addContributions,
|
---|
108 | const bool storeViewCells);
|
---|
109 |
|
---|
110 | /** Add sample contributions to the viewcells they intersect
|
---|
111 | */
|
---|
112 | void AddSampleContributions(const VssRayContainer &rays);
|
---|
113 |
|
---|
114 |
|
---|
115 | /** Computes sample contribution of a simgle ray to the view cells PVS.
|
---|
116 | @param ray finds intersections with view cells and holds the contribution
|
---|
117 | @param castRay true if ray should be cast to gain the information, false if ray
|
---|
118 | is already holding the information and need not be recast.
|
---|
119 |
|
---|
120 | @returns number of sample contributions
|
---|
121 | */
|
---|
122 | virtual float ComputeSampleContribution(VssRay &ray,
|
---|
123 | const bool addRays,
|
---|
124 | const bool storeViewCells);
|
---|
125 |
|
---|
126 | virtual void AddSampleContributions(VssRay &ray);
|
---|
127 |
|
---|
128 | /** Prints out statistics of the view cells.
|
---|
129 | */
|
---|
130 | virtual void PrintStatistics(ostream &s) const;
|
---|
131 |
|
---|
132 | /** Post processes view cells givemŽa number of rays.
|
---|
133 | */
|
---|
134 | virtual int PostProcess(const ObjectContainer &objects,
|
---|
135 | const VssRayContainer &rays) = 0;
|
---|
136 |
|
---|
137 | /** Show visualization of the view cells.
|
---|
138 | */
|
---|
139 | virtual void Visualize(const ObjectContainer &objects,
|
---|
140 | const VssRayContainer &sampleRays) = 0;
|
---|
141 |
|
---|
142 | /** type of the view cell container.
|
---|
143 | */
|
---|
144 | virtual int GetType() const = 0;
|
---|
145 |
|
---|
146 | /** Load the input viewcells. The input viewcells should be given as a collection
|
---|
147 | of meshes. Each mesh is assume to form a bounded polyhedron
|
---|
148 | defining the interior of the viewcell. The view cells manager
|
---|
149 | is responsible for building a hierarchy over these view cells.
|
---|
150 |
|
---|
151 | @param filename file to load
|
---|
152 | @return true on success
|
---|
153 | */
|
---|
154 | virtual bool LoadViewCellsGeometry(const string filename, const bool extrudeBaseTriangle);
|
---|
155 |
|
---|
156 | /** Merges two view cells.
|
---|
157 | @note the piercing rays of the front and back will be ordered
|
---|
158 | @returns new view cell based on the merging.
|
---|
159 | */
|
---|
160 | ViewCellInterior *MergeViewCells(ViewCell *front, ViewCell *back) const;
|
---|
161 |
|
---|
162 | /** Merges a container of view cells.
|
---|
163 | @returns new view cell based on the merging.
|
---|
164 | */
|
---|
165 | ViewCellInterior *MergeViewCells(ViewCellContainer &children) const;
|
---|
166 |
|
---|
167 | /** Generates view cell of the type specified by this manager
|
---|
168 | */
|
---|
169 | virtual ViewCell *GenerateViewCell(Mesh *mesh = NULL) const = 0;
|
---|
170 |
|
---|
171 | /** Constructs view cell from base triangle.
|
---|
172 | The view cell is extruded along the normal vector.
|
---|
173 | @param the base triangle
|
---|
174 | @param the height of the newly created view cell
|
---|
175 | */
|
---|
176 | ViewCell *ExtrudeViewCell(const Triangle3 &baseTri, const float height) const;
|
---|
177 |
|
---|
178 | /** Sets maximal number of samples used for the
|
---|
179 | construction of the view cells.
|
---|
180 | */
|
---|
181 | void SetVisualizationSamples(const int visSamples);
|
---|
182 |
|
---|
183 | /** Sets maximal number of samples used for the construction of the view cells.
|
---|
184 | */
|
---|
185 | void SetConstructionSamples(const int constructionSamples);
|
---|
186 |
|
---|
187 | /** Sets maximal number of samples used for the visualization of the view cells.
|
---|
188 | */
|
---|
189 | void SetInitialSamples(const int initialSamples);
|
---|
190 |
|
---|
191 | /** Sets maximal number of samples used for the post processing of the view cells.
|
---|
192 | */
|
---|
193 | void SetPostProcessSamples(const int postProcessingSamples);
|
---|
194 |
|
---|
195 | /** See set.
|
---|
196 | */
|
---|
197 | int GetVisualizationSamples() const;
|
---|
198 |
|
---|
199 | /** See set.
|
---|
200 | */
|
---|
201 | int GetConstructionSamples() const;
|
---|
202 |
|
---|
203 | /** See set.
|
---|
204 | */
|
---|
205 | int GetPostProcessSamples() const;
|
---|
206 |
|
---|
207 | /** Returns true if view cells are already constructed.
|
---|
208 | */
|
---|
209 | virtual bool ViewCellsConstructed() const = 0;
|
---|
210 |
|
---|
211 | /** cast line segment to get a list of unique viewcells which are intersected
|
---|
212 | by this line segment
|
---|
213 | */
|
---|
214 |
|
---|
215 | virtual int CastLineSegment(const Vector3 &origin,
|
---|
216 | const Vector3 &termination,
|
---|
217 | ViewCellContainer &viewcells
|
---|
218 | ) = 0;
|
---|
219 |
|
---|
220 | /** Returns a stats about the global pvs.
|
---|
221 | */
|
---|
222 | virtual void GetPvsStatistics(PvsStatistics &stat);
|
---|
223 |
|
---|
224 | virtual void GetPrVS(const Vector3 &viewPoint, PrVs &prvs, const float filterWidth);
|
---|
225 |
|
---|
226 | /** Get a viewcell containing the specified point
|
---|
227 | @param active if the active or elementary view cell should be returned.
|
---|
228 | */
|
---|
229 | virtual ViewCell *GetViewCell(const Vector3 &point, const bool active = false) const = 0;
|
---|
230 |
|
---|
231 | virtual void PrintPvsStatistics(ostream &s);
|
---|
232 |
|
---|
233 | /** Updates pvs of the view cell hierarchy if necessary.
|
---|
234 | */
|
---|
235 | void UpdatePvs();
|
---|
236 |
|
---|
237 | /** Returns probability that view point lies in one view cell.
|
---|
238 | */
|
---|
239 | virtual float GetProbability(ViewCell *viewCell) = 0;
|
---|
240 |
|
---|
241 | /** Returns render cost of a single view cell given the render cost of an object.
|
---|
242 | */
|
---|
243 | float GetRendercost(ViewCell *viewCell) const;
|
---|
244 |
|
---|
245 | /** Returns reference to container of loaded / generated view cells.
|
---|
246 | */
|
---|
247 | ViewCellContainer &GetViewCells();
|
---|
248 |
|
---|
249 | /** Helper function used to split ray sets uniformly
|
---|
250 | into one that is currently used and the other that
|
---|
251 | is saved for later processing.
|
---|
252 | @param sourceRays the input ray set
|
---|
253 | @param maxSize the maximal number of rays that will be used
|
---|
254 | @param usedRays returns the used ray set
|
---|
255 | @param savedRays if not null, returns the saved ray set
|
---|
256 | */
|
---|
257 | void GetRaySets(const VssRayContainer &sourceRays,
|
---|
258 | const int maxSize,
|
---|
259 | VssRayContainer &usedRays,
|
---|
260 | VssRayContainer *savedRays = NULL) const;
|
---|
261 |
|
---|
262 | /** Returns accumulated area of all view cells.
|
---|
263 | */
|
---|
264 | float GetAccVcArea();
|
---|
265 |
|
---|
266 | /** Returns area of one view cell.
|
---|
267 | */
|
---|
268 | virtual float GetArea(ViewCell *viewCell) const;
|
---|
269 |
|
---|
270 | /** Returns volume of view cell.
|
---|
271 | */
|
---|
272 | virtual float GetVolume(ViewCell *viewCell) const;
|
---|
273 |
|
---|
274 | /** Sets the current renderer mainly for view cells statistics.
|
---|
275 | */
|
---|
276 | void SetRenderer(Renderer *renderer);
|
---|
277 |
|
---|
278 | /** Computes a (random) view point in the valid view space.
|
---|
279 | @returns true if valid view point was found
|
---|
280 | */
|
---|
281 | virtual bool GetViewPoint(Vector3 &viewPoint) const;
|
---|
282 |
|
---|
283 | /** Returns true if this view point is in the valid view space.
|
---|
284 | */
|
---|
285 | virtual bool ViewPointValid(const Vector3 &viewPoint) const;
|
---|
286 |
|
---|
287 | /** Sets a view space boundary.
|
---|
288 | */
|
---|
289 | void SetViewSpaceBox(const AxisAlignedBox3 &box);
|
---|
290 |
|
---|
291 | AxisAlignedBox3 GetViewSpaceBox() const;
|
---|
292 |
|
---|
293 | /** Creates mesh for this view cell.
|
---|
294 | */
|
---|
295 | virtual void CreateMesh(ViewCell *vc) = NULL;
|
---|
296 |
|
---|
297 | /** Writes view cells to disc.
|
---|
298 | */
|
---|
299 | virtual bool ExportViewCells(const string filename,
|
---|
300 | const bool exportPvs,
|
---|
301 | const ObjectContainer &objects);
|
---|
302 |
|
---|
303 | /** Casts beam to collect view cells.
|
---|
304 | */
|
---|
305 | virtual int CastBeam(Beam &beam);
|
---|
306 |
|
---|
307 | /** Checks if view cell is considered as valid.
|
---|
308 | */
|
---|
309 | virtual bool CheckValidity(ViewCell *vc,
|
---|
310 | int minPvsSize,
|
---|
311 | int maxPvsSize) const;
|
---|
312 |
|
---|
313 |
|
---|
314 | /** Sets validity of view cell
|
---|
315 | */
|
---|
316 | virtual void SetValidity(ViewCell *vc,
|
---|
317 | int minPvsSize,
|
---|
318 | int maxPvsSize) const;
|
---|
319 |
|
---|
320 | /** sets validy of all viewcells
|
---|
321 | */
|
---|
322 | virtual void SetValidity(int minPvsSize,
|
---|
323 | int maxPvsSize) const;
|
---|
324 |
|
---|
325 |
|
---|
326 | /** set valid viewcells in the range of pvs. sorts the viewcells
|
---|
327 | according to the pvs and then pickups those in the ranges
|
---|
328 | */
|
---|
329 | void SetValidityPercentage(const float minValid, const float maxValid);
|
---|
330 |
|
---|
331 | /** Returns number of valid view cells.
|
---|
332 | */
|
---|
333 | int CountValidViewcells() const;
|
---|
334 |
|
---|
335 | /** Returns maximal allowed pvs size.
|
---|
336 | */
|
---|
337 | int GetMaxPvsSize() const;
|
---|
338 |
|
---|
339 | /** Returns maximal allowed pvs size.
|
---|
340 | */
|
---|
341 | int GetMinPvsSize() const;
|
---|
342 | /** Returns maximal ratio. i.e., currentPVs / maxPvs,
|
---|
343 | where pvs is still considered valid.
|
---|
344 | */
|
---|
345 | float GetMaxPvsRatio() const;
|
---|
346 | /** Exports view cell geometry.
|
---|
347 | */
|
---|
348 | virtual void ExportViewCellGeometry(
|
---|
349 | Exporter *exporter,
|
---|
350 | ViewCell *vc,
|
---|
351 | const AxisAlignedBox3 *box,
|
---|
352 | const AxisAlignedPlane *clipPlane = NULL
|
---|
353 | ) const = 0;
|
---|
354 |
|
---|
355 | /** Brings the view cells into their final state, computes meshes and volume.
|
---|
356 | */
|
---|
357 | virtual void FinalizeViewCells(const bool createMesh);
|
---|
358 |
|
---|
359 | /** Evaluates statistics values on view cells.
|
---|
360 | */
|
---|
361 | void EvaluateRenderStatistics(float &totalRenderCost,
|
---|
362 | float &expectedRenderCost,
|
---|
363 | float &deviation,
|
---|
364 | float &variance,
|
---|
365 | int &totalPvs,
|
---|
366 | float &avgRenderCost);
|
---|
367 |
|
---|
368 |
|
---|
369 | /** Returns hierarchy of the view cells.
|
---|
370 | */
|
---|
371 | ViewCellsTree *GetViewCellsTree();
|
---|
372 |
|
---|
373 | /** Collect candidates for the view cell merge.
|
---|
374 | */
|
---|
375 | virtual void CollectMergeCandidates(const VssRayContainer &rays,
|
---|
376 | vector<MergeCandidate> &candidates);
|
---|
377 |
|
---|
378 | /** Collects n view cells and stores it as the active view cells.
|
---|
379 | */
|
---|
380 | void CollectViewCells(const int n);
|
---|
381 |
|
---|
382 | /** Sets current view cells set to active, i.e., the sampling is done in this view cell set.
|
---|
383 | */
|
---|
384 | void SetViewCellsActive();
|
---|
385 |
|
---|
386 | /** Evaluates render cost statistics of current view cell hierarchy.
|
---|
387 | */
|
---|
388 | virtual void EvalViewCellPartition();
|
---|
389 |
|
---|
390 | /** Sets maximal size of a view cell filter.
|
---|
391 | */
|
---|
392 | void SetMaxFilterSize(const int size);
|
---|
393 |
|
---|
394 | /** Returns maximal filter size.
|
---|
395 | */
|
---|
396 | int GetMaxFilterSize() const;
|
---|
397 |
|
---|
398 | /** Deletes interior nodes from the tree which have negative merge cost set (local merge).
|
---|
399 | */
|
---|
400 | void DeleteLocalMergeTree(ViewCell *vc) const;
|
---|
401 |
|
---|
402 | /** Evaluautes histogram for a given number of view cells.
|
---|
403 | */
|
---|
404 | void EvalViewCellHistogram(const string filename, const int nViewCells);
|
---|
405 |
|
---|
406 | /** Evaluautes histogram for a given number of view cells.
|
---|
407 | */
|
---|
408 | void EvalViewCellHistogramForPvsSize(const string filename, const int nViewCells);
|
---|
409 |
|
---|
410 | /** Evaluates the render cost of a view cell.
|
---|
411 | */
|
---|
412 | float EvalRenderCost(Intersectable *obj) const;
|
---|
413 |
|
---|
414 | /** Sets pvs size of view cell as a scalar. Used when storing pvs only in the leaves
|
---|
415 | of the hierarchy.
|
---|
416 | */
|
---|
417 | void UpdateScalarPvsSize(ViewCell *vc, const int pvsSize, const int entriesInPvs) const;
|
---|
418 |
|
---|
419 | /** Returns bounding box of a view cell.
|
---|
420 | */
|
---|
421 | AxisAlignedBox3 GetViewCellBox(ViewCell *vc);
|
---|
422 |
|
---|
423 | /** Exports bounding boxes of objects to file.
|
---|
424 | */
|
---|
425 | bool ExportBoundingBoxes(const string filename, const ObjectContainer &objects) const;
|
---|
426 |
|
---|
427 | /** Load the bounding boxes into the container.
|
---|
428 | */
|
---|
429 | bool LoadBoundingBoxes(const string filename, IndexedBoundingBoxContainer &boxes) const;
|
---|
430 |
|
---|
431 | /** Returns true if pvs should be exported together with the view cells.
|
---|
432 | */
|
---|
433 | bool GetExportPvs() const;
|
---|
434 |
|
---|
435 | /////////////////////////////
|
---|
436 | // static members
|
---|
437 |
|
---|
438 | /** Loads view cells from file. The view cells manager is created with
|
---|
439 | respect to the loaded view cells.
|
---|
440 |
|
---|
441 | @param filename the filename of the view cells
|
---|
442 | @param objects the scene objects
|
---|
443 | @param finalizeViewCells if the view cells should be post processed, i.e.
|
---|
444 | a mesh is created representing the geometry
|
---|
445 | @param bconverter a conversion routine working with the similarities of bounding
|
---|
446 | boxes: if there is a certain similarity of overlap between bounding boxes, two tested
|
---|
447 | candidate objects are considered to be the same objects
|
---|
448 | @returns the view cells manager if loading was successful, false otherwise
|
---|
449 | */
|
---|
450 | static ViewCellsManager *LoadViewCells(const string &filename,
|
---|
451 | ObjectContainer *objects,
|
---|
452 | const bool finalizeViewCells,
|
---|
453 | BoundingBoxConverter *bconverter = NULL);
|
---|
454 |
|
---|
455 |
|
---|
456 | ////////////////////////////////////////////////////////7
|
---|
457 | // visiblity filter options
|
---|
458 |
|
---|
459 | // TODO: write own visibiltiy filter class
|
---|
460 | void ApplyFilter(KdTree *kdTree,
|
---|
461 | const float viewSpaceFilterSize,
|
---|
462 | const float spatialFilterSize);
|
---|
463 |
|
---|
464 | void ApplySpatialFilter(KdTree *kdTree,
|
---|
465 | const float spatialFilterSize,
|
---|
466 | ObjectPvs &pvs);
|
---|
467 |
|
---|
468 | void ApplyFilter(ViewCell *viewCell,
|
---|
469 | KdTree *kdTree,
|
---|
470 | const float viewSpaceFilterSize,
|
---|
471 | const float spatialFilterSize,
|
---|
472 | ObjectPvs &pvs);
|
---|
473 |
|
---|
474 | float GetFilterWidth();
|
---|
475 |
|
---|
476 | float GetAbsFilterWidth();
|
---|
477 |
|
---|
478 | /** Returns the bounding box of filter width.
|
---|
479 | */
|
---|
480 | AxisAlignedBox3 GetFilterBBox(const Vector3 &viewPoint, const float width) const;
|
---|
481 |
|
---|
482 | //////////////////////////////////////////////////////////////////
|
---|
483 |
|
---|
484 |
|
---|
485 | /** Returns true if the view cell is equivalent to a
|
---|
486 | node of the spatial hierarchy. This function can be used for merged
|
---|
487 | view cell.
|
---|
488 | e.g. to see if the spatial tree can be reduced on this location
|
---|
489 | note: not implemented
|
---|
490 | */
|
---|
491 | virtual bool EqualToSpatialNode(ViewCell *viewCell) const;
|
---|
492 |
|
---|
493 | /** If true, the kd nodes are stored instead of the object pvs.
|
---|
494 | */
|
---|
495 | void SetStoreKdPvs(const bool storeKdPvs);
|
---|
496 |
|
---|
497 | /** Returns true if the kd nodes are stored instead of the object pvs.
|
---|
498 | **/
|
---|
499 | bool GetStoreKdPVs() const;
|
---|
500 |
|
---|
501 | virtual bool AddSampleToPvs(
|
---|
502 | Intersectable *obj,
|
---|
503 | const Vector3 &hitPoint,
|
---|
504 | ViewCell *vc,
|
---|
505 | const float pdf,
|
---|
506 | float &contribution) const;
|
---|
507 |
|
---|
508 | protected:
|
---|
509 |
|
---|
510 | /** Intersects box with the tree and returns the number of intersected boxes.
|
---|
511 | @returns number of view cells found
|
---|
512 | */
|
---|
513 | virtual int ComputeBoxIntersections(const AxisAlignedBox3 &box,
|
---|
514 | ViewCellContainer &viewCells) const;
|
---|
515 |
|
---|
516 | /** Tests the visibility filter functionality.
|
---|
517 | */
|
---|
518 | virtual void TestFilter(const ObjectContainer &objects) {};
|
---|
519 |
|
---|
520 | /** If the view cells tree was already constructed or not.
|
---|
521 | */
|
---|
522 | bool ViewCellsTreeConstructed() const;
|
---|
523 |
|
---|
524 | /** Requests preprocessor to cast samplesPerPass samples of a specific type.
|
---|
525 | */
|
---|
526 | int CastPassSamples(const int samplesPerPass,
|
---|
527 | const int sampleType,
|
---|
528 | VssRayContainer &vssRays) const;
|
---|
529 |
|
---|
530 | /** Parse the options from the environment file.
|
---|
531 | */
|
---|
532 | void ParseEnvironment();
|
---|
533 |
|
---|
534 | /** Creates unique view cell ids.
|
---|
535 | */
|
---|
536 | void CreateUniqueViewCellIds();
|
---|
537 |
|
---|
538 | /** Finalizes, i.e., creates mesh, volume, area etc. for the view cell.
|
---|
539 | */
|
---|
540 | virtual void Finalize(ViewCell *viewCell, const bool createMesh);
|
---|
541 |
|
---|
542 | /** Recollects view cells and resets statistics.
|
---|
543 | */
|
---|
544 | void ResetViewCells();
|
---|
545 |
|
---|
546 | /** Collects the view cells in the view cell container.
|
---|
547 | */
|
---|
548 | virtual void CollectViewCells() = 0;
|
---|
549 |
|
---|
550 | /** Evaluates view cells statistics and stores it in
|
---|
551 | mViewCellsStatistics.
|
---|
552 | */
|
---|
553 | void EvaluateViewCellsStats();
|
---|
554 |
|
---|
555 |
|
---|
556 | ///////////////////////
|
---|
557 | //-- helper functions for view cell visualization
|
---|
558 |
|
---|
559 | /** Exports the view cell partition.
|
---|
560 | */
|
---|
561 | void ExportViewCellsForViz(
|
---|
562 | Exporter *exporter,
|
---|
563 | const AxisAlignedBox3 *box,
|
---|
564 | const AxisAlignedPlane *clipPlane = NULL) const;
|
---|
565 |
|
---|
566 | /** Sets exporter color.
|
---|
567 | */
|
---|
568 | virtual void ExportColor(Exporter *exporter, ViewCell *vc) const;
|
---|
569 |
|
---|
570 | /** Creates meshes from the view cells.
|
---|
571 | */
|
---|
572 | void CreateViewCellMeshes();
|
---|
573 |
|
---|
574 | /** Creates clip plane for visualization.
|
---|
575 | */
|
---|
576 | void CreateClipPlane();
|
---|
577 |
|
---|
578 | AxisAlignedPlane *GetClipPlane();
|
---|
579 |
|
---|
580 | void ExportMergedViewCells(const ObjectContainer &objects);
|
---|
581 |
|
---|
582 | ///////////////////////
|
---|
583 |
|
---|
584 | /** Returns volume of the view space.
|
---|
585 | */
|
---|
586 | virtual float GetViewSpaceVolume();
|
---|
587 | /** Prepares the view cells for sampling after loading them from disc.
|
---|
588 | */
|
---|
589 | virtual void PrepareLoadedViewCells() {};
|
---|
590 | /** Constructs local view cell merge hierarchy.
|
---|
591 | */
|
---|
592 | ViewCell *ConstructLocalMergeTree(ViewCell *currentViewCell,
|
---|
593 | const ViewCellContainer &viewCells);
|
---|
594 |
|
---|
595 | /** Constructs local view cell merge hierarchy based solely on similarity with the
|
---|
596 | current viewcell
|
---|
597 | */
|
---|
598 | ViewCell *ConstructLocalMergeTree2(ViewCell *currentViewCell,
|
---|
599 | const ViewCellContainer &viewCells);
|
---|
600 |
|
---|
601 | /** Updates pvs of all view cells for statistical evaluation after some more sampling
|
---|
602 | */
|
---|
603 | void UpdatePvsForEvaluation(ViewCell *root, ObjectPvs &pvs);
|
---|
604 |
|
---|
605 |
|
---|
606 | ////////////////////////////////////////////////
|
---|
607 |
|
---|
608 | Preprocessor *mPreprocessor;
|
---|
609 | /// if bounding boxes should be exported together with the view cells
|
---|
610 | bool mExportBboxesForPvs;
|
---|
611 | /// the clip plane for visualization
|
---|
612 | AxisAlignedPlane mClipPlaneForViz;
|
---|
613 | /// if the visualization is using the clip plane
|
---|
614 | bool mUseClipPlaneForViz;
|
---|
615 | /// Renders the view cells.
|
---|
616 | Renderer *mRenderer;
|
---|
617 | /// Loaded view cells
|
---|
618 | ViewCellContainer mViewCells;
|
---|
619 | /// the view cell hierarchy (i.e., the logical description of view cells)
|
---|
620 | ViewCellsTree *mViewCellsTree;
|
---|
621 |
|
---|
622 | /** if the values in the view cell leaves and the interiors are up to date
|
---|
623 | this is meant for lazy storing of the pvs, where only a scalar indicating
|
---|
624 | pvs size is stored in interiors and not the pvs itself.
|
---|
625 | */
|
---|
626 | bool mViewCellPvsIsUpdated;
|
---|
627 |
|
---|
628 | /// maximum number of samples for the view cell construction
|
---|
629 | int mConstructionSamples;
|
---|
630 | int mSamplesPerPass;
|
---|
631 | int mInitialSamples;
|
---|
632 | int mPostProcessSamples;
|
---|
633 | int mVisualizationSamples;
|
---|
634 |
|
---|
635 | float mTotalAreaValid;
|
---|
636 | float mTotalArea;
|
---|
637 |
|
---|
638 | int mMaxPvsSize;
|
---|
639 | int mMinPvsSize;
|
---|
640 | float mMaxPvsRatio;
|
---|
641 |
|
---|
642 | int mSamplingType;
|
---|
643 | int mEvaluationSamplingType;
|
---|
644 | int mNumActiveViewCells;
|
---|
645 | bool mCompressViewCells;
|
---|
646 |
|
---|
647 | /// holds the current view cell statistics
|
---|
648 | ViewCellsStatistics mCurrentViewCellsStats;
|
---|
649 | /// the scene bounding box
|
---|
650 | AxisAlignedBox3 mViewSpaceBox;
|
---|
651 |
|
---|
652 | /// if view cells should be exported
|
---|
653 | bool mExportViewCells;
|
---|
654 |
|
---|
655 | // if only valid view cells should be considered for processing
|
---|
656 | bool mOnlyValidViewCells;
|
---|
657 |
|
---|
658 | /// if rays should be used to collect merge candidates
|
---|
659 | bool mUseRaysForMerge;
|
---|
660 |
|
---|
661 | /// if there should be an additional merge step after the subdivision
|
---|
662 | bool mMergeViewCells;
|
---|
663 |
|
---|
664 | /// the width of the box filter
|
---|
665 | float mFilterWidth;
|
---|
666 | int mMaxFilterSize;
|
---|
667 |
|
---|
668 | bool mStoreObjectPvs;
|
---|
669 |
|
---|
670 | //////////////////
|
---|
671 | //-- visualization options
|
---|
672 |
|
---|
673 | /// color code for view cells visualization
|
---|
674 | bool mShowVisualization;
|
---|
675 | int mColorCode;
|
---|
676 | bool mExportGeometry;
|
---|
677 | bool mExportRays;
|
---|
678 | bool mViewCellsFinished;
|
---|
679 | bool mEvaluateViewCells;
|
---|
680 | int mRenderCostEvaluationType;
|
---|
681 |
|
---|
682 | /// if pvs should be exported with view cells
|
---|
683 | bool mExportPvs;
|
---|
684 |
|
---|
685 | bool mUsePredefinedViewCells;
|
---|
686 | };
|
---|
687 |
|
---|
688 |
|
---|
689 | /** Manages different higher order operations on the view cells.
|
---|
690 | */
|
---|
691 | class BspViewCellsManager: public ViewCellsManager
|
---|
692 | {
|
---|
693 |
|
---|
694 | public:
|
---|
695 | /** Constructor taking the bsp tree and the number of samples
|
---|
696 | used to construct the bsp tree.
|
---|
697 | */
|
---|
698 | BspViewCellsManager(ViewCellsTree *viewCellsTree, BspTree *tree);
|
---|
699 |
|
---|
700 | ~BspViewCellsManager();
|
---|
701 |
|
---|
702 | int ConstructSubdivision(const ObjectContainer &objects,
|
---|
703 | const VssRayContainer &rays);
|
---|
704 |
|
---|
705 | int PostProcess(const ObjectContainer &objects,
|
---|
706 | const VssRayContainer &rays);
|
---|
707 |
|
---|
708 | void Visualize(const ObjectContainer &objects,
|
---|
709 | const VssRayContainer &sampleRays);
|
---|
710 |
|
---|
711 | int GetType() const;
|
---|
712 |
|
---|
713 | ViewCell *GenerateViewCell(Mesh *mesh = NULL) const;
|
---|
714 |
|
---|
715 | bool ViewCellsConstructed() const;
|
---|
716 |
|
---|
717 | //void PrintStatistics(ostream &s) const;
|
---|
718 |
|
---|
719 | int CastLineSegment(const Vector3 &origin,
|
---|
720 | const Vector3 &termination,
|
---|
721 | ViewCellContainer &viewcells);
|
---|
722 |
|
---|
723 | /** Returns the probability that the view point lies
|
---|
724 | in this view cells.
|
---|
725 | */
|
---|
726 | float GetProbability(ViewCell *viewCell);
|
---|
727 |
|
---|
728 | /** Get a viewcell containing the specified point.
|
---|
729 | */
|
---|
730 | ViewCell *GetViewCell(const Vector3 &point, const bool active = false) const;
|
---|
731 |
|
---|
732 | /** Creates mesh for this view cell.
|
---|
733 | */
|
---|
734 | void CreateMesh(ViewCell *vc);
|
---|
735 |
|
---|
736 | void ExportViewCellGeometry(Exporter *exporter,
|
---|
737 | ViewCell *vc,
|
---|
738 | const AxisAlignedBox3 *box,
|
---|
739 | const AxisAlignedPlane *clipPlane = NULL
|
---|
740 | ) const;
|
---|
741 |
|
---|
742 | void CollectMergeCandidates(const VssRayContainer &rays,
|
---|
743 | vector<MergeCandidate> &candidates);
|
---|
744 |
|
---|
745 | void Finalize(ViewCell *viewCell, const bool createMesh);
|
---|
746 |
|
---|
747 | bool ExportViewCells(const string filename,
|
---|
748 | const bool exportPvs,
|
---|
749 | const ObjectContainer &objects);
|
---|
750 |
|
---|
751 | /** Constructs merge hierarchy which corresponds to the spatial hierarchy.
|
---|
752 | */
|
---|
753 | ViewCell *ConstructSpatialMergeTree(BspNode *root);
|
---|
754 |
|
---|
755 |
|
---|
756 | protected:
|
---|
757 |
|
---|
758 | void CollectViewCells();
|
---|
759 |
|
---|
760 | /// the BSP tree.
|
---|
761 | BspTree *mBspTree;
|
---|
762 | vector<BspRay *> mBspRays;
|
---|
763 |
|
---|
764 | private:
|
---|
765 |
|
---|
766 | /** Constructs a spatial merge tree only 2 levels deep.
|
---|
767 | */
|
---|
768 | ViewCell *ConstructDummyMergeTree(BspNode *root);
|
---|
769 |
|
---|
770 | /** Exports visualization of the BSP splits.
|
---|
771 | */
|
---|
772 | void ExportSplits(const ObjectContainer &objects);
|
---|
773 |
|
---|
774 | /** Exports visualization of the BSP PVS.
|
---|
775 | */
|
---|
776 | void ExportBspPvs(const ObjectContainer &objects);
|
---|
777 |
|
---|
778 | /** test if subdivision is valid in terms of volume / area.
|
---|
779 | */
|
---|
780 | void TestSubdivision();
|
---|
781 | };
|
---|
782 |
|
---|
783 |
|
---|
784 | /**
|
---|
785 | Manages different higher order operations on the KD type view cells.
|
---|
786 | */
|
---|
787 | class KdViewCellsManager: public ViewCellsManager
|
---|
788 | {
|
---|
789 |
|
---|
790 | public:
|
---|
791 |
|
---|
792 | KdViewCellsManager(ViewCellsTree *viewCellsTree, KdTree *tree);
|
---|
793 |
|
---|
794 | int ConstructSubdivision(const ObjectContainer &objects,
|
---|
795 | const VssRayContainer &rays);
|
---|
796 |
|
---|
797 | int CastLineSegment(const Vector3 &origin,
|
---|
798 | const Vector3 &termination,
|
---|
799 | ViewCellContainer &viewcells);
|
---|
800 |
|
---|
801 | int PostProcess(const ObjectContainer &objects,
|
---|
802 | const VssRayContainer &rays);
|
---|
803 |
|
---|
804 | void Visualize(const ObjectContainer &objects,
|
---|
805 | const VssRayContainer &sampleRays);
|
---|
806 |
|
---|
807 | int GetType() const;
|
---|
808 |
|
---|
809 | bool ViewCellsConstructed() const;
|
---|
810 |
|
---|
811 | ViewCell *GenerateViewCell(Mesh *mesh) const;
|
---|
812 |
|
---|
813 | /** Prints out statistics of this approach.
|
---|
814 | */
|
---|
815 | // virtual void PrintStatistics(ostream &s) const;
|
---|
816 | ViewCell *GetViewCell(const Vector3 &point, const bool active = false) const
|
---|
817 | { return NULL; }
|
---|
818 |
|
---|
819 | float GetProbability(ViewCell *viewCell);
|
---|
820 |
|
---|
821 | void CreateMesh(ViewCell *vc);
|
---|
822 |
|
---|
823 | void ExportViewCellGeometry(
|
---|
824 | Exporter *exporter,
|
---|
825 | ViewCell *vc,
|
---|
826 | const AxisAlignedBox3 *box,
|
---|
827 | const AxisAlignedPlane *clipPlane = NULL
|
---|
828 | ) const;
|
---|
829 |
|
---|
830 |
|
---|
831 | void CollectMergeCandidates(const VssRayContainer &rays,
|
---|
832 | vector<MergeCandidate> &candidates);
|
---|
833 |
|
---|
834 |
|
---|
835 | protected:
|
---|
836 |
|
---|
837 | /** Collects view cells from a hierarchy.
|
---|
838 | */
|
---|
839 | void CollectViewCells();
|
---|
840 |
|
---|
841 | KdNode *GetNodeForPvs(KdLeaf *leaf);
|
---|
842 |
|
---|
843 |
|
---|
844 | /// the BSP tree.
|
---|
845 | KdTree *mKdTree;
|
---|
846 |
|
---|
847 | /// depth of the KD tree nodes with represent the view cells
|
---|
848 | int mKdPvsDepth;
|
---|
849 |
|
---|
850 |
|
---|
851 | };
|
---|
852 |
|
---|
853 | /**
|
---|
854 | Manages different higher order operations on the view cells.
|
---|
855 | */
|
---|
856 | class VspBspViewCellsManager: public ViewCellsManager
|
---|
857 | {
|
---|
858 |
|
---|
859 | public:
|
---|
860 |
|
---|
861 | VspBspViewCellsManager(ViewCellsTree *viewCellsTree, VspBspTree *tree);
|
---|
862 | ~VspBspViewCellsManager();
|
---|
863 |
|
---|
864 | int ConstructSubdivision(const ObjectContainer &objects,
|
---|
865 | const VssRayContainer &rays);
|
---|
866 |
|
---|
867 | int PostProcess(const ObjectContainer &objects,
|
---|
868 | const VssRayContainer &rays);
|
---|
869 |
|
---|
870 | void Visualize(const ObjectContainer &objects,
|
---|
871 | const VssRayContainer &sampleRays);
|
---|
872 |
|
---|
873 | int GetType() const;
|
---|
874 |
|
---|
875 | ViewCell *GenerateViewCell(Mesh *mesh = NULL) const;
|
---|
876 |
|
---|
877 | bool ViewCellsConstructed() const;
|
---|
878 |
|
---|
879 |
|
---|
880 | int CastLineSegment(const Vector3 &origin,
|
---|
881 | const Vector3 &termination,
|
---|
882 | ViewCellContainer &viewcells);
|
---|
883 |
|
---|
884 | float GetProbability(ViewCell *viewCell);
|
---|
885 |
|
---|
886 | ViewCell *GetViewCell(const Vector3 &point, const bool active = false) const;
|
---|
887 |
|
---|
888 | bool GetViewPoint(Vector3 &viewPoint) const;
|
---|
889 |
|
---|
890 | bool ViewPointValid(const Vector3 &viewPoint) const;
|
---|
891 |
|
---|
892 | void CreateMesh(ViewCell *vc);
|
---|
893 |
|
---|
894 | bool ExportViewCells(
|
---|
895 | const string filename,
|
---|
896 | const bool exportPvs,
|
---|
897 | const ObjectContainer &objects);
|
---|
898 |
|
---|
899 | int CastBeam(Beam &beam);
|
---|
900 |
|
---|
901 | void ExportViewCellGeometry(
|
---|
902 | Exporter *exporter,
|
---|
903 | ViewCell *vc,
|
---|
904 | const AxisAlignedBox3 *box,
|
---|
905 | const AxisAlignedPlane *clipPlane = NULL
|
---|
906 | ) const;
|
---|
907 |
|
---|
908 |
|
---|
909 | void Finalize(ViewCell *viewCell, const bool createMesh);
|
---|
910 |
|
---|
911 | void CollectMergeCandidates(const VssRayContainer &rays, vector<MergeCandidate> &candidates);
|
---|
912 |
|
---|
913 | /** Returns true if this view cell is equivavalent to a spatial node.
|
---|
914 | */
|
---|
915 | bool EqualToSpatialNode(ViewCell *viewCell) const;
|
---|
916 |
|
---|
917 |
|
---|
918 | protected:
|
---|
919 |
|
---|
920 | int ComputeBoxIntersections(const AxisAlignedBox3 &box, ViewCellContainer &viewCells) const;
|
---|
921 |
|
---|
922 | /** Returns node of the spatial hierarchy corresponding to the view cell
|
---|
923 | if such a node exists.
|
---|
924 | */
|
---|
925 | BspNode *GetSpatialNode(ViewCell *viewCell) const;
|
---|
926 |
|
---|
927 | /** Merges view cells according to some criteria
|
---|
928 | */
|
---|
929 | void MergeViewCells(const VssRayContainer &rays,
|
---|
930 | const ObjectContainer &objects);
|
---|
931 |
|
---|
932 | void RefineViewCells(const VssRayContainer &rays, const ObjectContainer &objects);
|
---|
933 |
|
---|
934 | void CollectViewCells();
|
---|
935 |
|
---|
936 | /** Returns maximal depth difference of view cell
|
---|
937 | leaves in tree.
|
---|
938 | */
|
---|
939 | int GetMaxTreeDiff(ViewCell *vc) const;
|
---|
940 |
|
---|
941 | /** Prepare view cells for use after loading them from disc.
|
---|
942 | */
|
---|
943 | void PrepareLoadedViewCells();
|
---|
944 |
|
---|
945 | /** Constructs merge hierarchy which corresponds to the spatial hierarchy.
|
---|
946 | */
|
---|
947 | ViewCell *ConstructSpatialMergeTree(BspNode *root);
|
---|
948 |
|
---|
949 | /// HACK for testing visibility filter functionality
|
---|
950 | void TestFilter(const ObjectContainer &objects);
|
---|
951 |
|
---|
952 | /** Visualization of the pvs difference to exact visubility using
|
---|
953 | from point queries.
|
---|
954 | */
|
---|
955 | void VisualizeWithFromPointQueries();
|
---|
956 |
|
---|
957 | /** Evaluate from point queries for the current scene.
|
---|
958 | */
|
---|
959 | void EvalFromPointQueries();
|
---|
960 |
|
---|
961 | /** Exports visualization of the BSP splits.
|
---|
962 | */
|
---|
963 | void ExportSplits(const ObjectContainer &objects,
|
---|
964 | const VssRayContainer &rays);
|
---|
965 |
|
---|
966 | /** Exports visualization of the BSP PVS.
|
---|
967 | */
|
---|
968 | void ExportBspPvs(const ObjectContainer &objects,
|
---|
969 | const VssRayContainer &rays);
|
---|
970 |
|
---|
971 |
|
---|
972 | /// the view space partition BSP tree.
|
---|
973 | VspBspTree *mVspBspTree;
|
---|
974 |
|
---|
975 |
|
---|
976 | private:
|
---|
977 |
|
---|
978 | /** test if subdivision is valid in terms of volume / area.
|
---|
979 | */
|
---|
980 | void TestSubdivision();
|
---|
981 | };
|
---|
982 |
|
---|
983 | #define TEST_EVALUATION 0
|
---|
984 |
|
---|
985 | /**
|
---|
986 | Manages different higher order operations on the view cells.
|
---|
987 | */
|
---|
988 | class VspOspViewCellsManager: public ViewCellsManager
|
---|
989 | {
|
---|
990 |
|
---|
991 | public:
|
---|
992 |
|
---|
993 | VspOspViewCellsManager(ViewCellsTree *vcTree, HierarchyManager *hm);
|
---|
994 |
|
---|
995 | ~VspOspViewCellsManager();
|
---|
996 |
|
---|
997 | int ConstructSubdivision(const ObjectContainer &objects,
|
---|
998 | const VssRayContainer &rays);
|
---|
999 |
|
---|
1000 | int PostProcess(const ObjectContainer &objects,
|
---|
1001 | const VssRayContainer &rays);
|
---|
1002 |
|
---|
1003 | void Visualize(const ObjectContainer &objects,
|
---|
1004 | const VssRayContainer &sampleRays);
|
---|
1005 |
|
---|
1006 | int GetType() const;
|
---|
1007 |
|
---|
1008 | ViewCell *GenerateViewCell(Mesh *mesh = NULL) const;
|
---|
1009 |
|
---|
1010 | bool ViewCellsConstructed() const;
|
---|
1011 |
|
---|
1012 |
|
---|
1013 | int CastLineSegment(const Vector3 &origin,
|
---|
1014 | const Vector3 &termination,
|
---|
1015 | ViewCellContainer &viewcells);
|
---|
1016 |
|
---|
1017 | float GetProbability(ViewCell *viewCell);
|
---|
1018 |
|
---|
1019 | ViewCell *GetViewCell(const Vector3 &point, const bool active = false) const;
|
---|
1020 |
|
---|
1021 | bool GetViewPoint(Vector3 &viewPoint) const;
|
---|
1022 |
|
---|
1023 | bool ViewPointValid(const Vector3 &viewPoint) const;
|
---|
1024 |
|
---|
1025 | void CreateMesh(ViewCell *vc);
|
---|
1026 |
|
---|
1027 | bool ExportViewCells(const string filename,
|
---|
1028 | const bool exportPvs,
|
---|
1029 | const ObjectContainer &objects);
|
---|
1030 |
|
---|
1031 | int CastBeam(Beam &beam);
|
---|
1032 |
|
---|
1033 | void Finalize(ViewCell *viewCell, const bool createMesh);
|
---|
1034 |
|
---|
1035 | /** Stores sample contribution for kd cells or objects.
|
---|
1036 | */
|
---|
1037 | virtual float ComputeSampleContribution(VssRay &ray,
|
---|
1038 | const bool addRays,
|
---|
1039 | const bool storeViewCells);
|
---|
1040 |
|
---|
1041 | ViewCellsManager *LoadViewCells(const string &filename,
|
---|
1042 | ObjectContainer *objects,
|
---|
1043 | const bool finalizeViewCells,
|
---|
1044 | BoundingBoxConverter *bconverter);
|
---|
1045 |
|
---|
1046 | bool AddSampleToPvs(
|
---|
1047 | Intersectable *obj,
|
---|
1048 | const Vector3 &hitPoint,
|
---|
1049 | ViewCell *vc,
|
---|
1050 | const float pdf,
|
---|
1051 | float &contribution) const;
|
---|
1052 |
|
---|
1053 | protected:
|
---|
1054 |
|
---|
1055 | #if TEST_EVALUATION
|
---|
1056 | virtual void EvalViewCellPartition();
|
---|
1057 | #endif
|
---|
1058 |
|
---|
1059 | /** Exports view cell geometry.
|
---|
1060 | */
|
---|
1061 | void ExportViewCellGeometry(
|
---|
1062 | Exporter *exporter,
|
---|
1063 | ViewCell *vc,
|
---|
1064 | const AxisAlignedBox3 *box,
|
---|
1065 | const AxisAlignedPlane *clipPlane = NULL
|
---|
1066 | ) const;
|
---|
1067 |
|
---|
1068 | int ComputeBoxIntersections(
|
---|
1069 | const AxisAlignedBox3 &box,
|
---|
1070 | ViewCellContainer &viewCells) const;
|
---|
1071 |
|
---|
1072 | void CollectViewCells();
|
---|
1073 |
|
---|
1074 | /** Prepare view cells for use after loading them from disc.
|
---|
1075 | */
|
---|
1076 | void PrepareLoadedViewCells();
|
---|
1077 |
|
---|
1078 | /** Constructs merge hierarchy which corresponds to the spatial hierarchy.
|
---|
1079 | */
|
---|
1080 | ViewCell *ConstructSpatialMergeTree(VspNode *root);
|
---|
1081 |
|
---|
1082 | /** Exports visualization of the PVS.
|
---|
1083 | */
|
---|
1084 | void ExportPvs(
|
---|
1085 | const ObjectContainer &objects,
|
---|
1086 | const VssRayContainer &rays);
|
---|
1087 |
|
---|
1088 |
|
---|
1089 | /////////////////////////////////////////
|
---|
1090 |
|
---|
1091 | HierarchyManager *mHierarchyManager;
|
---|
1092 | };
|
---|
1093 |
|
---|
1094 |
|
---|
1095 | }
|
---|
1096 |
|
---|
1097 | #endif
|
---|