Changeset 1579 for GTP/trunk/Lib/Vis
- Timestamp:
- 10/06/06 17:23:49 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
r1576 r1579 519 519 bool 520 520 Environment::GetStringValue(const char *name, 521 522 521 char *value, 522 const bool isFatal) const 523 523 { 524 524 int i = FindOption(name, isFatal); -
GTP/trunk/Lib/Vis/Preprocessing/src/Intersectable.h
r1570 r1579 35 35 static int sMailId; 36 36 static int sReservedMailboxes; 37 38 /// Mailbox used for traversals 37 39 int mMailbox; 38 40 39 41 /// unique object Id 40 42 int mId; 43 41 44 /// universal counter 42 45 int mCounter; … … 44 47 /// pointer to the container bvh leaf 45 48 BvhLeaf *mBvhLeaf; 49 46 50 /// some rays piercing this intersectable 47 51 VssRayContainer mVssRays; … … 53 57 // note matt: delete these, they are only taking memory+ 54 58 59 55 60 /// object based pvs 56 61 KdPvs mKdPvs; 62 57 63 /// view cell based pvs per object 58 64 ViewCellPvs mViewCellPvs; … … 72 78 Intersectable(): mMailbox(0), mReferences(0), mBvhLeaf(0) {} 73 79 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 } 76 90 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; } 79 98 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; 100 102 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 106 112 virtual int GetRandomVisibleSurfacePoint(Vector3 &point, 107 113 Vector3 &normal, -
GTP/trunk/Lib/Vis/Preprocessing/src/Makefile
r1457 r1579 1 1 ############################################################################# 2 2 # Makefile for building: preprocessor 3 # Generated by qmake (2.00a) (Qt 4.1.2) on: ?t 21. IX 22:34:5720063 # Generated by qmake (2.00a) (Qt 4.1.2) on: pá 6. X 16:24:14 2006 4 4 # Project: preprocessor.pro 5 5 # Template: app -
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp
r1563 r1579 80 80 SamplingPreprocessor::VerifyVisibility(Intersectable *object) 81 81 { 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 83 84 Intersectable::NewMail(); 84 85 KdPvsMap::iterator i = object->mKdPvs.mEntries.begin(); … … 106 107 // sample creates some contribution 107 108 } 109 #endif 108 110 } 109 111 -
GTP/trunk/Lib/Vis/Preprocessing/src/Vector3.h
r1420 r1579 442 442 { 443 443 return 444 444 Vector3(A.y * B.z - A.z * B.y, 445 445 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 448 449 449 450 inline void -
GTP/trunk/Lib/Vis/Preprocessing/src/default.env
r1454 r1579 64 64 } 65 65 66 VssPreprocessor {67 samplesPerPass 10000068 initialSamples 10000069 vssSamples 50000070 vssSamplesPerPass 10000071 useImportanceSampling true72 loadInitialSamples false73 storeInitialSamples false74 useViewSpaceBox false75 enlargeViewSpace true76 }77 78 79 VssTree {80 useRss false81 epsilon 1e-682 83 maxDepth 4084 minPvs 3085 minRays 2086 minSize 0.00187 maxCostRatio 2.088 maxRayContribution 0.589 90 maxTotalMemory 20091 maxStaticMemory 10092 93 splitType regular94 # splitType heuristic95 # splitType hybrid96 splitUseOnlyDrivingAxis false97 98 interleaveDirSplits true99 dirSplitDepth 0100 101 numberOfEndPointDomains 10000102 ct_div_ci 0.0103 randomize false104 105 refDirBoxMaxSize 0.1106 }107 66 108 67 SamplingPreprocessor { … … 406 365 } 407 366 408 BspTree {409 Construction {410 samples 300000411 epsilon 0.005412 }413 414 415 # random polygon = 1416 # axis aligned = 2417 # least splits = 4418 # balanced polygons = 8419 # balanced view cells = 16420 # largest polygon area = 32421 # vertical axis = 64422 # blocked rays = 128423 # least ray splits = 256424 # balanced rays = 512425 # pvs = 1024426 427 # least splits + balanced polygons428 #splitPlaneStrategy 12429 430 #axis aligned + vertical axis431 #splitPlaneStrategy 66432 433 # axis aligned + balanced view cells434 # splitPlaneStrategy 18435 436 # largest polygon area437 #splitPlaneStrategy 32438 439 # axus aligned + balanced polygons440 #splitPlaneStrategy 72441 442 # axis aligned + blocked rays443 #splitPlaneStrategy 130444 445 #splitPlaneStrategy 384446 #splitPlaneStrategy 130447 448 splitPlaneStrategy 32449 450 maxPolyCandidates 100451 maxRayCandidates 0452 453 maxTests 10000454 455 subdivisionStats ../subDivisionStats.log456 457 # factors for evaluating split plane costs458 Factor {459 verticalSplits 1.0460 largestPolyArea 1.0461 blockedRays 1.0462 leastRaySplits 1.0463 balancedRays 1.0464 pvs 1.0465 leastSplits 1.0466 balancedPolys 1.0467 balancedViewCells 1.0468 }469 470 Termination {471 # parameters used for autopartition472 minRays -1473 minPolygons 0474 maxDepth 30475 minPvs -1476 minProbability 0.00001477 maxRayContribution 9999478 maxViewCells 20000479 480 # used for pvs criterium481 ct_div_ci 0.0482 483 maxCostRatio 0.9484 485 # axis aligned splits486 AxisAligned {487 minPolys 5000488 minRays 500489 minObjects 10490 ct_div_ci 0.5491 }492 }493 494 AxisAligned {495 splitBorder 0.01496 }497 498 499 Visualization {500 # x3d visualization of the split planes501 exportSplits false502 }503 } -
GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
r1545 r1579 1 1 #ifdef GTP_INTERNAL 2 2 #define USE_QT 1 3 3 #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 12 8 13 9 #ifdef UNICODE … … 27 23 28 24 #include "PreprocessorThread.h" 29 #if USE_BOOST 25 26 #if !USE_QT && USE_THREADS 30 27 #include "BoostPreprocessorThread.h" 31 28 #endif … … 183 180 pt = new QtPreprocessorThread(preprocessor); 184 181 #else 185 #if USE_ BOOST182 #if USE_THREADS 186 183 pt = new BoostPreprocessorThread(preprocessor); 187 184 #else 188 185 pt = new PreprocessorThread(preprocessor); 189 #endif 186 #endif 190 187 #endif 191 188 -
GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro
r1457 r1579 116 116 OspTree.cpp HierarchyManager.cpp ObjParser.cpp \ 117 117 BvHierarchy.cpp \ 118 BoostPreprocessorThread.cpp 118 BoostPreprocessorThread.cpp InternalRayCaster.cpp IntelRayCaster.cpp \ 119 RayCaster.cpp PreprocessorFactory.cpp GvsPreprocessor.cpp 119 120 120 121
Note: See TracChangeset
for help on using the changeset viewer.