Changeset 241 for trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.h
- Timestamp:
- 08/16/05 20:30:53 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.h
r240 r241 4 4 #include "Mesh.h" 5 5 #include "Containers.h" 6 7 6 8 #include <queue> 7 9 #include <stack> … … 19 21 */ 20 22 typedef std::vector<Polygon3 *> PolygonContainer; 23 24 struct BspRayTraversalData 25 { 26 BspNode *mNode; 27 Vector3 mExitPoint; 28 float mMaxT; 29 30 BspRayTraversalData() {} 31 32 BspRayTraversalData(BspNode *n, const Vector3 &p, const float maxt): 33 mNode(n), mExitPoint(p), mMaxT(maxt) 34 {} 35 }; 21 36 22 37 class BspTreeStatistics // TODO: should have common superclass with KdTreeStatistics … … 299 314 Plane3 SelectPlaneHeuristics(PolygonContainer *polygons, int maxTests) const; 300 315 301 /** Extracts the meshes of the objects and copies them into the mesh. 302 */ 303 static void Copy2PolygonSoup(const ObjectContainer &objects, PolygonContainer &polys, int maxPolys); 304 305 /** copy this mesh into polygons. 306 */ 307 static void CopyMesh2Polygons(Mesh *mesh, PolygonContainer &polys); 316 /** Extracts the meshes of the objects and copies them into the mesh. Also calculcates the bounding box of the tree. 317 @param maxPolys the maximal number of objects to be stored as polygons 318 */ 319 void Copy2PolygonSoup(const ObjectContainer &objects, PolygonContainer &polys, int maxObjects); 320 321 /** Add this mesh as polygons to polygon container. 322 */ 323 void AddMesh2Polygons(Mesh *mesh, PolygonContainer &polys); 324 325 /** A ray is cast possible intersecting the tree. 326 @param the ray that is cast. 327 @returns the number of intersections with objects stored in the tree. 328 */ 329 int CastRay(Ray &ray); 308 330 309 331 /// Pointer to the root of the tree … … 321 343 /// Strategies for choosing next split plane. 322 344 enum {NEXT_POLYGON, LEAST_SPLITS, BALANCED_TREE, COMBINED}; 345 346 /// box around the whole view domain 347 AxisAlignedBox3 mBox; 323 348 324 349 public:
Note: See TracChangeset
for help on using the changeset viewer.