Changeset 1579


Ignore:
Timestamp:
10/06/06 17:23:49 (18 years ago)
Author:
bittner
Message:

merge

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

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp

    r1576 r1579  
    519519bool 
    520520Environment::GetStringValue(const char *name, 
    521                             char *value, 
    522                             const bool isFatal) const 
     521                                                        char *value, 
     522                                                        const bool isFatal) const 
    523523{ 
    524524  int i = FindOption(name, isFatal); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Intersectable.h

    r1570 r1579  
    3535  static int sMailId; 
    3636  static int sReservedMailboxes; 
     37 
     38  /// Mailbox used for traversals 
    3739  int mMailbox; 
    3840   
    3941  /// unique object Id 
    4042  int mId; 
     43 
    4144  /// universal counter 
    4245  int mCounter; 
     
    4447  /// pointer to the container bvh leaf 
    4548  BvhLeaf *mBvhLeaf; 
     49 
    4650  /// some rays piercing this intersectable 
    4751  VssRayContainer mVssRays; 
     
    5357  // note matt: delete these, they are only taking memory+ 
    5458 
     59 
    5560  /// object based pvs 
    5661  KdPvs mKdPvs; 
     62 
    5763  /// view cell based pvs per object 
    5864  ViewCellPvs mViewCellPvs; 
     
    7278  Intersectable(): mMailbox(0), mReferences(0), mBvhLeaf(0) {} 
    7379 
    74         void SetId(const int id) { mId = id; } 
    75         int GetId() { return mId; } 
     80  void SetId(const int id) { mId = id; } 
     81  int GetId() { return mId; } 
     82   
     83  //////////////////////////////////////////////// 
     84  //    Mailing stuff 
     85   
     86  static void NewMail(const int reserve = 1) { 
     87        sMailId += sReservedMailboxes; 
     88        sReservedMailboxes = reserve; 
     89  } 
    7690         
    77 //////////////////////////////////////////////// 
    78 //      Mailing stuff 
     91  void Mail() { mMailbox = sMailId; } 
     92  bool Mailed() const { return mMailbox == sMailId; } 
     93   
     94  void Mail(const int mailbox) { mMailbox = sMailId + mailbox; } 
     95  bool Mailed(const int mailbox) const { return mMailbox == sMailId + mailbox; } 
     96   
     97  int IncMail() { return ++ mMailbox - sMailId; } 
    7998 
    80         static void NewMail(const int reserve = 1) { 
    81                 sMailId += sReservedMailboxes; 
    82                 sReservedMailboxes = reserve; 
    83         } 
    84          
    85         void Mail() { mMailbox = sMailId; } 
    86         bool Mailed() const { return mMailbox == sMailId; } 
    87  
    88         void Mail(const int mailbox) { mMailbox = sMailId + mailbox; } 
    89         bool Mailed(const int mailbox) const { return mMailbox == sMailId + mailbox; } 
    90  
    91         int IncMail() { return ++ mMailbox - sMailId; } 
    92  
    93 //////////////////////////////////////////////////// 
    94     virtual AxisAlignedBox3 GetBox() const = 0; 
    95         virtual int CastRay(GtpVisibilityPreprocessor::Ray &ray) = 0; 
    96          
    97         virtual bool IsConvex() const = 0; 
    98         virtual bool IsWatertight() const = 0; 
    99         virtual float IntersectionComplexity() = 0; 
     99  //////////////////////////////////////////////////// 
     100  virtual AxisAlignedBox3 GetBox() const = 0; 
     101  virtual int CastRay(GtpVisibilityPreprocessor::Ray &ray) = 0; 
    100102   
    101         virtual int NumberOfFaces() const = 0; 
    102         virtual int Type() const = 0; 
    103  
    104         virtual int GetRandomSurfacePoint(Vector3 &point, Vector3 &normal) = 0; 
    105  
     103  virtual bool IsConvex() const = 0; 
     104  virtual bool IsWatertight() const = 0; 
     105  virtual float IntersectionComplexity() = 0; 
     106   
     107  virtual int NumberOfFaces() const = 0; 
     108  virtual int Type() const = 0; 
     109   
     110  virtual int GetRandomSurfacePoint(Vector3 &point, Vector3 &normal) = 0; 
     111   
    106112        virtual int GetRandomVisibleSurfacePoint(Vector3 &point, 
    107113                                                                                         Vector3 &normal, 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Makefile

    r1457 r1579  
    11############################################################################# 
    22# Makefile for building: preprocessor 
    3 # Generated by qmake (2.00a) (Qt 4.1.2) on: ?t 21. IX 22:34:57 2006 
     3# Generated by qmake (2.00a) (Qt 4.1.2) on: pá 6. X 16:24:14 2006 
    44# Project:  preprocessor.pro 
    55# Template: app 
  • GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp

    r1563 r1579  
    8080SamplingPreprocessor::VerifyVisibility(Intersectable *object) 
    8181{ 
    82         // mail all nodes from the pvs 
     82#if 0 // 6.10. 2006 due to kdPVS removal from intersectable 
     83  // mail all nodes from the pvs 
    8384  Intersectable::NewMail(); 
    8485  KdPvsMap::iterator i = object->mKdPvs.mEntries.begin(); 
     
    106107        // sample creates some contribution 
    107108  } 
     109#endif 
    108110} 
    109111 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Vector3.h

    r1420 r1579  
    442442{ 
    443443  return  
    444           Vector3(A.y * B.z - A.z * B.y, 
     444        Vector3(A.y * B.z - A.z * B.y, 
    445445                          A.z * B.x - A.x * B.z, 
    446                           A.x * B.y - A.y * B.x); 
    447 } 
     446                        A.x * B.y - A.y * B.x); 
     447} 
     448 
    448449 
    449450inline void 
  • GTP/trunk/Lib/Vis/Preprocessing/src/default.env

    r1454 r1579  
    6464} 
    6565 
    66 VssPreprocessor { 
    67         samplesPerPass  100000 
    68         initialSamples 100000 
    69         vssSamples 500000 
    70         vssSamplesPerPass 100000 
    71         useImportanceSampling true 
    72         loadInitialSamples  false 
    73         storeInitialSamples false 
    74         useViewSpaceBox false 
    75         enlargeViewSpace true 
    76 } 
    77  
    78  
    79 VssTree { 
    80         useRss    false 
    81         epsilon         1e-6 
    82  
    83         maxDepth        40 
    84         minPvs          30 
    85         minRays         20 
    86         minSize         0.001 
    87         maxCostRatio    2.0 
    88         maxRayContribution 0.5 
    89          
    90         maxTotalMemory  200 
    91         maxStaticMemory 100 
    92  
    93         splitType regular 
    94 #       splitType heuristic 
    95 #       splitType hybrid 
    96         splitUseOnlyDrivingAxis false 
    97  
    98         interleaveDirSplits     true 
    99     dirSplitDepth 0 
    100  
    101         numberOfEndPointDomains 10000 
    102         ct_div_ci       0.0 
    103         randomize       false 
    104  
    105         refDirBoxMaxSize        0.1 
    106 } 
    10766 
    10867SamplingPreprocessor { 
     
    406365} 
    407366 
    408 BspTree { 
    409         Construction { 
    410                 samples 300000 
    411                 epsilon 0.005 
    412         } 
    413  
    414  
    415         # random polygon       = 1 
    416         # axis aligned         = 2 
    417         # least splits         = 4 
    418         # balanced polygons    = 8 
    419         # balanced view cells  = 16 
    420         # largest polygon area = 32 
    421         # vertical axis        = 64 
    422         # blocked rays         = 128 
    423         # least ray splits     = 256 
    424         # balanced rays        = 512 
    425         # pvs                  = 1024 
    426  
    427         # least splits + balanced polygons 
    428         #splitPlaneStrategy 12 
    429          
    430         #axis aligned + vertical axis 
    431         #splitPlaneStrategy 66 
    432          
    433         # axis aligned + balanced view cells 
    434         # splitPlaneStrategy 18 
    435          
    436         # largest polygon area 
    437         #splitPlaneStrategy 32 
    438          
    439         # axus aligned + balanced polygons 
    440         #splitPlaneStrategy 72 
    441          
    442         # axis aligned + blocked rays 
    443         #splitPlaneStrategy 130 
    444          
    445         #splitPlaneStrategy 384 
    446         #splitPlaneStrategy 130 
    447          
    448         splitPlaneStrategy 32 
    449          
    450         maxPolyCandidates 100 
    451         maxRayCandidates 0 
    452          
    453         maxTests 10000 
    454          
    455         subdivisionStats ../subDivisionStats.log 
    456  
    457         # factors for evaluating split plane costs 
    458         Factor { 
    459                 verticalSplits 1.0 
    460                 largestPolyArea 1.0 
    461                 blockedRays 1.0 
    462                 leastRaySplits 1.0 
    463                 balancedRays 1.0 
    464                 pvs 1.0 
    465                 leastSplits 1.0 
    466                 balancedPolys 1.0 
    467                 balancedViewCells 1.0 
    468         } 
    469          
    470         Termination { 
    471                 # parameters used for autopartition 
    472                 minRays -1 
    473                 minPolygons 0 
    474                 maxDepth 30 
    475                 minPvs -1 
    476                 minProbability 0.00001 
    477                 maxRayContribution 9999 
    478                 maxViewCells 20000 
    479  
    480                 # used for pvs criterium 
    481                 ct_div_ci 0.0 
    482          
    483                 maxCostRatio 0.9 
    484                  
    485                 # axis aligned splits 
    486                 AxisAligned { 
    487                         minPolys 5000 
    488                         minRays 500 
    489                         minObjects 10 
    490                         ct_div_ci 0.5 
    491                 } 
    492         } 
    493          
    494         AxisAligned { 
    495                 splitBorder 0.01 
    496         } 
    497          
    498          
    499         Visualization { 
    500                 # x3d visualization of the split planes 
    501                 exportSplits false 
    502         } 
    503 } 
  • GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp

    r1545 r1579  
    11#ifdef GTP_INTERNAL 
    2         #define USE_QT 1 
     2#define USE_QT 1 
    33#else 
    4         #define USE_QT 0 
    5 #endif 
    6  
    7 #if USE_QT 
    8 #define USE_BOOST 0 
    9 #else 
    10 #define USE_BOOST 1 
    11 #endif 
     4#define USE_QT 0 
     5#endif 
     6 
     7#define USE_THREADS 1 
    128 
    139#ifdef UNICODE 
     
    2723 
    2824#include "PreprocessorThread.h" 
    29 #if USE_BOOST 
     25 
     26#if !USE_QT && USE_THREADS 
    3027#include "BoostPreprocessorThread.h" 
    3128#endif 
     
    183180        pt = new QtPreprocessorThread(preprocessor); 
    184181#else 
    185 #if USE_BOOST 
     182#if USE_THREADS 
    186183        pt = new BoostPreprocessorThread(preprocessor); 
    187184#else 
    188185        pt = new PreprocessorThread(preprocessor); 
    189 #endif   
     186#endif 
    190187#endif 
    191188 
  • GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro

    r1457 r1579  
    116116OspTree.cpp HierarchyManager.cpp ObjParser.cpp \ 
    117117BvHierarchy.cpp  \ 
    118 BoostPreprocessorThread.cpp  
     118BoostPreprocessorThread.cpp InternalRayCaster.cpp IntelRayCaster.cpp \ 
     119RayCaster.cpp PreprocessorFactory.cpp GvsPreprocessor.cpp 
    119120 
    120121 
Note: See TracChangeset for help on using the changeset viewer.