Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r394 - in branches/itanium2: Interface Model/Cameras fox


Chronological Thread 
  • From: abe@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r394 - in branches/itanium2: Interface Model/Cameras fox
  • Date: Sat, 18 Jun 2005 01:13:41 -0600 (MDT)

Author: abe
Date: Sat Jun 18 01:13:29 2005
New Revision: 394

Added:
   branches/itanium2/fox/FMantaNavigator.cc
   branches/itanium2/fox/FMantaNavigator.h
   branches/itanium2/fox/FMantaUniformNav.cc
   branches/itanium2/fox/FMantaUniformNav.h
Modified:
   branches/itanium2/Interface/Callback.h
   branches/itanium2/Interface/CallbackHelpers.h
   branches/itanium2/Interface/Camera.h
   branches/itanium2/Model/Cameras/PinholeCamera.cc
   branches/itanium2/fox/CMakeLists.txt
   branches/itanium2/fox/FMantaImageFrame.h
   branches/itanium2/fox/FMantaQuakeNav.cc
   branches/itanium2/fox/FMantaQuakeNav.h
   branches/itanium2/fox/FMantaWindow.cc
   branches/itanium2/fox/FMantaWindow.h
   branches/itanium2/fox/fox_manta.cc
Log:

Changes to the fox demo.

I added a "Navigator" interface which should be implemented to drive fox 
cameras.

Added a "UniformNavigator" which moves the camera uniformly around the scene 
with either 
arrow keys or (eventually) the mouse.

A    fox/FMantaUniformNav.cc
M    fox/fox_manta.cc
A    fox/FMantaUniformNav.h
M    fox/FMantaWindow.cc
M    fox/FMantaWindow.h
A    fox/FMantaNavigator.cc
M    fox/FMantaQuakeNav.cc
A    fox/FMantaNavigator.h
M    fox/FMantaQuakeNav.h
M    fox/FMantaImageFrame.h
M    fox/CMakeLists.txt
M    Model/Cameras/PinholeCamera.cc
M    Interface/Camera.h
M    Interface/Callback.h
M    Interface/CallbackHelpers.h


Modified: branches/itanium2/Interface/Callback.h
==============================================================================
--- branches/itanium2/Interface/Callback.h      (original)
+++ branches/itanium2/Interface/Callback.h      Sat Jun 18 01:13:29 2005
@@ -13,10 +13,22 @@
       return new Callback_0Data_0Arg<T>(ptr, pmf);
     }
 
+               template<class T> static
+    CallbackBase_0Data*
+    create(T* ptr, void (T::*pmf)() const) {
+      return new Callback_0Data_0Arg_const<T>(ptr, pmf);
+    }
+
     template<class T, typename Arg1> static
     CallbackBase_0Data*
     create(T* ptr, void (T::*pmf)(Arg1), Arg1 arg1) {
       return new Callback_0Data_1Arg<T, Arg1>(ptr, pmf, arg1);
+    }
+               
+               template<class T, typename Arg1> static
+    CallbackBase_0Data*
+    create(T* ptr, void (T::*pmf)(Arg1) const, Arg1 arg1) {
+      return new Callback_0Data_1Arg_const<T, Arg1>(ptr, pmf, arg1);
     }
 
     template<class T, typename Arg1, typename Arg2> static

Modified: branches/itanium2/Interface/CallbackHelpers.h
==============================================================================
--- branches/itanium2/Interface/CallbackHelpers.h       (original)
+++ branches/itanium2/Interface/CallbackHelpers.h       Sat Jun 18 01:13:29 
2005
@@ -140,6 +140,26 @@
     void (T::*pmf)();
   };
 
+  template<class T>
+               class Callback_0Data_0Arg_const : public CallbackBase_0Data {
+               public:
+                       Callback_0Data_0Arg_const(T* ptr, void (T::*pmf)() 
const)
+      : ptr(ptr), pmf(pmf)
+    {
+    }
+                       virtual ~Callback_0Data_0Arg_const()
+    {
+    }
+                       virtual void call()
+    {
+                               (ptr->*pmf)();
+    }
+               private:
+                       T* ptr;
+                       void (T::*pmf)() const;
+               };
+       
+
   template<class T, typename Arg1>
   class Callback_0Data_1Arg : public CallbackBase_0Data {
   public:
@@ -159,6 +179,26 @@
     void (T::*pmf)(Arg1);
     Arg1 arg1;
   };
+
+       template<class T, typename Arg1>
+       class Callback_0Data_1Arg_const : public CallbackBase_0Data {
+       public:
+               Callback_0Data_1Arg_const(T* ptr, void (T::*pmf)(Arg1) const, 
Arg1 arg1)
+               : ptr(ptr), pmf(pmf), arg1(arg1)
+       {
+       }
+               virtual ~Callback_0Data_1Arg_const()
+       {
+       }
+               virtual void call()
+       {
+                       (ptr->*pmf)(arg1);
+       }
+       private:
+               T* ptr;
+               void (T::*pmf)(Arg1) const;
+               Arg1 arg1;
+       };
 
   template<class T, typename Arg1, typename Arg2>
   class Callback_0Data_2Arg : public CallbackBase_0Data {

Modified: branches/itanium2/Interface/Camera.h
==============================================================================
--- branches/itanium2/Interface/Camera.h        (original)
+++ branches/itanium2/Interface/Camera.h        Sat Jun 18 01:13:29 2005
@@ -15,7 +15,7 @@
 
     // Camera manipulation
     virtual void scaleFOV(double) = 0;
-    virtual void translate(Vector v) = 0;
+    virtual void translate(Vector v) = 0; // Translate in image plane 
coordinates.
     virtual void dolly(double) = 0;
                
                // Accessors

Modified: branches/itanium2/Model/Cameras/PinholeCamera.cc
==============================================================================
--- branches/itanium2/Model/Cameras/PinholeCamera.cc    (original)
+++ branches/itanium2/Model/Cameras/PinholeCamera.cc    Sat Jun 18 01:13:29 
2005
@@ -147,8 +147,9 @@
 
 void PinholeCamera::dolly(double scale)
 {
-  Vector dir = lookat - eye;
-  eye += dir*scale;
+  Vector d = (lookat - eye) * scale;
+  eye    += d;
+       lookat += d;
   setup();
 }
 

Modified: branches/itanium2/fox/CMakeLists.txt
==============================================================================
--- branches/itanium2/fox/CMakeLists.txt        (original)
+++ branches/itanium2/fox/CMakeLists.txt        Sat Jun 18 01:13:29 2005
@@ -1,10 +1,10 @@
 
-SET(FOX_PATH "" CACHE PATH "")
+SET(FOX_PATH "/store/rhodes/abe/build-tomahawk" CACHE PATH "")
 IF(FOX_PATH)
 
-  SET(FOX_INCLUDE ${FOX_PATH}/include/fox-1.4 CACHE PATH "")
+  SET(FOX_INCLUDE ${FOX_PATH}/include/fox-1.5 CACHE PATH "")
   SET(FOX_LIB     ${FOX_PATH}/lib CACHE PATH "")
-  SET(FOX_STATIC  FOX-1.4 CACHE STRING "")
+  SET(FOX_STATIC  FOX-1.5 CACHE STRING "")
 
   INCLUDE_DIRECTORIES(${FOX_INCLUDE})
   LINK_DIRECTORIES   (${FOX_LIB} )
@@ -16,8 +16,11 @@
                            FMantaWidgets.h
                            FMantaWindow.cc
                            FMantaWindow.h
+                           FMantaNavigator.h
                            FMantaQuakeNav.h
-                           FMantaQuakeNav.cc )
+                           FMantaQuakeNav.cc
+                           FMantaUniformNav.h
+                           FMantaUniformNav.cc )
 
 
   TARGET_LINK_LIBRARIES(fox_manta Manta_Engine 

Modified: branches/itanium2/fox/FMantaImageFrame.h
==============================================================================
--- branches/itanium2/fox/FMantaImageFrame.h    (original)
+++ branches/itanium2/fox/FMantaImageFrame.h    Sat Jun 18 01:13:29 2005
@@ -25,7 +25,7 @@
                int manta_channel;
                
                // Navigator to send updates to manta's camera.
-               FMantaQuakeNav *navigator;
+               FMantaNavigator *navigator;
                
        public: 
                // Message types.
@@ -46,7 +46,7 @@
                // Accessors.
                void setMantaInterface( RTRTInterface *manta_interface_, int 
manta_channel_ ) { 
                        manta_interface = manta_interface_; manta_channel = 
manta_channel_; };
-               void setNavigator( FMantaQuakeNav *navigator_ ) { navigator = 
navigator_; }
+               void setNavigator( FMantaNavigator *navigator_ ) { navigator 
= navigator_; }
                
                RTRTInterface *getMantaInterface() { return manta_interface; 
};
                int            getMantaChannel  () { return manta_channel;   
};

Added: branches/itanium2/fox/FMantaNavigator.cc
==============================================================================

Added: branches/itanium2/fox/FMantaNavigator.h
==============================================================================
--- (empty file)
+++ branches/itanium2/fox/FMantaNavigator.h     Sat Jun 18 01:13:29 2005
@@ -0,0 +1,43 @@
+#ifndef fox_FMantaNavigator__H
+#define fox_FMantaNavigator__H
+
+#include <fx.h>
+#include <fx3d.h>
+
+#include <MantaTypes.h>
+#include <Interface/Camera.h>
+#include <Interface/RTRTInterface.h>
+
+namespace fox_manta {
+
+       using namespace Manta;
+
+       // This class defines the interface for Navigators 
+       // which manipulate a Manta camera on mouse and keyboard input.
+       class FMantaNavigator {
+       protected:
+       
+               // Manta interfaces.
+               RTRTInterface *manta_interface;
+               Camera        *manta_camera;
+               
+       public:
+               FMantaNavigator() : manta_interface( 0 ), manta_camera( 0 ) { 
 };
+               virtual ~FMantaNavigator() {  };
+               
+               // Accessors.
+               void setMantaInterface( RTRTInterface *manta_interface_ ) { 
manta_interface = manta_interface_; };
+               void setMantaCamera   ( Camera *manta_camera_ )               
  { manta_camera    = manta_camera_;     };
+               
+               RTRTInterface *getMantaInterface() { return manta_interface; 
};
+               Camera        *getMantaCamera()    { return manta_camera;    
};
+               
+               // Virtual interface.
+               virtual long onKeyPress   ( FXObject *sender, FXSelector sel, 
void *data ) = 0;
+               virtual long onMouseChange( FXObject *sender, FXSelector sel, 
void *data ) = 0;
+               
+       };
+
+};
+
+#endif 
\ No newline at end of file

Modified: branches/itanium2/fox/FMantaQuakeNav.cc
==============================================================================
--- branches/itanium2/fox/FMantaQuakeNav.cc     (original)
+++ branches/itanium2/fox/FMantaQuakeNav.cc     Sat Jun 18 01:13:29 2005
@@ -32,11 +32,6 @@
        viewElevAngle += d; 
 };
 
-void FMantaQuakeNav::mantaAddTransaction() {
-       manta_interface->addTransaction("Quake Camera",
-                                                                             
                                                          
Callback::create(this, &FMantaQuakeNav::manta_transaction ));
-};
-
 
///////////////////////////////////////////////////////////////////////////////
 // Fox Mouse and Keyboard.
 long FMantaQuakeNav::onKeyPress   ( FXObject *sender, FXSelector sel, void 
*data ) {
@@ -92,39 +87,9 @@
 }
 
 
///////////////////////////////////////////////////////////////////////////////
-// Fox interaction with the class.
-// void *data is a pointer to the Real d parameter.
-long FMantaQuakeNav::onMove  ( FXObject *sender, FXSelector sel, void *data 
) {
-       move( *((Real *)data) );
-       return 1;
-}
-
-long FMantaQuakeNav::onStrafe( FXObject *sender, FXSelector sel, void *data 
) {
-       strafe( *((Real *)data) );
-       return 1;
-}
-
-long FMantaQuakeNav::onTurn  ( FXObject *sender, FXSelector sel, void *data 
) {
-       turn( *((Real *)data) );
-       return 1;
-}
-
-long FMantaQuakeNav::onTilt  ( FXObject *sender, FXSelector sel, void *data 
) {
-       tilt( *((Real *)data) );
-       return 1;
-}
-
-// Add a transaction in response to a message.
-long FMantaQuakeNav::onMantaAddTransaction( FXObject *sender, FXSelector 
sel, void *data ) {
-
-       mantaAddTransaction();
-       return 1;
-}
-
-///////////////////////////////////////////////////////////////////////////////
 // Transaction callback for manta thread. 
 // THIS FUNCTION IS NOT CALLED BY THE FOX THREAD.
-void FMantaQuakeNav::manta_transaction() {
+void FMantaQuakeNav::mantaThreadCallback() const {
 
        // Create a transformation.
        AffineTransform affine_transform;

Modified: branches/itanium2/fox/FMantaQuakeNav.h
==============================================================================
--- branches/itanium2/fox/FMantaQuakeNav.h      (original)
+++ branches/itanium2/fox/FMantaQuakeNav.h      Sat Jun 18 01:13:29 2005
@@ -8,6 +8,8 @@
 #include <Interface/Camera.h>
 #include <Interface/RTRTInterface.h>
 
+#include <fox/FMantaNavigator.h>
+
 namespace fox_manta {
 
        using namespace Manta;
@@ -15,7 +17,7 @@
        // This class contains attributes used to move a "Quake" style viewer 
around
        // the scene. 
        // This class is based on Kenny Hoff's glvu classes (khoff@sgi.com).
-       class FMantaQuakeNav {
+       class FMantaQuakeNav : public FMantaNavigator {
        private:
                bool allowFly;
                Real translateStepSize;
@@ -26,10 +28,6 @@
                Real viewElevAngle;
                Real height;
                
-               // Manta objects.
-               Camera        *manta_camera;
-               RTRTInterface *manta_interface;
-               
        public:
                // Key map.
                enum {  UP,  DOWN, LEFT, RIGHT, LAST };
@@ -41,6 +39,21 @@
                // State.
                bool mouse_down;
                
+               // Basic movement.
+               void move  ( Real d );
+               void strafe( Real d );
+               void turn  ( Real d );          
+               void tilt  ( Real d );
+               
+               
+               void mantaAddTransaction() {
+                       
+                       // Add the transaction to manta.
+                       manta_interface->addTransaction("FMantaNavigator",
+                               Callback::create(this, 
&FMantaQuakeNav::mantaThreadCallback ));
+                       
+               };
+               
        public:
                // Constructor with default options.
                FMantaQuakeNav() : allowFly( false ),
@@ -52,8 +65,6 @@
                                                                              
           viewElevAngle( 0.0 ),
                                                                              
           height( 0 ),
                                                                              
           
-                                                                             
           manta_camera( 0 ),
-                                                                             
           manta_interface( 0 ),
                                                                              
           mouse_down( false )
                                                                              
           {  
                                                                              
              key_map[0] = 'w';
@@ -74,8 +85,6 @@
                        viewElevAngle( viewElevAngle_ ),
                        height( height_ ),
                        
-                       manta_camera( 0 ),
-                       manta_interface( 0 ),
                        mouse_down( false )
                        
                  { key_map[0] = 'w';
@@ -84,37 +93,15 @@
                                key_map[3] = 'd'; }; 
                        
                // Accessors.
-               void setMantaCamera( Camera *manta_camera_ )              { 
manta_camera = manta_camera_; };
-               void setMantaInterface( RTRTInterface *manta_interface_ ) { 
manta_interface = manta_interface_; };
-               
                void setKeyMap( int map, char k ) { key_map[map] = k; };
                char getKeyMap( int map )         { return key_map[map]; };
-                       
-               // Basic interaction with the class.
-               void move  ( Real d );
-               void strafe( Real d );
-               void turn  ( Real d );          
-               void tilt  ( Real d );
-               
-               // Add a camera update transaction to manta with the current 
state
-               // of this Navigator.
-               void mantaAddTransaction();
                
                // Fox interaction via keyboard and mouse.
                long onKeyPress   ( FXObject *sender, FXSelector sel, void 
*data );
                long onMouseChange( FXObject *sender, FXSelector sel, void 
*data );
                
-               // Fox interaction with the class.
-               // void *data is a pointer to the Real d parameter.           
  
-               long onMove  ( FXObject *sender, FXSelector sel, void *data );
-               long onStrafe( FXObject *sender, FXSelector sel, void *data );
-               long onTurn  ( FXObject *sender, FXSelector sel, void *data );
-               long onTilt  ( FXObject *sender, FXSelector sel, void *data );
-               long onMantaAddTransaction( FXObject *sender, FXSelector sel, 
void *data );
-               
                // Transaction callback for manta thread. 
-               // THIS FUNCTION IS NOT CALLED BY THE FOX THREAD.
-               void manta_transaction();
+               void mantaThreadCallback() const;
        };
 };
 

Added: branches/itanium2/fox/FMantaUniformNav.cc
==============================================================================
--- (empty file)
+++ branches/itanium2/fox/FMantaUniformNav.cc   Sat Jun 18 01:13:29 2005
@@ -0,0 +1,129 @@
+#include <fox/FMantaUniformNav.h>
+
+#include <fxkeys.h>
+
+using namespace Manta;
+using namespace fox_manta;
+
+// This method sends the transaction to manta.
+void FMantaUniformNav::mantaAddTransaction( Action &action ) {
+
+       manta_interface->addTransaction("FMantaNavigator",
+               Callback::create(this, 
&FMantaUniformNav::mantaThreadCallback, action ));
+}
+
+// Mouse events.
+long FMantaUniformNav::onKeyPress   ( FXObject *sender, FXSelector sel, void 
*data ) {
+
+       FXEvent *event = (FXEvent *)data;
+       
+       if (event->text[0] == 'c') {
+               std::cout << "FMantaUniformNav" << std::endl;
+       }
+       
+       bool action_occured = false;
+       Action action;
+       
+       // Check to arrows.
+       switch (event->code) {
+       case KEY_Up:
+               if ((event->state & SHIFTMASK) == SHIFTMASK) {
+                       action.translation[1] =  amount;
+                       action.type = Action::TRANSLATE;
+               }
+               else {
+                       action.dolly = amount;
+                       action.type = Action::DOLLY;
+               }
+               break;
+       case KEY_Down:
+               if ((event->state & SHIFTMASK) == SHIFTMASK) {
+                       action.translation[1] = -amount;
+                       action.type = Action::TRANSLATE;
+               }
+               else {
+                       action.dolly = -amount;
+                       action.type = Action::DOLLY;
+               }
+               break;
+       case KEY_Left:
+               action.translation[0] = -amount;
+               action.type = Action::TRANSLATE;
+               break;
+       case KEY_Right:
+               action.translation[0] =  amount;
+               action.type = Action::TRANSLATE;
+               break;
+       };
+       
+       // Check for a fov change.
+       switch (event->text[0]) {
+       case '-':
+               action.scale_fov = 0.99;
+               action.type = Action::FOV;
+               break;
+       case '=':
+               action.scale_fov = 1.01;
+               action.type = Action::FOV;
+               break;
+       };
+       
+       // Check to see if anything happened.
+       if (action.type != Action::NONE) {
+       
+               // Send the action to manta.
+               mantaAddTransaction( action );
+       }
+       
+       return 1;
+}
+
+long FMantaUniformNav::onMouseChange( FXObject *sender, FXSelector sel, void 
*data ) {
+
+       FXEvent *event = (FXEvent *)data;
+       FXushort sel_type = FXSELTYPE( sel );
+       
+       // Record mouse up and mouse down.
+       if (sel_type == SEL_LEFTBUTTONPRESS) {
+               mouse_down = true;
+       }
+       else if (sel_type == SEL_LEFTBUTTONRELEASE) {
+               mouse_down = false;
+       }
+       
+       // Look for mouse movements.
+       else if (sel_type == SEL_MOTION && mouse_down) {
+               
+               Real delta_x = event->win_x - event->last_x;
+               Real delta_y = event->win_y - event->last_y;
+               
+               std::cerr << "delta " << delta_x << " " << delta_y << 
std::endl;
+       }
+       
+       return 1;
+}
+
+// This function is called by the manta thread.
+void FMantaUniformNav::mantaThreadCallback( Action action ) const {
+
+       // Check for a translation.
+       if (action.type == Action::TRANSLATE) {
+               manta_camera->translate( action.translation );
+       }
+       
+       // Check for a scale fov.
+       if (action.type == Action::FOV) {
+               manta_camera->scaleFOV( action.scale_fov );
+       }
+       
+       // Check for a rotation.
+       if (action.type == Action::ROTATE) {
+               manta_camera->transform( action.rotation, Camera::Eye );
+       }
+       
+       // Check for a dolly.
+       if (action.type == Action::DOLLY) {
+               manta_camera->dolly( action.dolly );
+       }
+}
+

Added: branches/itanium2/fox/FMantaUniformNav.h
==============================================================================
--- (empty file)
+++ branches/itanium2/fox/FMantaUniformNav.h    Sat Jun 18 01:13:29 2005
@@ -0,0 +1,57 @@
+#ifndef fox_FMantaUniformNav__H
+#define fox_FMantaUniformNav__H
+
+#include <MantaTypes.h>
+#include <Core/Geometry/PointVector.h>
+#include <Core/Geometry/AffineTransform.h>
+
+#include <fox/FMantaNavigator.h>
+
+namespace fox_manta {
+
+       using namespace Manta;
+       
+       // This navigator provides uniform panning, dolly, and rotation.
+       // The center of rotation by default is the camera itself, however 
+       // the user may "freeze" the center of rotation at a point and then 
+       // rotate the camera about that point.
+       class FMantaUniformNav : public FMantaNavigator {
+       private:
+               // This structure defines an amount to change the camera.
+               struct Action {
+                       
+                       // Type of action.
+                       enum { NONE = 0x0000, TRANSLATE, ROTATE, FOV, DOLLY };
+                       int type;
+
+                       // Fov, translate, or rotate.
+                       Real            scale_fov;
+                       Vector          translation;
+                       AffineTransform rotation;
+                       Real            dolly;
+                       
+                       Action() : type( NONE ), scale_fov( 1.0 ), 
translation( 0.0, 0.0, 0.0 ), dolly( 0 ) {
+                               rotation.initWithIdentity();
+                       };
+               };
+               
+               // Attributes.
+               Real amount; // Uniform amount to move.
+               bool mouse_down;
+               
+               // This method sends the transaction to manta.
+               void mantaAddTransaction( Action &action );
+               
+       public:
+               FMantaUniformNav() : mouse_down( false ), amount( 1.0 ) {  };
+       
+               // Mouse events.
+               long onKeyPress   ( FXObject *sender, FXSelector sel, void 
*data );
+               long onMouseChange( FXObject *sender, FXSelector sel, void 
*data );
+       
+               // This function is called by the manta thread.
+               void mantaThreadCallback( Action action ) const;
+       };
+};
+
+#endif
\ No newline at end of file

Modified: branches/itanium2/fox/FMantaWindow.cc
==============================================================================
--- branches/itanium2/fox/FMantaWindow.cc       (original)
+++ branches/itanium2/fox/FMantaWindow.cc       Sat Jun 18 01:13:29 2005
@@ -1,3 +1,5 @@
+
+
 #include <fox/FMantaWindow.h>
 #include <fox/FMantaImageFrame.h>
 
@@ -41,7 +43,12 @@
 long FMantaWindow::onQuit( FXObject *sender, FXSelector key, void *data ) {
        
        // Hard quit.
-       exit( 0 );
+       if (fast_quit) {
+               // SCIRun::Thread::allExit( 0 );
+               exit( 0 );
+       }
+       
+       manta_interface->finish();
        
        return 1;
 };

Modified: branches/itanium2/fox/FMantaWindow.h
==============================================================================
--- branches/itanium2/fox/FMantaWindow.h        (original)
+++ branches/itanium2/fox/FMantaWindow.h        Sat Jun 18 01:13:29 2005
@@ -47,7 +47,7 @@
                };
                
                // Constructors.
-               FMantaWindow() : manta_interface( 0 ) {  };
+               FMantaWindow() : manta_interface( 0 ), fast_quit( false ) {  
};
                FMantaWindow( FXApp *app, const FXString &name, int width = 
256, int height = 256,
                              FXIcon *ic=NULL,FXIcon *mi=NULL,FXuint 
opts=(DECOR_TITLE|DECOR_MINIMIZE|DECOR_MAXIMIZE|DECOR_BORDER|DECOR_SHRINKABLE|DECOR_STRETCHABLE|DECOR_MENU),
                                                                        FXint 
x=20,FXint y=20,FXint w=256,FXint h=256,FXint pl=0,FXint pr=0,FXint 
pt=0,FXint pb=0,FXint hs=0,FXint vs=0);
@@ -61,7 +61,7 @@
                // Accessors.
                void setMantaInterface( RTRTInterface *manta_interface_, int 
manta_channel_ ) { 
                        manta_interface = manta_interface_; 
manta_frame->setMantaInterface( manta_interface_, manta_channel_ ); };
-               void setNavigator( FMantaQuakeNav *navigator_ ) { 
manta_frame->setNavigator( navigator_ ); };
+               void setNavigator( FMantaNavigator *navigator_ ) { 
manta_frame->setNavigator( navigator_ ); };
                
                RTRTInterface    *getMantaInterface() { return 
manta_interface; };
                FMantaImageFrame *getMantaFrame()     { return manta_frame; };

Modified: branches/itanium2/fox/fox_manta.cc
==============================================================================
--- branches/itanium2/fox/fox_manta.cc  (original)
+++ branches/itanium2/fox/fox_manta.cc  Sat Jun 18 01:13:29 2005
@@ -10,6 +10,7 @@
 #include <Engine/Display/GLXImageDisplay.h>
 
 #include <fox/FMantaWindow.h>
+#include <fox/FMantaUniformNav.h>
 
 #include <string>
 #include <stdlib.h>
@@ -79,7 +80,14 @@
        quake_nav->setMantaCamera( camera );
        quake_nav->setMantaInterface( manta_interface );
        
-       manta_window.setNavigator( quake_nav );
+       // Create a uniform navigator.
+       FMantaUniformNav *uniform_nav = new FMantaUniformNav();
+       uniform_nav->setMantaCamera( camera );
+       uniform_nav->setMantaInterface( manta_interface );
+       
+       
+       FMantaNavigator *nav = uniform_nav;
+       manta_window.setNavigator( nav );
                
        // Create manta channel for the interface.
        int manta_channel = 0; // !!! See XWindowUI.cc line: 586




  • [MANTA] r394 - in branches/itanium2: Interface Model/Cameras fox, abe, 06/18/2005

Archive powered by MHonArc 2.6.16.

Top of page