Cover
Copyright
Credits
About the Author
About the Reviewers
www.PacktPub.com
Table of Contents
Preface
Chapter 1: Building a Game
Application
Application components
Exploring the Bullet and FreeGLUT projects
Exploring Bullet's built-in demo applications
Starting a new project
Building the application layer
Configuring FreeGLUT
glutKeyboardFunc/glutKeyboardUpFunc
glutSpecialFunc/glutSpecialUpFunc
glutMouseFunc
glutMotionFunc/glutPassiveMotionFunc
glutReshapeFunc
glutDisplayFunc
glutIdleFunc
Initializing FreeGLUT
glutInit
glutInitDisplayMode
glutInitWindowPosition/glutInitWindowSize
glutCreateWindow
glutSetOption
Launching FreeGLUT
Summary
Chapter 2
: Rendering and User Input
Rendering the scene
Introducing double-buffering
Understanding the basics of camera
glIdentity
glFrustum
gluLookAt
glViewport
Basic rendering and lighting
Creating a simple box
Let there be light!
Normals
Creating ambient, diffuse, and specular lighting
Understanding depth testing
glLightfv
glEnable
glMaterialfv/glMateriali
glShadeModel
glDepthFunc
Coloring your box
Understanding rendering pipelines
User input and camera control
Implementing camera control
Gathering user input
Summary
Chapter 3
: Physics Initialization
The core bullet objects
The world object
The broad phase
The collision configuration
The collision dispatcher
The constraint solver
Creating the Bullet components
Creating our first physics object
The collision shape
The motion state
The collision object
Building a custom motion state
Creating a box
Rendering from transform data
Stepping the simulation
Summary
Chapter 4
: Object Management and Debug Rendering
Handling multiple objects
Designing our objects
Rendering our objects
Storing our objects
Creating our objects
Debug rendering
Building the debug drawer
Introducing activation states
The domino effect
Summary
Chapter 5
: Raycasting and Constraints
The power of raycasting
Picking rays
Destroying objects
Constraints
Understanding constraints
Picking up the objects
Building a constraint
Summary
Chapter 6
: Events, Triggers, and Explosions
Building a collision event system
Explaining the persistent manifolds
Managing the collision event
Building trigger volumes
Disabling contact response
Force, torque, and impulse
Understanding the object motion
Applying forces
Applying impulses
Summary
Chapter 7
: Collision Shapes
Spheres and cylinders
Convex hulls
Creating convex hulls from mesh data
Compound shapes
Summary
Chapter 8
: Collision Filtering
Groups and masks
Defining linear and angular freedom
Summary
Chapter 9
: Soft Body Dynamics
Soft body requirements
Initialization
Creating soft bodies
Rendering soft bodies
Summary
Index