Revision 239,
1.4 KB
checked in by mattausch, 19 years ago
(diff) |
removed debug stuff. viewcell insertion working
|
Line | |
---|
1 | #ifndef _ViewCell_H__ |
---|
2 | #define _ViewCell_H__ |
---|
3 | |
---|
4 | #include "Intersectable.h" |
---|
5 | #include "Containers.h" |
---|
6 | |
---|
7 | class Mesh; |
---|
8 | |
---|
9 | //namespace GtpVisibilityPreprocessor { |
---|
10 | |
---|
11 | class BspInterior; |
---|
12 | class BspPvs; |
---|
13 | /** |
---|
14 | View cell represented as a mesh |
---|
15 | */ |
---|
16 | class ViewCell: public Intersectable |
---|
17 | { |
---|
18 | public: |
---|
19 | /** Default constructor taking a mesh which represents the shape of |
---|
20 | the viewcell. |
---|
21 | */ |
---|
22 | ViewCell(Mesh *mesh); |
---|
23 | |
---|
24 | /** Returns pointer to the mesh which represents the shape of the viewcell. |
---|
25 | */ |
---|
26 | Mesh *GetMesh(); |
---|
27 | |
---|
28 | /** Returns pointer to PVS. |
---|
29 | @returns PVS, i.e., the visible BSP tree nodes. |
---|
30 | */ |
---|
31 | BspPvs *GetPVS(); |
---|
32 | |
---|
33 | AxisAlignedBox3 GetBox();
|
---|
34 |
|
---|
35 | int CastRay(Ray &ray);
|
---|
36 |
|
---|
37 | bool IsConvex(); |
---|
38 | bool IsWatertight(); |
---|
39 | float IntersectionComplexity(); |
---|
40 | |
---|
41 | int Type() const;
|
---|
42 |
|
---|
43 | void GetRandomSurfacePoint(Vector3 &point, Vector3 &normal); |
---|
44 | |
---|
45 | /** Derives viewcells from object container. |
---|
46 | @param objects the intersectables the viewcells are derived from |
---|
47 | @param viewCells the viewcells are returned in this container |
---|
48 | @param maxViewCells if > 0, indicates the maximim number of viewcells that will be created |
---|
49 | */ |
---|
50 | static void DeriveViewCells(const ObjectContainer &objects, |
---|
51 | ViewCellContainer &viewCells, |
---|
52 | const int maxViewCells); |
---|
53 | protected: |
---|
54 | |
---|
55 | /// the mesh defining the geometry of this viewcell |
---|
56 | Mesh *mMesh; |
---|
57 | /// the PVS (i.e., the visible bsp tree nodes) |
---|
58 | BspPvs *mPvs; |
---|
59 | |
---|
60 | }; |
---|
61 | |
---|
62 | //}; // GtpVisibilityPreprocessor |
---|
63 | |
---|
64 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.