Ignore:
Timestamp:
05/26/08 04:01:24 (16 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface
Files:
3 edited

Legend:

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

    r2702 r2710  
    5858} 
    5959 
     60 
     61void ObjectPlacer::PlaceObject(SceneGraphLeaf *leaf, const Vector3 &pt) 
     62{ 
     63        AxisAlignedBox3 box = leaf->GetBox(); 
     64 
     65        Vector3 p = box.Center() - pt;; 
     66 
     67        // set pivot to ground of object 
     68        //p.y -= obj->GetOriginalBox().Min().y; 
     69        Matrix4x4 trafo = TranslationMatrix(p); 
     70 
     71        leaf->ApplyTransform(trafo); 
    6072} 
     73 
     74} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/ObjectPlacer.h

    r2702 r2710  
    3333        */ 
    3434        void PlaceObject(const Vector3 &p); 
     35        /** Adds an object at the indicated position. 
     36        */ 
     37        void PlaceObject(SceneGraphLeaf *l, const Vector3 &p); 
    3538        /** Returns the currently active object. 
    3639        */ 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp

    r2709 r2710  
    143143    glLoadIdentity(); 
    144144    glOrtho(-1, 1, -1, 1, -99, 99); 
    145     //glTranslatef(-0.5f, -0.5f, 0.0f); 
    146145    glMatrixMode(GL_MODELVIEW); 
    147146    glLoadIdentity(); 
     
    916915                { 
    917916                        Matrix4x4 tm; 
     917 
     918                        SceneGraphLeaf *l = 
     919                          mViewCellsManager->GetPreprocessor()->mDynamicObjects[mCurrentDynamicObjectIdx]; 
    918920 
    919921                        switch (mTrafoType) 
     
    948950                                cerr << "not implemented" << endl; 
    949951                        } 
    950  
    951                         SceneGraphLeaf *l = 
    952                           mViewCellsManager->GetPreprocessor()->mDynamicObjects[mCurrentDynamicObjectIdx]; 
     952                         
    953953                        l->ApplyTransform(tm); 
    954                          
     954 
    955955                        updateGL(); 
    956956                } 
     
    11841184        mCurrentDynamicObjectIdx = -1; 
    11851185 
     1186        // export frame buffer during walkthrough 
    11861187        //mExportFrameBuffer = true; 
    11871188        mExportFrameBuffer = false; 
Note: See TracChangeset for help on using the changeset viewer.