Skip to Main Content
3D Game Engine Design, 2nd Edition
book

3D Game Engine Design, 2nd Edition

by David Eberly
November 2006
Intermediate to advanced content levelIntermediate to advanced
1040 pages
26h 31m
English
CRC Press
Content preview from 3D Game Engine Design, 2nd Edition
848 Chapter 18 Object-Oriented Infrastructure
Mouse events include pressing a mouse button and moving the mouse, which
generates calls to
OnMouseClick, OnMotion, and OnPassiveMotion. If your develop-
ment platform is Microsoft Windows or X-Windows, you might have been tempted
to have more mouse callbacks such as
OnLeftMouseDown and OnMiddleMouseUp, which
is reasonable for hardware and operating systems that support multiple-button mice.
However, a Macintosh mouse has only a single button, so I refrained from having
anything other than
OnMouseClick. I do pass in the button type (iButton), a but-
ton state (
iState), and button modifiers (uiModifiers). The platform-independent
names I use for these are
class WindowApplication : public Application
{
public:
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

3D Game Engine Architecture

3D Game Engine Architecture

David Eberly
Blender 3D By Example - Second Edition

Blender 3D By Example - Second Edition

Oscar Baechler, Xury Greer
Computer Graphics

Computer Graphics

Alexey Boreskov, Evgeniy Shikin

Publisher Resources

ISBN: 9781482267303