Changeset 1012 for GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.h
- Timestamp:
- 06/13/06 08:03:35 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.h
r1011 r1012 144 144 class VspNode 145 145 { 146 147 146 public: 147 148 // types of vsp nodes 149 enum {Interior, Leaf}; 150 148 151 VspNode(); 149 152 virtual ~VspNode(){}; … … 154 157 */ 155 158 virtual bool IsLeaf() const = 0; 159 160 virtual int Type() const; 156 161 157 162 /** Determines whether this node is a root … … 215 220 bool IsLeaf() const; 216 221 222 int Type() const; 223 217 224 VspNode *GetBack(); 218 225 VspNode *GetFront(); … … 221 228 */ 222 229 AxisAlignedPlane GetPlane() const; 230 231 /** Returns position of split plane. 232 */ 233 float GetPosition() const; 234 235 /** Returns split axis. 236 */ 237 int GetAxis() const; 223 238 224 239 /** Replace front or back child with new child. … … 234 249 } 235 250 251 AxisAlignedBox3 GetBox() const; 252 void SetBox(const AxisAlignedBox3 &box); 253 236 254 protected: 255 256 AxisAlignedBox3 mBox; 237 257 238 258 /// Splitting plane corresponding to this node … … 263 283 bool IsLeaf() const; 264 284 285 virtual int Type() const; 286 265 287 /** Returns pointer of view cell. 266 288 */ … … 414 436 415 437 438 /** Struct for traversing line segment. 439 */ 440 struct LineTraversalData 441 { 442 VspNode *mNode; 443 Vector3 mExitPoint; 444 445 float mMaxT; 446 447 LineTraversalData () {} 448 LineTraversalData (VspNode *n, const Vector3 &p, const float maxt): 449 mNode(n), mExitPoint(p), mMaxT(maxt) {} 450 }; 451 416 452 typedef std::priority_queue<VspOspTraversalData> VspOspTraversalQueue; 417 453 418 454 /** candidate for a view space split 455 */ 419 456 struct VspOspSplitCandidate 420 457 { … … 466 503 const VspTreeStatistics &GetStatistics() const; 467 504 505 /** Returns bounding box of the specified node. 506 */ 507 AxisAlignedBox3 GetBBox(VspNode *node) const; 468 508 469 509 /** Constructs the tree from a given set of rays. … … 506 546 /** finds neighbouring leaves of this tree node. 507 547 */ 508 int FindNeighbors(Vsp Node*n,548 int FindNeighbors(VspLeaf *n, 509 549 vector<VspLeaf *> &neighbors, 510 550 const bool onlyUnmailed) const; … … 594 634 @returns number of view cells found 595 635 */ 596 int ComputeBoxIntersections(const AxisAlignedBox3 &box, ViewCellContainer &viewCells) const; 636 int ComputeBoxIntersections(const AxisAlignedBox3 &box, 637 ViewCellContainer &viewCells) const; 597 638 598 639 // pointer to the hierarchy of view cells
Note: See TracChangeset
for help on using the changeset viewer.