更新时间:2021-03-27 00:36:28
封面
OpenSceneGraph 3.0
Credits
Foreword
About the Authors
Acknowledgement
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Time for action—heading
Reader feedback
Customer support
Chapter 1. The Journey into OpenSceneGraph
A quick overview of rendering middleware
Scene graphs
The Birth and development of OSG
Components
Why OSG?
Who uses OSG?
Have a quick taste
Time for action—say "Hello World" OSG style
Live in community
Summary
Chapter 2. Compilation and Installation of OpenSceneGraph
System requirements
Using the installer
Time for action—installing OSG
Running utilities
Time for action—playing with osgviewer
Using the project wizard
Time for action—creating your solution with one click
Prebuilts making trouble?
Cross-platform building
Starting CMake
Time for action—running CMake in GUI mode
Setting up options
Generating packages using Visual Studio
Time for action—building with a Visual Studio solution
Generating packages using gcc
Time for action—building with a UNIX makefile
Configuring environment variables
Chapter 3. Creating Your First OSG Program
Constructing your own projects
Time for action—building applications with CMake
Using a root node
Time for action—improving the "Hello World" example
Understanding memory management
ref_ptr<> and Referenced classes
Collecting garbage: why and how
Tracing the managed entities
Time for action—monitoring counted objects
Parsing command-line arguments
Time for action—reading the model filename from the command line
Tracing with the notifier
Redirecting the notifier
Time for action—saving the log file
Chapter 4. Building Geometry Models
How OpenGL draws objects
Geode and Drawable classes
Rendering basic shapes
Time for action—quickly creating simple objects
Storing array data
Vertices and vertex attributes
Specifying drawing types
Time for action—drawing a colored quad
Indexing primitives
Time for action—drawing an octahedron
Using polygonal techniques
Time for action—tessellating a polygon
Rereading geometry attributes
Customizing a primitive functor
Time for action—collecting triangle faces
Implementing your own drawables
Using OpenGL drawing calls
Time for action—creating the famous OpenGL teapot
Chapter 5. Managing Scene Graph
The Group interface
Managing parent nodes
Time for action—adding models to the scene graph
Traversing the scene graph
Transformation nodes
Understanding the matrix
The MatrixTransform class
Time for action—performing translations of child nodes
Switch nodes
Time for action—switching between the normal and damaged Cessna
Level-of-detail nodes
Time for action—constructing a LOD Cessna
Proxy and paging nodes
Time for action—loading a model at runtime
Customizing your own NodeKits
Time for action—animating the switch node