Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

dev6d.H

Go to the documentation of this file.
00001 #ifndef _dev6d_H_
00002 #define _dev6d_H_
00003 
00004 #include "std/config.H" // for Greal
00005 #include "event/event.H"
00006 #include "dev/dev.H"
00007 
00008 class Wtransf;
00009 typedef const Wtransf cWtransf;
00010 typedef Greal RAWmat[4][4];
00011 
00012 MAKE_PTR_SUBC(EVENT6d, EVENT);
00013 class DllImpExp EVENT6d : public EVENT {
00014  public:
00015              EVENT6d(EVENTsource *s);
00016              EVENT6d(EVENTsource *s, cWtransf &o, cWtransf &c, double t)
00017                   : EVENT(s), _cur(c), _old(o),_time(t)  {}
00018 
00019    cWtransf &cur  () const { return _cur; }
00020    cWtransf &old  () const { return _old; }
00021    Wtransf   delta() const;
00022    double    time () const { return _time; }
00023 
00024    //  alternate interface that avoids having to include any mlib files
00025    void      cur  (RAWmat &d, bool row=true) const;
00026    void      old  (RAWmat &d, bool row=true) const;
00027    void      delta(RAWmat &d, bool row=true) const;
00028 
00029     /* ------------ TYPEDOBJ methods ---------------- */
00030 
00031    DEFINE_DERIVED_TYPE(EVENT6d, EVENT, cEVENTptr);
00032    static EVENT6dptr cast(cEVENTptr &e) { return EVENT6d::isa(e) ? 
00033                                                  (EVENT6d *)&*e : 0; }
00034 
00035  protected:
00036     /* ------------ EVENT methods ---------------- */
00037    virtual bool compare(cEVENTptr &/*e*/) const { return true; }
00038    cWtransf &_cur, &_old;
00039    double    _time;
00040 };
00041 
00042 
00043 
00044 class DEVice_6d : public DEVice {
00045  protected:
00046    Wtransf       &_cur;          /* tracker->world transform */
00047    EVENTptr       _room_ev;
00048 
00049  public:
00050                   DEVice_6d(Cstr_ptr &n, Cstr_ptr &e);
00051    virtual       ~DEVice_6d()                         { }
00052    cWtransf      &cur()                         const { return _cur; };
00053    void           cur(RAWmat &d, bool row=true) const;
00054    virtual void   event(cWtransf &, double time);
00055 
00056     /* ----------- TYPEDOBJ methods --------------- */
00057     DEFINE_DERIVED_TYPE(DEVice_6d, DEVice, const DEVice *);
00058 };
00059 
00060 #endif

Generated on Mon Sep 15 16:25:56 2003 for gluebase by doxygen1.2.18