Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

vrjGA::TrackballManager< TBType, TrackerType, ButtonType > Class Template Reference

#include <TrackballManager.h>

Inheritance diagram for vrjGA::TrackballManager< TBType, TrackerType, ButtonType >:

vrjGA::Referenced List of all members.

Public Types

typedef Referenced BaseClass

Public Member Functions

 VRJGA_DECLARE_POINTER (TrackballManager)
 TrackballManager ()
 TrackballManager (TBType *tb, TrackerType *w, ButtonType *b)
 TrackballManager (const TrackballManager &tbm)
TrackballManageroperator= (const TrackballManager &tbm)
void setActionButton (ButtonType *b)
const ButtonType * getActionButton () const
void setTracker (TrackerType *w)
const TrackerType * getTracker () const
void setTrackball (TBType *tb)
const TBType * getTrackball () const
void update ()

Protected Member Functions

 ~TrackballManager ()

template<class TBType, class TrackerType, class ButtonType>
class vrjGA::TrackballManager< TBType, TrackerType, ButtonType >


Member Typedef Documentation

template<class TBType, class TrackerType, class ButtonType>
typedef Referenced vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::BaseClass
 

Definition at line 34 of file TrackballManager.h.

Referenced by vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::TrackballManager().


Constructor & Destructor Documentation

template<class TBType, class TrackerType, class ButtonType>
vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::TrackballManager  )  [inline]
 

Definition at line 37 of file TrackballManager.h.

References vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::BaseClass.

00037                       : BaseClass(),
00038       _tb(0x0), _wand(0x0), _btn(0x0) {}

template<class TBType, class TrackerType, class ButtonType>
vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::TrackballManager TBType *  tb,
TrackerType *  w,
ButtonType *  b
[inline]
 

Definition at line 40 of file TrackballManager.h.

References vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::BaseClass.

00040                                                                : BaseClass(),
00041       _tb(tb), _wand(w), _btn(b) {}

template<class TBType, class TrackerType, class ButtonType>
vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::TrackballManager const TrackballManager< TBType, TrackerType, ButtonType > &  tbm  )  [inline]
 

Definition at line 43 of file TrackballManager.h.

References vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::BaseClass.

00043                                                  : BaseClass(),
00044       _tb(tbm._tb), _wand(tbm.wand), _btn(tbm._btn) {}

template<class TBType, class TrackerType, class ButtonType>
vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::~TrackballManager  )  [inline, protected]
 

Definition at line 84 of file TrackballManager.h.

00084 {}


Member Function Documentation

template<class TBType, class TrackerType, class ButtonType>
const ButtonType* vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::getActionButton  )  const [inline]
 

Definition at line 54 of file TrackballManager.h.

00054 { return _btn; }

template<class TBType, class TrackerType, class ButtonType>
const TBType* vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::getTrackball  )  const [inline]
 

Definition at line 60 of file TrackballManager.h.

00060 { return _tb; }

template<class TBType, class TrackerType, class ButtonType>
const TrackerType* vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::getTracker  )  const [inline]
 

Definition at line 57 of file TrackballManager.h.

00057 { return _wand; }

template<class TBType, class TrackerType, class ButtonType>
TrackballManager& vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::operator= const TrackballManager< TBType, TrackerType, ButtonType > &  tbm  )  [inline]
 

Definition at line 46 of file TrackballManager.h.

References vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::_btn, vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::_tb, and vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::_wand.

00047     {
00048       _tb = tbm._tb;
00049       _wand = tbm._wand;
00050       _btn = tbm._btn;
00051     }

template<class TBType, class TrackerType, class ButtonType>
void vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::setActionButton ButtonType *  b  )  [inline]
 

Definition at line 53 of file TrackballManager.h.

00053 { _btn = b; }

template<class TBType, class TrackerType, class ButtonType>
void vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::setTrackball TBType *  tb  )  [inline]
 

Definition at line 59 of file TrackballManager.h.

00059 { _tb = _tb; }

template<class TBType, class TrackerType, class ButtonType>
void vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::setTracker TrackerType *  w  )  [inline]
 

Definition at line 56 of file TrackballManager.h.

00056 { _wand = w; }

template<class TBType, class TrackerType, class ButtonType>
void vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::update  )  [inline]
 

Definition at line 63 of file TrackballManager.h.

00064     {
00065       _tb->setTime( _wand->time() );
00066 
00067       if( _btn->state() == gadget::Digital::ON )
00068       {
00069         gmtl::Matrix44f wand_matrix = _wand->matrix();
00070         gmtl::Vec3f RayOrigin = gmtl::makeTrans<gmtl::Vec3f, gmtl::Matrix44f>( wand_matrix );
00071         gmtl::Vec3f RayDirection = wand_matrix * gmtl::Vec3f(0.0, 0.0, -1.0);
00072 
00073         gmtl::Rayf TBray(RayOrigin, RayDirection);
00074         _tb->input(TBray);
00075       }
00076 
00077       else
00078       {
00079         _tb->update();
00080       }
00081     }

template<class TBType, class TrackerType, class ButtonType>
vrjGA::TrackballManager< TBType, TrackerType, ButtonType >::VRJGA_DECLARE_POINTER TrackballManager< TBType, TrackerType, ButtonType >   ) 
 


The documentation for this class was generated from the following file:
Generated on Thu Aug 12 16:42:14 2004 for vrjGA by doxygen 1.3.5