- Timestamp:
- 10/09/06 15:57:28 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/IntersectableWrapper.cpp
r1344 r1586 55 55 } 56 56 57 int 58 TriangleIntersectable::GetRandomSurfacePoint(Vector3 &point, Vector3 &normal) 59 { 60 // random barycentric coordinates 61 const float a = RandomValue(0, 1); 62 const float b = RandomValue(0, 1); 63 const float c = 1.0 - a - b; 64 65 point = mItem.mVertices[0] + a * (mItem.mVertices[1] - mItem.mVertices[0]) + 66 mItem.mVertices[0] + b * (mItem.mVertices[2] - mItem.mVertices[0]) + 67 mItem.mVertices[1] + c * (mItem.mVertices[2] - mItem.mVertices[1]); 68 69 normal = mItem.GetNormal(); 70 71 return 0; 72 } 73 57 74 58 75 }
Note: See TracChangeset
for help on using the changeset viewer.