18 #include "precompiled.h"
33 #define EMULATE_FINGERS_WITH_MOUSE 0
41 m_State(STATE_INACTIVE)
56 #if OS_ANDROID || EMULATE_FINGERS_WITH_MOUSE
149 float zoomDist = (newDist - oldDist) * -0.005f *
m_PanDist;
192 #if EMULATE_FINGERS_WITH_MOUSE
262 #if SDL_VERSION_ATLEAST(2, 0, 0)
267 case SDL_FINGERMOTION:
270 debug_printf(L
"finger %s tid=%lld fid=%lld x=%d y=%d dx=%d dy=%d p=%d\n",
271 ev->
ev.
type == SDL_FINGERDOWN ?
"down" :
272 ev->
ev.
type == SDL_FINGERUP ?
"up" :
273 ev->
ev.
type == SDL_FINGERMOTION ?
"motion" :
"?",
274 ev->
ev.tfinger.touchId, ev->
ev.tfinger.fingerId,
275 ev->
ev.tfinger.x, ev->
ev.tfinger.y, ev->
ev.tfinger.dx, ev->
ev.tfinger.dy, ev->
ev.tfinger.pressure);
277 if (ev->
ev.
type == SDL_FINGERDOWN)
279 else if (ev->
ev.
type == SDL_FINGERUP)
281 else if (ev->
ev.
type == SDL_FINGERMOTION)
void Translate(float x, float y, float z)
CVector3D GetWorldCoordinates(int px, int py, bool aboveWater=false) const
SDL_MouseMotionEvent motion
#define UNUSED2(param)
mark a function local variable or parameter as unused and avoid the corresponding compiler warning...
CMatrix3D & GetOrientation()
SDL_MouseButtonEvent button
CGame * g_Game
Globally accessible pointer to the CGame object.
void UpdateFrustum(const CBoundingBoxAligned &scissor=CBoundingBoxAligned(CVector3D(-1.0f,-1.0f,-1.0f), CVector3D(1.0f, 1.0f, 1.0f)))
CGameView * GetView()
Get the pointer to the game view object.
void BuildCameraRay(int px, int py, CVector3D &origin, CVector3D &dir) const
int SDL_PushEvent(SDL_Event *ev)
CVector3D GetTranslation() const
static float Length(const SVec3 v)
void debug_printf(const wchar_t *fmt,...)
write a formatted string to the debug channel, subject to filtering (see below).