- Timestamp:
- 05/23/08 10:25:22 (17 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/scripts/run_gvs_vps.sh
r2696 r2697 37 37 -gvs_samples_per_pass=1000000 \ 38 38 -gvs_initial_samples=16 \ 39 -gvs_max_viewcells=20 \39 -gvs_max_viewcells=2000 \ 40 40 -gvs_min_contribution=50 \ 41 41 -gvs_per_viewcell=true \ -
GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp
r2696 r2697 135 135 mViewPoint = Vector3(1199.53, 257.677, -457.145); 136 136 mViewDirection = Vector3(-0.71206, -0, -0.702108); 137 138 mViewPoint = Vector3(1188.22, 187.427, -381.739); 139 mViewDirection = Vector3(-0.963031, -0, -0.269365); 137 140 } 138 141 -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
r2696 r2697 58 58 59 59 60 void processHits (GLint hits, GLuint buffer[]) 61 { 62 unsigned int i, j; 63 GLuint names, *ptr; 64 65 cout << "hits = %d" << endl;; 66 ptr = (GLuint *) buffer; 67 68 for (i = 0; i < hits; i++) 69 { 70 /* for each hit */ 71 names = *ptr; 72 73 printf (" number of names for hit = %d\n", names); ptr++; 74 printf(" z1 is %g;", (float) *ptr/0x7fffffff); ptr++; 75 printf(" z2 is %g\n", (float) *ptr/0x7fffffff); ptr++; 76 printf (" the name is "); 77 78 for (j = 0; j < names; j++) { /* for each name */ 79 printf ("%d ", *ptr); ptr++; 80 } 81 printf ("\n"); 82 } 83 } 84 85 60 86 static inline bool ilt(Intersectable *obj1, Intersectable *obj2) 61 87 { … … 538 564 } 539 565 540 if (mPendingDynamicObject) 541 _RenderDynamicObject(mPendingDynamicObject); 566 // handle dynamic objects 567 dit, dit_end = mPendingDynamicObjects.end(); 568 569 for (dit = mPendingDynamicObjects.begin(); dit != dit_end; ++ dit) 570 { 571 _RenderDynamicObject(*dit); 572 } 573 574 //_RenderDynamicObject(mPendingDynamicObject); 542 575 #endif 543 576 } … … 774 807 775 808 mPlacer->PlaceObject(pt); 776 mPendingDynamicObject = mPlacer->GetCurrentObject();809 //mPendingDynamicObjects.push_back( mPlacer->GetCurrentObject()); 777 810 } 778 811 } … … 782 815 void QtGlRendererWidget::mouseReleaseEvent(QMouseEvent *e) 783 816 { 784 785 if (e->modifiers() & Qt::AltModifier) 786 if (mCurrentDynamicObjectIdx >= 0) { 787 // preprocessor->ScheduleUpdateDynamicObjects(); 817 int x = e->pos().x(); 818 int y = e->pos().y(); 819 820 mousePoint.x = x; 821 mousePoint.y = y; 822 823 if (e->modifiers() & Qt::AltModifier) 824 { 825 const Vector3 pt = Unproject(x, y); 826 827 int num = FindDynamicObject(pt); 828 cout << "\n*****************\n" << "here4" << num << endl; 829 //processHits(buf); 830 831 /*if (mCurrentDynamicObjectIdx >= 0) { 832 preprocessor->ScheduleUpdateDynamicObjects(); 833 }*/ 788 834 } 789 835 } … … 812 858 mViewPoint.x += (x-mousePoint.x)*MOVE_SENSITIVITY / 2.0; 813 859 } 814 #if DYNAMIC_OBJECTS_HACK860 #if 0// DYNAMIC_OBJECTS_HACK 815 861 else if (e->modifiers() & Qt::AltModifier) 816 862 { … … 1095 1141 mPlacer = new ObjectPlacer(); 1096 1142 1097 mPendingDynamicObject = NULL;1143 //mPendingDynamicObject = NULL; 1098 1144 1099 1145 SetSceneCut(1000); … … 2634 2680 glLoadName(1); 2635 2681 2636 _RenderDynamicObject(mPendingDynamicObject );2682 _RenderDynamicObject(mPendingDynamicObjects[0]); 2637 2683 2638 2684 glMatrixMode(GL_PROJECTION); … … 2661 2707 } 2662 2708 2663 void processHits (GLint hits, GLuint buffer[]) 2664 { 2665 unsigned int i, j; 2666 GLuint names, *ptr; 2667 2668 cout << "hits = %d" << endl;; 2669 ptr = (GLuint *) buffer; 2670 2671 for (i = 0; i < hits; i++) 2672 { 2673 /* for each hit */ 2674 names = *ptr; 2675 2676 printf (" number of names for hit = %d\n", names); ptr++; 2677 printf(" z1 is %g;", (float) *ptr/0x7fffffff); ptr++; 2678 printf(" z2 is %g\n", (float) *ptr/0x7fffffff); ptr++; 2679 printf (" the name is "); 2680 2681 for (j = 0; j < names; j++) { /* for each name */ 2682 printf ("%d ", *ptr); ptr++; 2683 } 2684 printf ("\n"); 2685 } 2686 } 2687 2688 } 2709 2710 } -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h
r2696 r2697 250 250 #if DYNAMIC_OBJECTS_HACK 251 251 252 SceneGraphLeaf *mPendingDynamicObject;252 DynamicObjectsContainer mPendingDynamicObjects; 253 253 DynamicObjectsContainer mDynamicObjects; 254 254
Note: See TracChangeset
for help on using the changeset viewer.