Changeset 8269
- Timestamp:
- 05/01/08 00:47:48
- Files:
-
- OpenSceneGraph-TrainingMaterials/trunk/Sources/Exercises/10_callbacks/10a_UpdateCallbacks/10a_UpdateCallbacks.cpp (modified) (1 diff)
- OpenSceneGraph-TrainingMaterials/trunk/Sources/Exercises/10_callbacks/10b_EventCallbacks/10b_EventCallbacks.cpp (modified) (1 diff)
- OpenSceneGraph-TrainingMaterials/trunk/Sources/Exercises/10_callbacks/10c_CullCallbacks/10c_CullCallbacks.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
OpenSceneGraph-TrainingMaterials/trunk/Sources/Exercises/10_callbacks/10a_UpdateCallbacks/10a_UpdateCallbacks.cpp
r8117 r8269 6 6 int main( int argc, char **argv ) 7 7 { 8 std::cout<<"TODO "<<argv[0]<<std::endl; 8 // This exercise fleshes out how one 9 // can use Update NodeCallbacks 10 // 11 // 1. Load cow.osg and then decorate 12 // the model with a PositionAttitudeTransform 13 // pass this to the viewer. 14 // 15 // 2. Implement a custom NodeCallback 16 // that updates the position of the PositionAttitudeTransform 17 // on each frame according to a sin range so the cow 18 // "elegantly" bounces up and down. 9 19 10 20 return 0; OpenSceneGraph-TrainingMaterials/trunk/Sources/Exercises/10_callbacks/10b_EventCallbacks/10b_EventCallbacks.cpp
r8117 r8269 6 6 int main( int argc, char **argv ) 7 7 { 8 std::cout<<"TODO "<<argv[0]<<std::endl; 8 // This exercise fleshes out how one 9 // can use Event NodeCallbacks/EventHandlers 10 // 11 // 1. Load spaceship.osg and then decorate 12 // the model with a PositionAttitudeTransform 13 // pass this to the viewer. 14 // 15 // 2. Implement a custom EventHandler/NodeCallback and attach 16 // to the top most node of the model and have 17 // the handler catch all < events and rotate the model clockwise 18 // by 45 degrees, and > events rotate the model anti clockwise 19 // both about the z axis. 9 20 10 21 return 0; OpenSceneGraph-TrainingMaterials/trunk/Sources/Exercises/10_callbacks/10c_CullCallbacks/10c_CullCallbacks.cpp
r8117 r8269 6 6 int main( int argc, char **argv ) 7 7 { 8 std::cout<<"TODO "<<argv[0]<<std::endl; 8 // This exercise will explore the use 9 // of node cull callbacks. 10 11 // 1. Load the osgcool.osg model use a cull callback 12 // to control the traversal of a subgraph 13 // culling so that it only appears on alternately 14 // 50 frames on, 50 frames off. 15 // 16 // 2. Modify your cull callback so that it computes 17 // the distance from the eye point so when further 18 // away than two bounding sphere radius it implement 19 // the 50/50 alternatiion frame, but at less make 20 // model on all the time. 9 21 10 22 return 0;
