Changeset 1995


Ignore:
Timestamp:
01/18/07 20:04:20 (17 years ago)
Author:
bittner
Message:

mutation tests

Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/AxisAlignedBox3.h

    r1877 r1995  
    7373  // the size of the box along all the axes 
    7474  Vector3 Size() const; 
    75  
     75  float Radius() const { return 0.5f*Magnitude(Size()); } 
     76  float SqrRadius() const { return 0.5f*SqrMagnitude(Size()); } 
     77   
    7678  // Return whether the box is unbounded.  Unbounded boxes appear 
    7779  // when unbounded objects such as quadric surfaces are included. 
  • GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.cpp

    r1989 r1995  
    14641464  nodeStack.push(mRoot); 
    14651465 
     1466  float area = 0.0f; 
     1467  float radius = 0.0f; 
     1468  int nodes = 0; 
     1469   
    14661470  while (!nodeStack.empty()) { 
    14671471    KdNode *node = nodeStack.top(); 
     
    14701474        node->mPvsTermination = 0; 
    14711475        if (node->IsLeaf() || (GetSurfaceArea(node) <= maxArea) ) { 
     1476          area += GetSurfaceArea(node); 
     1477          radius += GetBox(node).Radius(); 
     1478          nodes++; 
    14721479          node->mPvsTermination = 1; 
    14731480          // create dummy kd intersectable 
     
    14791486    } 
    14801487  } 
     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   
    14811498} 
    14821499 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Makefile

    r1989 r1995  
    11############################################################################# 
    22# Makefile for building: preprocessor 
    3 # Generated by qmake (2.00a) (Qt 4.1.2) on: st 17. I 15:41:45 2007 
     3# Generated by qmake (2.00a) (Qt 4.1.2) on: ?t 18. I 16:30:52 2007 
    44# Project:  preprocessor.pro 
    55# Template: app 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Mutation.cpp

    r1991 r1995  
    369369  Vector3 origin = ray->mOrigin; 
    370370  Vector3 termination = ray->mTermination; //box.Center(); //ray->mTermination; //box.Center(); 
     371 
     372  // optimal for Pompeii 0.1f 
     373  // optimal for Vienna 0.5f 
    371374   
    372375  float radiusExtension = 0.05f; 
    373376  //  + mRays[index].mMutations/50.0f; 
     377 
     378  float mutationRadius = objectRadius*radiusExtension; 
     379 
     380  // tmp for pompeii 
     381  mutationRadius = 0.22f; 
    374382   
    375383  origin += ComputeOriginMutation(*ray, U, V, 
    376384                                                                  Vector2(rr[0], rr[1]), 
    377                                                                   objectRadius*radiusExtension); 
     385                                                                  mutationRadius); 
    378386   
    379387  termination += ComputeTerminationMutation(*ray, U, V, 
    380388                                                                                        Vector2(rr[2], rr[3]), 
    381                                                                                         objectRadius*radiusExtension); 
     389                                                                                        mutationRadius); 
    382390   
    383391  Vector3 direction = termination - origin; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.h

    r1993 r1995  
    271271private: 
    272272 
    273         virtual bool GenerateSample(SimpleRay &ray); 
     273  virtual bool GenerateSample(SimpleRay &ray) { return false; } 
    274274 
    275275        ViewCell *mViewCell; 
Note: See TracChangeset for help on using the changeset viewer.