Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

mousefilter.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------- //
00002 //
00003 // MODULE  : mousefilter.h
00004 //
00005 // PURPOSE : CMouseFilter - Definition and constants
00006 //
00007 // CREATED : 08/11/01
00008 //
00009 // (c) 2001 LithTech, Inc.  All Rights Reserved
00010 //
00011 // ----------------------------------------------------------------------- //
00012 
00013 
00014 #ifndef __MOUSE_FILTER_H__
00015 #define __MOUSE_FILTER_H__
00016 
00017 
00018 // Engine includes
00019 #include <ltbasedefs.h>
00020 
00021 
00023 #define MIN_INPUTBUFFERSIZE         1           // in frames
00024 #define MAX_INPUTBUFFERSIZE         500         // in frames
00025 
00026 #define INITIAL_TARGETINPUTBUFFERTIME   (0.5f)  // in seconds
00027 
00028 #define MIN_WEIGHTMOD               (0.0f)
00029 #define MAX_WEIGHTMOD               (1.0f)
00030 #define INITIAL_WEIGHTMOD           (0.65f)
00031 
00032 
00034 class CMouseFilter
00035 {
00036   public:
00037     // Construction / destruction
00038     CMouseFilter();
00039     ~CMouseFilter();
00040 
00041     void        PreUpdate();
00042 
00043     // Accessors
00044 
00045     LTVector3f  GetFilteredAxisOffsets()    { return m_vFilteredOffsets; }
00046 
00047     float       GetWeightMod()              { return m_fWeightMod; }
00048     void        SetWeightMod(float fWM);
00049 
00050     float       GetTargetInputBufferTime()  { return m_fTargetInputBufferTime; }
00051     void        SetTargetInputBufferTime(float fTime);
00052 
00053     uint16      GetInputBufferSize()        { return m_nInputBufferSize; }
00054 
00055   private:
00056 
00057     // Other functions
00058 
00059     void        CalcFilteredOffsets();
00060 
00061     // Members
00062 
00063     float           m_fWeightMod;
00064     float           m_fTargetInputBufferTime;   // in seconds
00065     uint16          m_nInputBufferSize;         // current adjusted size
00066     LTVector3f      m_vInputBuffer[MAX_INPUTBUFFERSIZE];
00067     LTVector3f      m_vFilteredOffsets;         // constantly updated
00068 
00069     uint16          m_nBufferOffset;            // offset into buffer
00070     uint16          m_nSamplesTaken;
00071 };
00072 
00073 
00074 #endif  // __MOUSE_FILTER_H__

Generated on Mon Mar 4 08:42:23 2002 for Aria by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002