Changeset 5711 in orxonox.OLD for branches/collision_detection/src
- Timestamp:
- Nov 22, 2005, 5:44:16 PM (19 years ago)
- Location:
- branches/collision_detection/src
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/collision_detection/src/lib/collision_detection/obb_tree_node.cc
r5710 r5711 42 42 * standard constructor 43 43 */ 44 OBBTreeNode::OBBTreeNode (const OBBTree* tree) 44 OBBTreeNode::OBBTreeNode (const OBBTree* tree) 45 45 : BVTreeNode() 46 46 { … … 111 111 * on the triangle informations (triangle soup not polygon soup) 112 112 */ 113 void OBBTreeNode::spawnBVTree(const int depth, const modelInfo& modelInf, 113 void OBBTreeNode::spawnBVTree(const int depth, const modelInfo& modelInf, 114 114 const int* triangleIndexes, unsigned int length) 115 115 { … … 119 119 this->depth = depth; 120 120 121 this->bvElement = new OBB(); 121 this->bvElement = new OBB(); 122 122 this->bvElement->modelInf = &modelInf; 123 123 this->bvElement->triangleIndexes = triangleIndexes; 124 124 this->bvElement->numTriangles = length; 125 125 126 126 /* create the boxes in three steps */ 127 127 this->calculateBoxCovariance(this->bvElement, modelInf, triangleIndexes, length); … … 173 173 // PRINTF(3)("OBB Depth: %i, tree index: %i, numVertices: %i\n", depth, treeIndex, length); 174 174 // this->depth = depth; 175 // 176 // 175 // 176 // 177 177 // this->bvElement = new OBB(); 178 178 // this->bvElement->vertices = verticesList; … … 185 185 // this->calculateBoxAxis(this->bvElement, verticesList, length); 186 186 // PRINTF(3)("Calculated attributes3\n"); 187 // 188 // 189 // 187 // 188 // 189 // 190 190 // if( likely( this->depth > 0)) 191 191 // { 192 192 // this->forkBox(this->bvElement); 193 // 194 // 193 // 194 // 195 195 // if(this->tmpLen1 > 2) 196 196 // { … … 203 203 // PRINTF(3)("Aboarding tree walk: less than 3 vertices left\n"); 204 204 // } 205 // 205 // 206 206 // if( this->tmpLen2 > 2) 207 207 // { … … 218 218 219 219 220 void OBBTreeNode::calculateBoxCovariance(OBB* box, const modelInfo& modelInf, 220 void OBBTreeNode::calculateBoxCovariance(OBB* box, const modelInfo& modelInf, 221 221 const int* triangleIndexes, unsigned int length) 222 222 { 223 223 const sVec3D* verticesList; 224 224 225 225 PRINTF(3)("Created OBBox\n"); 226 226 227 227 float facelet[length]; //!< surface area of the i'th triangle of the convex hull 228 228 float face = 0.0f; //!< surface area of the entire convex hull … … 235 235 236 236 237 237 238 238 /* fist compute all the convex hull face/facelets and centroids */ 239 239 for( int i = 0; i < length ; ++i) … … 262 262 263 263 264 /* now calculate the covariance matrix - if not written in three for-loops, 264 /* now calculate the covariance matrix - if not written in three for-loops, 265 265 it would compute faster: minor */ 266 266 for( int j = 0; j < 3; ++j) … … 281 281 PRINTF(3)("-- Calculated Covariance\n"); 282 282 283 283 284 284 PRINTF(3)("\nVertex Data:\n"); 285 285 for(int i = 0; i < length; i++) … … 297 297 } 298 298 box->center = center; 299 299 300 300 PRINTF(3)("-- Written Result to OBB\n"); 301 301 } 302 302 303 303 304 void OBBTreeNode::calculateBoxEigenvectors(OBB* box, const modelInfo& modInfo, 304 void OBBTreeNode::calculateBoxEigenvectors(OBB* box, const modelInfo& modInfo, 305 305 const int* triangleIndexes, unsigned int length) 306 306 {} … … 640 640 bool OBBTreeNode::overlapTest(OBB* boxA, OBB* boxB, WorldEntity* nodeA, WorldEntity* nodeB) 641 641 { 642 if( boxB == NULL || boxA == NULL) 643 return false; 644 642 645 /* first check all axis */ 643 646 Vector t; -
branches/collision_detection/src/lib/event/Makefile.in
r5674 r5711 210 210 esac; \ 211 211 done; \ 212 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/event/Makefile'; \212 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/event/Makefile'; \ 213 213 cd $(top_srcdir) && \ 214 $(AUTOMAKE) -- gnusrc/lib/event/Makefile214 $(AUTOMAKE) --foreign src/lib/event/Makefile 215 215 .PRECIOUS: Makefile 216 216 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
branches/collision_detection/src/lib/graphics/Makefile.in
r5674 r5711 227 227 esac; \ 228 228 done; \ 229 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/graphics/Makefile'; \229 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/graphics/Makefile'; \ 230 230 cd $(top_srcdir) && \ 231 $(AUTOMAKE) -- gnusrc/lib/graphics/Makefile231 $(AUTOMAKE) --foreign src/lib/graphics/Makefile 232 232 .PRECIOUS: Makefile 233 233 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
branches/collision_detection/src/lib/graphics/importer/Makefile.in
r5674 r5711 214 214 esac; \ 215 215 done; \ 216 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/graphics/importer/Makefile'; \216 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/graphics/importer/Makefile'; \ 217 217 cd $(top_srcdir) && \ 218 $(AUTOMAKE) -- gnusrc/lib/graphics/importer/Makefile218 $(AUTOMAKE) --foreign src/lib/graphics/importer/Makefile 219 219 .PRECIOUS: Makefile 220 220 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
branches/collision_detection/src/lib/graphics/spatial_separation/Makefile.in
r5674 r5711 204 204 esac; \ 205 205 done; \ 206 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/graphics/spatial_separation/Makefile'; \206 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/graphics/spatial_separation/Makefile'; \ 207 207 cd $(top_srcdir) && \ 208 $(AUTOMAKE) -- gnusrc/lib/graphics/spatial_separation/Makefile208 $(AUTOMAKE) --foreign src/lib/graphics/spatial_separation/Makefile 209 209 .PRECIOUS: Makefile 210 210 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
branches/collision_detection/src/lib/gui/Makefile.in
r5674 r5711 183 183 esac; \ 184 184 done; \ 185 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/gui/Makefile'; \185 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/gui/Makefile'; \ 186 186 cd $(top_srcdir) && \ 187 $(AUTOMAKE) -- gnusrc/lib/gui/Makefile187 $(AUTOMAKE) --foreign src/lib/gui/Makefile 188 188 .PRECIOUS: Makefile 189 189 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
branches/collision_detection/src/lib/gui/gl_gui/Makefile.in
r5674 r5711 230 230 esac; \ 231 231 done; \ 232 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/gui/gl_gui/Makefile'; \232 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/gui/gl_gui/Makefile'; \ 233 233 cd $(top_srcdir) && \ 234 $(AUTOMAKE) -- gnusrc/lib/gui/gl_gui/Makefile234 $(AUTOMAKE) --foreign src/lib/gui/gl_gui/Makefile 235 235 .PRECIOUS: Makefile 236 236 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
branches/collision_detection/src/lib/gui/gtk_gui/Makefile.in
r5674 r5711 232 232 esac; \ 233 233 done; \ 234 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/gui/gtk_gui/Makefile'; \234 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/gui/gtk_gui/Makefile'; \ 235 235 cd $(top_srcdir) && \ 236 $(AUTOMAKE) -- gnusrc/lib/gui/gtk_gui/Makefile236 $(AUTOMAKE) --foreign src/lib/gui/gtk_gui/Makefile 237 237 .PRECIOUS: Makefile 238 238 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
branches/collision_detection/src/lib/particles/Makefile.in
r5674 r5711 207 207 esac; \ 208 208 done; \ 209 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/particles/Makefile'; \209 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/particles/Makefile'; \ 210 210 cd $(top_srcdir) && \ 211 $(AUTOMAKE) -- gnusrc/lib/particles/Makefile211 $(AUTOMAKE) --foreign src/lib/particles/Makefile 212 212 .PRECIOUS: Makefile 213 213 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
branches/collision_detection/src/lib/physics/Makefile.in
r5674 r5711 215 215 esac; \ 216 216 done; \ 217 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/physics/Makefile'; \217 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/physics/Makefile'; \ 218 218 cd $(top_srcdir) && \ 219 $(AUTOMAKE) -- gnusrc/lib/physics/Makefile219 $(AUTOMAKE) --foreign src/lib/physics/Makefile 220 220 .PRECIOUS: Makefile 221 221 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
branches/collision_detection/src/lib/shell/Makefile.in
r5674 r5711 211 211 esac; \ 212 212 done; \ 213 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/shell/Makefile'; \213 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/shell/Makefile'; \ 214 214 cd $(top_srcdir) && \ 215 $(AUTOMAKE) -- gnusrc/lib/shell/Makefile215 $(AUTOMAKE) --foreign src/lib/shell/Makefile 216 216 .PRECIOUS: Makefile 217 217 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
branches/collision_detection/src/lib/sound/Makefile.in
r5674 r5711 207 207 esac; \ 208 208 done; \ 209 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/sound/Makefile'; \209 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/sound/Makefile'; \ 210 210 cd $(top_srcdir) && \ 211 $(AUTOMAKE) -- gnusrc/lib/sound/Makefile211 $(AUTOMAKE) --foreign src/lib/sound/Makefile 212 212 .PRECIOUS: Makefile 213 213 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
branches/collision_detection/src/lib/tinyxml/Makefile.in
r5674 r5711 203 203 esac; \ 204 204 done; \ 205 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/tinyxml/Makefile'; \205 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/tinyxml/Makefile'; \ 206 206 cd $(top_srcdir) && \ 207 $(AUTOMAKE) -- gnusrc/lib/tinyxml/Makefile207 $(AUTOMAKE) --foreign src/lib/tinyxml/Makefile 208 208 .PRECIOUS: Makefile 209 209 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
branches/collision_detection/src/subprojects/Makefile.in
r5674 r5711 190 190 esac; \ 191 191 done; \ 192 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/subprojects/Makefile'; \192 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/subprojects/Makefile'; \ 193 193 cd $(top_srcdir) && \ 194 $(AUTOMAKE) -- gnusrc/subprojects/Makefile194 $(AUTOMAKE) --foreign src/subprojects/Makefile 195 195 .PRECIOUS: Makefile 196 196 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
branches/collision_detection/src/subprojects/collision_detection/Makefile.in
r5687 r5711 250 250 esac; \ 251 251 done; \ 252 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/subprojects/collision_detection/Makefile'; \252 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/subprojects/collision_detection/Makefile'; \ 253 253 cd $(top_srcdir) && \ 254 $(AUTOMAKE) -- gnusrc/subprojects/collision_detection/Makefile254 $(AUTOMAKE) --foreign src/subprojects/collision_detection/Makefile 255 255 .PRECIOUS: Makefile 256 256 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
branches/collision_detection/src/subprojects/importer/Makefile.in
r5674 r5711 233 233 esac; \ 234 234 done; \ 235 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/subprojects/importer/Makefile'; \235 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/subprojects/importer/Makefile'; \ 236 236 cd $(top_srcdir) && \ 237 $(AUTOMAKE) -- gnusrc/subprojects/importer/Makefile237 $(AUTOMAKE) --foreign src/subprojects/importer/Makefile 238 238 .PRECIOUS: Makefile 239 239 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
branches/collision_detection/src/subprojects/particles/Makefile.in
r5674 r5711 253 253 esac; \ 254 254 done; \ 255 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/subprojects/particles/Makefile'; \255 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/subprojects/particles/Makefile'; \ 256 256 cd $(top_srcdir) && \ 257 $(AUTOMAKE) -- gnusrc/subprojects/particles/Makefile257 $(AUTOMAKE) --foreign src/subprojects/particles/Makefile 258 258 .PRECIOUS: Makefile 259 259 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
branches/collision_detection/src/subprojects/testmain/Makefile.in
r5674 r5711 197 197 esac; \ 198 198 done; \ 199 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/subprojects/testmain/Makefile'; \199 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/subprojects/testmain/Makefile'; \ 200 200 cd $(top_srcdir) && \ 201 $(AUTOMAKE) -- gnusrc/subprojects/testmain/Makefile201 $(AUTOMAKE) --foreign src/subprojects/testmain/Makefile 202 202 .PRECIOUS: Makefile 203 203 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
branches/collision_detection/src/util/Makefile.in
r5674 r5711 235 235 esac; \ 236 236 done; \ 237 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/util/Makefile'; \237 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/util/Makefile'; \ 238 238 cd $(top_srcdir) && \ 239 $(AUTOMAKE) -- gnusrc/util/Makefile239 $(AUTOMAKE) --foreign src/util/Makefile 240 240 .PRECIOUS: Makefile 241 241 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Note: See TracChangeset
for help on using the changeset viewer.