- Timestamp:
- 01/18/07 20:04:20 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/AxisAlignedBox3.h
r1877 r1995 73 73 // the size of the box along all the axes 74 74 Vector3 Size() const; 75 75 float Radius() const { return 0.5f*Magnitude(Size()); } 76 float SqrRadius() const { return 0.5f*SqrMagnitude(Size()); } 77 76 78 // Return whether the box is unbounded. Unbounded boxes appear 77 79 // when unbounded objects such as quadric surfaces are included. -
GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.cpp
r1989 r1995 1464 1464 nodeStack.push(mRoot); 1465 1465 1466 float area = 0.0f; 1467 float radius = 0.0f; 1468 int nodes = 0; 1469 1466 1470 while (!nodeStack.empty()) { 1467 1471 KdNode *node = nodeStack.top(); … … 1470 1474 node->mPvsTermination = 0; 1471 1475 if (node->IsLeaf() || (GetSurfaceArea(node) <= maxArea) ) { 1476 area += GetSurfaceArea(node); 1477 radius += GetBox(node).Radius(); 1478 nodes++; 1472 1479 node->mPvsTermination = 1; 1473 1480 // create dummy kd intersectable … … 1479 1486 } 1480 1487 } 1488 1489 if (nodes) { 1490 area /= nodes; 1491 radius /= nodes; 1492 cout<<"Number of nodes for storing in the PVS = "<<nodes<<endl; 1493 cout<<"Average rel. node area = "<<area/GetSurfaceArea(mRoot)<<endl; 1494 cout<<"Average rel. node radius = "<<radius/GetBox(mRoot).Radius()<<endl; 1495 cout<<"Avg node radius = "<<radius<<endl; 1496 } 1497 1481 1498 } 1482 1499 -
GTP/trunk/Lib/Vis/Preprocessing/src/Makefile
r1989 r1995 1 1 ############################################################################# 2 2 # Makefile for building: preprocessor 3 # Generated by qmake (2.00a) (Qt 4.1.2) on: st 17. I 15:41:4520073 # Generated by qmake (2.00a) (Qt 4.1.2) on: ?t 18. I 16:30:52 2007 4 4 # Project: preprocessor.pro 5 5 # Template: app -
GTP/trunk/Lib/Vis/Preprocessing/src/Mutation.cpp
r1991 r1995 369 369 Vector3 origin = ray->mOrigin; 370 370 Vector3 termination = ray->mTermination; //box.Center(); //ray->mTermination; //box.Center(); 371 372 // optimal for Pompeii 0.1f 373 // optimal for Vienna 0.5f 371 374 372 375 float radiusExtension = 0.05f; 373 376 // + mRays[index].mMutations/50.0f; 377 378 float mutationRadius = objectRadius*radiusExtension; 379 380 // tmp for pompeii 381 mutationRadius = 0.22f; 374 382 375 383 origin += ComputeOriginMutation(*ray, U, V, 376 384 Vector2(rr[0], rr[1]), 377 objectRadius*radiusExtension);385 mutationRadius); 378 386 379 387 termination += ComputeTerminationMutation(*ray, U, V, 380 388 Vector2(rr[2], rr[3]), 381 objectRadius*radiusExtension);389 mutationRadius); 382 390 383 391 Vector3 direction = termination - origin; -
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.h
r1993 r1995 271 271 private: 272 272 273 virtual bool GenerateSample(SimpleRay &ray); 273 virtual bool GenerateSample(SimpleRay &ray) { return false; } 274 274 275 275 ViewCell *mViewCell;
Note: See TracChangeset
for help on using the changeset viewer.