Changeset 2602 for GTP/trunk/Lib/Vis/Preprocessing/src/HavranRayCaster.cpp
- Timestamp:
- 01/16/08 21:30:29 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/HavranRayCaster.cpp
r2599 r2602 92 92 // We give a box to which each ray is clipped to before the 93 93 // ray shooting is computed ! 94 void HavranRayCaster::CastRaysPacket4(const Vector3 & boxmax,95 const Vector3 &boxmin,96 97 98 99 100 { 101 #if defined(_USE_HAVRAN_SSE)102 #ifdef USE_HAVRAN_RAYCASTER94 void HavranRayCaster::CastRaysPacket4(const Vector3 &minBox, 95 const Vector3 &maxBox, 96 const Vector3 origin4[], 97 const Vector3 direction4[], 98 int result4[], 99 float dist4[]) 100 { 101 #ifdef USE_HAVRAN_RAYCASTER 102 #ifdef _USE_HAVRAN_SSE 103 103 for (int i = 0; i < 4; i++) { 104 104 result4[i] = -1; 105 // raypack.SetObject(i, NULL);106 105 raypack.SetLoc(i, origin4[i]); 107 106 raypack.SetDir(i, direction4[i]); … … 111 110 // a particular ASDS, otherwise it is emulated by decomposition 112 111 // of a packet to individual rays and traced individually. 113 mKtbtree->FindNearestI(raypack, (Vector3&)boxmin, (Vector3&)boxmax); 114 // mKtbtree->FindNearestI(raypack, bmin, bmax); 112 mKtbtree->FindNearestI(raypack, minBox, maxBox); 115 113 116 114 for (int i = 0; i < 4; i++) { … … 120 118 if ( (intersectable = raypack.GetObject(i)) ) { 121 119 // $$JB this is very hacky - > should be replaced with fetching the index of the triangle 120 // $$VH - this is object ID - is this the triangle index ??? 122 121 result4[i] = intersectable->mId; 123 122 dist4[i] = raypack.GetT(i); … … 126 125 127 126 return; 128 #endif // USE_HAVRAN_RAYCASTER129 127 #else // _USE_HAVRAN_SSE 130 128 // Compute the result ray by ray … … 133 131 sray.mOrigin = origin4[i]; 134 132 sray.mDirection = direction4[i]; 135 mKtbtree->FindNearestI(sray, (Vector3&)boxmin, (Vector3&)boxmax);133 mKtbtree->FindNearestI(sray, minBox, maxBox); 136 134 if (SimpleRay::IntersectionRes[0].intersectable) { 137 135 // This is object ID - is this the triangle index ??? … … 145 143 146 144 #endif // _USE_HAVRAN_SSE 145 #endif // USE_HAVRAN_RAYCASTER 147 146 } 148 147
Note: See TracChangeset
for help on using the changeset viewer.