OpenSceneGraph 3.0: Beginner's Guide
eBook - ePub

OpenSceneGraph 3.0: Beginner's Guide

Rui Wang, Xuelei Qian

Partager le livre
  1. 412 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

OpenSceneGraph 3.0: Beginner's Guide

Rui Wang, Xuelei Qian

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

Written with a fast-paced but friendly and engaging approach, this Packt Beginner's Guide is designed to be placed alongside the computer as your guide and mentor. Step-by-step tutorials are bolstered by explanations of the reasoning behind what you are doing. You will quickly pick up the necessary skills, tips, and tricks for creating successful 3D graphics with practical examples that help you to learn by experiment and play. This book is intended for software developers who are new to OpenSceneGraph and considering using it in their applications. It is assumed that you have basic knowledge of C++ before using this book, especially the standard template library (STL) constructs, of which OSG makes extensive use. Some familiarity with design patterns as implemented in C++ is also useful, but is not required. You need to be familiar with OpenGL, the standard cross-platform low-level 3D graphics API. We'll meet some maths in the book—geometry and linear algebra—and familiarity with these topics will be great, but you don't need to be a maths whiz to use this book.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que OpenSceneGraph 3.0: Beginner's Guide est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  OpenSceneGraph 3.0: Beginner's Guide par Rui Wang, Xuelei Qian en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Informatik et Informationstechnologie. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2010
ISBN
9781849512831
Édition
1

OpenSceneGraph 3.0

Beginner's Guide


Table of Contents

OpenSceneGraph 3.0
Credits
Foreword
About the Authors
Acknowledgement
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Time for action—heading
What just happened?
Pop quiz—heading
Have a go hero—heading
Reader feedback
Customer support
Errata
Piracy
Questions
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
What just happened?
Live in community
Summary
2. Compilation and Installation of OpenSceneGraph
System requirements
Using the installer
Time for action—installing OSG
What just happened?
Running utilities
Time for action—playing with osgviewer
What just happened?
Pop quiz—dependencies of osgviewer
Have a go hero—playing with osgconv
Using the project wizard
Time for action—creating your solution with one click
What just happened?
Have a go hero—constructing "Hello World" with the wizard
Prebuilts making trouble?
Cross-platform building
Starting CMake
Time for action—running CMake in GUI mode
What just happened?
Setting up options
Generating packages using Visual Studio
Time for action—building with a Visual Studio solution
What just happened?
Pop quiz—the difference between ALL_BUILD and 'build all'
Generating packages using gcc
Time for action—building with a UNIX makefile
What just happened?
Have a go hero—checking mis-compiled parts
Configuring environment variables
Summary
3. Creating Your First OSG Program
Constructing your own projects
Time for action—building applications with CMake
What just happened?
Pop quiz—configuring OSG path options yourselves
Have a go hero—testing with different generators
Using a root node
Time for action—improving the "Hello World" example
What just happened?
Understanding memory management
ref_ptr<> and Referenced classes
Collecting garbage: why and how
Tracing the managed entities
Time for action—monitoring counted objects
What just happened?
Have a go hero—returning from a function
Pop quiz—release a smart pointer
Parsing command-line arguments
Time for action—reading the model filename from the command line
What just happened?
Tracing with the notifier
Redirecting the notifier
Time for action—saving the log file
What just happened?
Summary
4. Building Geometry Models
How OpenGL draws objects
Geode and Drawable classes
Rendering basic shapes
Time for action—quickly creating simple objects
What just happened?
Storing array data
Vertices and vertex attributes
Specifying drawing types
Time for action—drawing a colored quad
What just happened?
Pop quiz—results of different primitive types
Indexing primitives
Time for action—drawing an octahedron
What just happened?
Pop quiz—optimizing indexed geometries
Have a go hero—challenges with cubes and pyramids
Using polygonal techniques
Time for action—tessellating a polygon
What just happened?
Rereading geometry attributes
Customizing a primitive functor
Time for action—collecting triangle faces
What just happened?
Have a go hero—analyzing topology of a geometry
Implementing your own drawables
Using OpenGL drawing calls
Time for action—creating the famous OpenGL teapot
What just happened?
Summary
5. Managing Scene Graph
The Group interface
Managing parent nodes
Time for action—adding models to the scene graph
What just happened?
Pop quiz—fast dynamic casting
Traversing the scene graph
Transformation nodes
Understanding the matrix
The MatrixTransform class
Time for action—performing translations of child nodes
What just happened?
Pop quiz—matrix multiplications
Have a go hero—making use of the PositionAttitudeTransform class
Switch nodes
Time for action—switching between the normal and damaged Cessna
What just happened?
Level-of-detail nodes
Time for action—constructing a LOD Cessna
What just happened?
Proxy and paging nodes
Time for action—loading a model at runtime
What just happened?
Have a go hero—working with the PagedLOD class
Customizing your own NodeKits
Time for action—animating the switch node
What just happened?
Have a go hero—creating a tracker node
The visitor design pattern
Visiting scene graph structures
Time for action—analyzing the Cessna structure
What just happened?
Summary
6. Creating Realistic Rendering Effects
Encapsulating the OpenGL state machine
Attributes and modes
Time for action—setting polygon modes of different nodes
What just happened?
Inheriting render states
Time for action—lighting the glider or not
What just happened?
Playing with fixed-function effects
Time for action—applying simple fog to models
What just happened?
Have a go hero—searching for more effects
Lights and light sources
Time for action—creating light sources in the scene
What just happened?
Pop quiz—lights without sources
The Image class
The basis of texture mapping
Time for action—loading and applying 2D textures
What just happened?
Have a go hero—making use of filters and wrapping modes
Handling rendering order
Time for action—achieving the translucent effect
What just happened?
Understanding graphics shaders
Using uniforms
Time for action—implementing a cartoon cow
What just happened?
Pop quiz—replacements of built-in uniforms
Have a go hero—setting vertex attributes to shaders
Working with the geometry shader
Time for action—generating a Bezier curve
What just happened?
Have a go hero—having fun with shaders
Summary
7. Viewing the World
From world to...

Table des matiĂšres