Changeset 1696 for GTP/trunk/Lib/Vis/Preprocessing/src/Intersectable.h
- Timestamp:
- 10/29/06 18:17:38 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Intersectable.h
r1687 r1696 48 48 BvhLeaf *mBvhLeaf; 49 49 //BvhNode *mBvhLeaf; 50 /// some rays piercing this intersectable 51 VssRayContainer mVssRays; 52 50 53 51 /// # of references to this instance 54 52 int mReferences; 55 53 56 54 ////////////////// 57 // note matt: delete these, they are only taking memory +55 // note matt: delete these, they are only taking memory 58 56 59 57 … … 77 75 }; 78 76 79 Intersectable(): mMailbox(0), mReferences(0), mBvhLeaf(0) {}77 Intersectable(): mMailbox(0), mReferences(0), mBvhLeaf(0), mVssRays(NULL) {} 80 78 81 79 virtual Intersectable::~Intersectable() {}; … … 114 112 115 113 virtual int GetRandomVisibleSurfacePoint(Vector3 &point, 116 Vector3 &normal,117 const Vector3 &viewpoint,118 114 Vector3 &normal, 115 const Vector3 &viewpoint, 116 const int maxTries) = 0; 119 117 120 118 virtual ostream &Describe(ostream &s) = 0; … … 160 158 } 161 159 162 /** returns normal from the face with the specified index.163 PROBLEM: Does not fit to all intersectable types (e.g., spheres)160 /** Returns normal from the face with the specified index. 161 PROBLEM: Does not fit to all intersectable types (e.g., spheres) 164 162 */ 165 163 virtual Vector3 GetNormal(const int idx) const { return Vector3(0, 0, 0); } 164 165 VssRayContainer *GetOrCreateRays() 166 { 167 if (!mVssRays) 168 mVssRays = new VssRayContainer(); 169 return mVssRays; 170 } 171 172 void DelRayRefs() 173 { 174 DEL_PTR(mVssRays); 175 } 176 177 protected: 178 179 /// some rays piercing this intersectable 180 VssRayContainer *mVssRays; 166 181 }; 167 182
Note: See TracChangeset
for help on using the changeset viewer.