Contents
xv
Back Patch Culling 152
Back Patch Culling Advantage 153
When to Use Back Patch Culling 154
Method of Calculation 154
Updating the View Vector 155
Normals 155
Choosing the Type of Normal 156
Using Back Patch Culling 157
Enabling Back Patch Culling 157
Building Back Patch Culling Data for a csGeoSet 158
Updating Back Patch Culling Data 158
Back Patch Culling Code 159
Culling the View Frustum 160
Level of Detail Reduced for Performance 160
Choosing a Child Node Based on Range 161
Transitioning Between Levels of Detail 162
Performance Programming Techniques 163
Minimize Use of csAppearance Fields 163
Minimize Use of csAppearance Modes 163
Indexing csGeoSet Attributes 164
Setting the Transformation Matrix Directly 164
Compiling Part of a Scene Graph 164
15. Adding Sounds To Virtual Worlds 167
Overview 168
csSound Fields 169
Choosing Sound Samples to Play 169
Sound Priority 170
Playing the Sound File 170
Locating and Directing the Sound 170
Reverse Direction Sound 172
How to Play a Sound File 173