MOUSE Class Reference

#include <mouse.h>

Collaboration diagram for MOUSE:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MOUSE ()
void Update (CAMERA &cam, int screenw, int screenh, float timefactor, float fps)
float GetZoom ()
QUATERNION GetDir ()
void InitDir (QUATERNION newd)
bool GetMouseControls (float *x, float *y, bool *click_l, bool *click_r)
bool IsPressed (int which_btn)
void SetDeadzoneY (float newydz)
void SetSensitivityX (float newxs)
void SetSensitivityY (float newys)
float GetDeadzoneY ()
float GetSensitivityX ()
float GetSensitivityY ()
void GetMousePos (int &xpos, int &ypos)
void GetMouseButtons (bool &btn_l, bool &btn_m, bool &btn_r, bool &scroll_up, bool &scroll_down)
void UpdateSettings ()

Private Member Functions

void UpdateCamera (CAMERA &cam, int mousePos_x, int mousePos_y, float timefactor, float fps)
void UpdateSteering (int x, int y)
void ClearBounce ()

Private Attributes

float mousezoom
QUATERNION viewdir
float mouse_sensitivity_x
float mouse_sensitivity_y
float deadzone_y
float steer_x
float steer_y
bool lbounce
bool mbounce
bool rbounce
bool lastl
bool lastm
bool lastr
bool upbounce
bool downbounce
bool lastup
bool lastdown

Detailed Description

Definition at line 16 of file mouse.h.


Constructor & Destructor Documentation

MOUSE::MOUSE  ) 
 

Definition at line 43 of file mouse.cpp.

References mousezoom, steer_x, and steer_y.


Member Function Documentation

void MOUSE::ClearBounce  )  [inline, private]
 

Definition at line 28 of file mouse.h.

References lastl, lastr, lbounce, and rbounce.

float MOUSE::GetDeadzoneY  )  [inline]
 

Definition at line 41 of file mouse.h.

References deadzone_y.

QUATERNION MOUSE::GetDir  )  [inline]
 

Definition at line 34 of file mouse.h.

References viewdir.

void MOUSE::GetMouseButtons bool &  btn_l,
bool &  btn_m,
bool &  btn_r,
bool &  scroll_up,
bool &  scroll_down
 

Definition at line 240 of file mouse.cpp.

References downbounce, lbounce, mbounce, NULL, rbounce, and upbounce.

Referenced by VGUI::Gui::MousePress(), and VGUI::Gui::MouseRelease().

bool MOUSE::GetMouseControls float *  x,
float *  y,
bool *  click_l,
bool *  click_r
 

Definition at line 187 of file mouse.cpp.

References deadzone_y, downbounce, lastdown, lastl, lastm, lastr, lastup, lbounce, mbounce, NULL, rbounce, steer_x, steer_y, and upbounce.

void MOUSE::GetMousePos int &  xpos,
int &  ypos
 

Definition at line 229 of file mouse.cpp.

Referenced by VGUI::Gui::MousePress(), VGUI::Gui::MouseRelease(), and VGUI::Gui::MouseUpdate().

float MOUSE::GetSensitivityX  )  [inline]
 

Definition at line 42 of file mouse.h.

References mouse_sensitivity_x.

float MOUSE::GetSensitivityY  )  [inline]
 

Definition at line 43 of file mouse.h.

References mouse_sensitivity_y.

float MOUSE::GetZoom  )  [inline]
 

Definition at line 33 of file mouse.h.

References mousezoom.

void MOUSE::InitDir QUATERNION  newd  )  [inline]
 

Definition at line 35 of file mouse.h.

References viewdir.

bool MOUSE::IsPressed int  which_btn  ) 
 

Definition at line 224 of file mouse.cpp.

References NULL.

Referenced by VGUI::Gui::MousePress().

void MOUSE::SetDeadzoneY float  newydz  )  [inline]
 

Definition at line 38 of file mouse.h.

References deadzone_y.

void MOUSE::SetSensitivityX float  newxs  )  [inline]
 

Definition at line 39 of file mouse.h.

References mouse_sensitivity_x.

void MOUSE::SetSensitivityY float  newys  )  [inline]
 

Definition at line 40 of file mouse.h.

References mouse_sensitivity_x.

void MOUSE::Update CAMERA cam,
int  screenw,
int  screenh,
float  timefactor,
float  fps
 

Definition at line 3 of file mouse.cpp.

References UpdateSteering().

Referenced by Update().

void MOUSE::UpdateCamera CAMERA cam,
int  mousePos_x,
int  mousePos_y,
float  timefactor,
float  fps
[private]
 

Definition at line 53 of file mouse.cpp.

References cam, EARTH_RADIUS, mousezoom, VERTEX::normalize(), NULL, CAMERA::position, QUATERNION::RotateVec(), QUATERNION::SetAxisAngle(), QUATERNION::SetEuler(), viewdir, VERTEX::x, VERTEX::y, VERTEX::z, and ZOOMSPEED.

void MOUSE::UpdateSettings  ) 
 

Definition at line 255 of file mouse.cpp.

References deadzone_y, SETTINGS::Get(), mouse_sensitivity_x, mouse_sensitivity_y, and settings.

Referenced by VGUI::Gui::ProcessAction().

void MOUSE::UpdateSteering int  x,
int  y
[private]
 

Definition at line 166 of file mouse.cpp.

References mouse_sensitivity_x, mouse_sensitivity_y, steer_x, and steer_y.

Referenced by Update().


Member Data Documentation

float MOUSE::deadzone_y [private]
 

Definition at line 25 of file mouse.h.

Referenced by GetDeadzoneY(), GetMouseControls(), SetDeadzoneY(), and UpdateSettings().

bool MOUSE::downbounce [private]
 

Definition at line 27 of file mouse.h.

Referenced by GetMouseButtons(), and GetMouseControls().

bool MOUSE::lastdown [private]
 

Definition at line 27 of file mouse.h.

Referenced by GetMouseControls().

bool MOUSE::lastl [private]
 

Definition at line 27 of file mouse.h.

Referenced by ClearBounce(), and GetMouseControls().

bool MOUSE::lastm [private]
 

Definition at line 27 of file mouse.h.

Referenced by GetMouseControls().

bool MOUSE::lastr [private]
 

Definition at line 27 of file mouse.h.

Referenced by ClearBounce(), and GetMouseControls().

bool MOUSE::lastup [private]
 

Definition at line 27 of file mouse.h.

Referenced by GetMouseControls().

bool MOUSE::lbounce [private]
 

Definition at line 27 of file mouse.h.

Referenced by ClearBounce(), GetMouseButtons(), and GetMouseControls().

bool MOUSE::mbounce [private]
 

Definition at line 27 of file mouse.h.

Referenced by GetMouseButtons(), and GetMouseControls().

float MOUSE::mouse_sensitivity_x [private]
 

Definition at line 24 of file mouse.h.

Referenced by GetSensitivityX(), SetSensitivityX(), SetSensitivityY(), UpdateSettings(), and UpdateSteering().

float MOUSE::mouse_sensitivity_y [private]
 

Definition at line 24 of file mouse.h.

Referenced by GetSensitivityY(), UpdateSettings(), and UpdateSteering().

float MOUSE::mousezoom [private]
 

Definition at line 19 of file mouse.h.

Referenced by GetZoom(), MOUSE(), and UpdateCamera().

bool MOUSE::rbounce [private]
 

Definition at line 27 of file mouse.h.

Referenced by ClearBounce(), GetMouseButtons(), and GetMouseControls().

float MOUSE::steer_x [private]
 

Definition at line 26 of file mouse.h.

Referenced by GetMouseControls(), MOUSE(), and UpdateSteering().

float MOUSE::steer_y [private]
 

Definition at line 26 of file mouse.h.

Referenced by GetMouseControls(), MOUSE(), and UpdateSteering().

bool MOUSE::upbounce [private]
 

Definition at line 27 of file mouse.h.

Referenced by GetMouseButtons(), and GetMouseControls().

QUATERNION MOUSE::viewdir [private]
 

Definition at line 20 of file mouse.h.

Referenced by GetDir(), InitDir(), and UpdateCamera().


The documentation for this class was generated from the following files:
Generated on Thu Oct 19 04:12:05 2006 by  doxygen 1.4.6