| |||||||||
|
|
| |||||||
|
| ||||||||
| |||||||||
#include "vg.h" // Required for the standard Vega classes
void switchObserver2MotionModel( const int obsIdx, const int motIdx ){ // ########################################################## // # Local Function // # // # This functions show how to change a vgObserver to use // # a vgMotion Model // # // # // ##########################################################
// // We need a pointer to the observer // vgObserver *obs = vgGetObserv(obsIdx);
// // Remove the Navigator association with the Observer // vgObservNav( obs, NULL );
// // Remove the Player association with the Observer // vgObservPlyr( obs, NULL );
// // Retrieve the motion model and enable it // vgMotion *mot = vgGetMot(motIdx);
vgProp( mot, VGCOMMON_ENABLED, VG_ON );
vgUpdate( mot );
// // Associate the motion model with the observer // vgObservMot( obs, mot );
// // The Observer needs to be relative to the origin // vgProp( obs, VGOBS_TETHERCOORD, VGOBS_TABSOLUTE);
// // The Observer now needs to be Dynamic Tethered state // vgProp( obs, VGOBS_TETHERSTATE, VGOBS_DYNAMIC );
// // Finally enable the Observer // vgProp( obs, VGCOMMON_ENABLED, VG_ON );
} // switchObserver2MotionModel
| ||
© Copyright 2004 Gordon Tomlinson All Rights Reserved. All logos, trademarks and copyrights in this site are property of their respective owner. |