Show
Ignore:
Timestamp:
11/26/07 22:53:32 (1 year ago)
Author:
vossg
Message:

changed: more flexible navigators, allow user navigator (thanks to M. Spindler for the code)

: add _d when pulling windows dlls

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Source/System/Window/Utilities/OSGFlyEngine.h

    r785 r1021  
    33 *                                                                           * 
    44 *                                                                           * 
    5  *             Copyright (C) 2000,2001 by the OpenSG Forum                   * 
     5 *             Copyright (C) 2000-2002 by the OpenSG Forum                   * 
    66 *                                                                           * 
    77 *                            www.opensg.org                                 * 
     
    3737\*---------------------------------------------------------------------------*/ 
    3838 
    39 #ifndef _OSG_FLYNAVIGATOR_H_ 
    40 #define _OSG_FLYNAVIGATOR_H_ 
     39#ifndef _OSG_FLYENGINE_H_ 
     40#define _OSG_FLYENGINE_H_ 
    4141 
    4242#include "OSGConfig.h" 
    4343#include "OSGUtilDef.h" 
    4444 
    45 #include "OSGBaseTypes.h" 
    4645#include "OSGVector.h" 
    47 #include "OSGMatrix.h" 
    4846#include "OSGQuaternion.h" 
     47#include "OSGViewport.h" 
     48#include "OSGNavigatorEngine.h" 
    4949 
    5050OSG_BEGIN_NAMESPACE 
    5151 
    52 /*! \brief Navigator for simple fly model. See \ref  
     52/*! \brief Navigator engine for simple fly model. See \ref  
    5353    PageSystemWindowNavigatorsFly for a description. 
    5454*/ 
     55class OSG_UTIL_DLLMAPPING FlyEngine : public NavigatorEngine 
     56{ 
     57    typedef NavigatorEngine Inherited; 
    5558 
    56 class OSG_UTIL_DLLMAPPING FlyNavigator 
    57 { 
    5859    /*==========================  PUBLIC  =================================*/ 
    5960  public: 
     61 
     62 
     63 
    6064    /*---------------------------------------------------------------------*/ 
    6165    /*! \name                   Constructors                               */ 
    6266    /*! \{                                                                 */ 
    6367 
    64     FlyNavigator(); 
     68    FlyEngine(void); 
    6569 
    6670    /*! \}                                                                 */ 
     
    6973    /*! \{                                                                 */ 
    7074 
    71     virtual ~FlyNavigator(); 
     75    ~FlyEngine(void); 
     76 
     77    /*! \}                                                                 */ 
     78    /*---------------------------------------------------------------------*/ 
     79    /*! \name                    Class Get                                 */ 
     80    /*! \{                                                                 */ 
     81 
     82    const char *getClassname(void) { return "FlyEngine"; } 
    7283 
    7384    /*! \}                                                                 */ 
     
    7687    /*! \{                                                                 */ 
    7788 
    78     Matrix &getMatrix(void); 
    79     Pnt3f  &getFrom  (void); 
    80     Pnt3f  &getAt    (void); 
    81     Vec3f  &getUp    (void); 
     89    virtual const Pnt3f  &getFrom(void); 
     90    virtual const Pnt3f  &getAt(void); 
     91    virtual const Vec3f  &getUp(void); 
     92    virtual const Matrix &getMatrix(void); 
     93    virtual Real32 getDistance(void); 
    8294 
    8395    /*! \}                                                                 */ 
     
    8698    /*! \{                                                                 */ 
    8799 
    88     void setFrom   (Pnt3f new_from); 
    89     void setAt     (Pnt3f new_at); 
    90     void setUp     (Vec3f new_up); 
    91     void set       (Pnt3f new_from, Pnt3f new_at, Vec3f new_up); 
    92     void set       (Matrix new_matrix); 
     100    virtual void setFrom(Pnt3f new_from); 
     101    virtual void setAt(Pnt3f new_at); 
     102    virtual void setUp(Vec3f new_up); 
     103    virtual void set(Pnt3f new_from, Pnt3f new_at, Vec3f new_up); 
     104    virtual void set(const Matrix & new_matrix); 
     105    virtual void setDistance(Real32 new_distance); 
     106 
     107    /*! \}                                                                 */ 
     108    /*---------------------------------------------------------------------*/ 
     109    /*! \name              navigator engine callbacks                      */ 
     110    /*! \{                                                                 */ 
     111 
     112    virtual void buttonPress(Int16 button,Int16 x,Int16 y,Navigator* nav); 
     113    virtual void buttonRelease(Int16 ,    Int16 x,Int16 y,Navigator* nav); 
     114    virtual void keyPress(Int16 key,      Int16 x,Int16 y,Navigator* nav); 
     115    virtual void moveTo(                  Int16 x,Int16 y,Navigator* nav); 
     116    virtual void idle(Int16 buttons,      Int16 x,Int16 y,Navigator* nav); 
     117 
     118    virtual void onViewportChanged(ViewportPtr new_viewport); 
    93119 
    94120    /*! \}                                                                 */ 
     
    97123    /*! \{                                                                 */ 
    98124 
    99     void   rotate (Real32 deltaX, Real32 deltaY); 
    100     Real32 forward(Real32 step); 
    101     Real32 right  (Real32 step); 
     125    virtual void   rotate (Real32 deltaX, Real32 deltaY); 
     126    virtual Real32 forward(Real32 step); 
     127    virtual Real32 right  (Real32 step); 
    102128 
    103129    /*! \}                                                                 */ 
    104130    /*==========================  PROTECTED  ==============================*/ 
    105131  protected: 
     132     
    106133    /*---------------------------------------------------------------------*/ 
    107134    /*! \name                     Members                                  */ 
     
    114141 
    115142    /*! \}                                                                 */ 
     143 
     144  private: 
     145    /* Not implemented */ 
     146    FlyEngine(const FlyEngine &other); 
     147    FlyEngine &operator =(const FlyEngine &other); 
    116148}; 
    117149