阅读:1624回复:0
VEGA实用编程手册4
<H2 ><FONT face=Tahoma size=6>Vega Observer(vgObserver)</FONT></H2>
<P ><FONT size=2><FONT face="Times New Roman">The Vega Observer is a collection of attributes and references to Vega class descriptors that together describe a visual representation. The funcions specify the characterisitcs, position and control visual representations within the Vega system. <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">The observer may look at several channels, but the observer can only be associated with one scene, one graphic state, on player, and one motion model.<p></p></FONT></FONT></P> <H3 ><FONT face=Tahoma size=3>Vega Observer Functions</FONT></H3> <P ><FONT size=2><FONT face="Times New Roman">vgObserver * vgNewObserv ( void ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgObserver * vgFindObserv ( const char *name ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgObserver * vgGetObserv ( int idx ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">int vgGetNumObserv ( void ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgObservStressLevel ( vgObserver *obs, float low, float high, float ramp ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgGetObservStressLevel ( vgObserver *obs, float *low, float *high, float *ramp ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgObservScene ( vgObserver *obs , vgScene *scene ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgScene * vgGetObservScene ( vgObserver *obs ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgObservGfx ( vgObserver *obs, vgGfx *gfx ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgGfx * vgGetObservGfx ( vgObserver *obs ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgObservMot ( vgObserver *obs, vgMotion *mot ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgMotion * vgGetObservMot ( vgObserver *obs ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgObservNav ( vgObserver *obs, vgNavigator *nav ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgNavigator * vgGetObservNav ( vgObserver *obs ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgObservVol ( vgObserver *obs, vgVolume *vol ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgVolume * vgGetObservVol ( vgObserver *obs ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgAddObservIsect ( vgObserver *obs, vgIsector *isect ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">int vgRemObservIsect ( vgObserver *obs, vgIsector *isect ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">int vgGetObservNumIsect ( vgObserver *obs ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgIsector * vgGetObservIsect ( vgObserver *obs, int _index ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgObservIDev ( vgObserver *obs, vgIDev *input ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgIDev * vgGetObservIDev ( vgObserver *obs ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgAddObservChan ( vgObserver *obs, vgChannel *chan ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">int vgRemObservChan ( vgObserver *obs, vgChannel *chan ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">int vgGetObservNumChan ( vgObserver *obs ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgChannel * vgGetObservChan ( vgObserver *obs, int _index ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgAddObservEnv ( vgObserver *obs, vgEnv *env ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">int vgRemObservEnv ( vgObserver *obs, vgEnv *env ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">int vgGetObservNumEnv ( vgObserver *obs ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgEnv * vgGetObservEnv ( vgObserver *obs, int _index ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgObservEnv ( vgObserver *obs, vgEnv *env ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgObservPlyr ( vgObserver *obs, vgPlayer *plyr ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgPlayer * vgGetObservPlyr ( vgObserver *obs ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgObservTetherPos ( vgObserver *obs, vgPosition *pos ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgGetObservTetherPos ( vgObserver *obs, vgPosition *pos ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgObservTetherOffset ( vgObserver *obs, float x, float y, float z); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgGetObservTetherOffset ( vgObserver *obs, float *x, float *y, float *z ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgObservLookatPos ( vgObserver *obs, vgPosition *pos ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgPosition * vgGetObservLookatPos ( vgObserver *obs ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgObservLookatObj ( vgObserver *obs, vgObject *obj ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgObject * vgGetObservLookatObj ( vgObserver *obs ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgObservLookatPlyr ( vgObserver *obs, vgPlayer *plyr ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgPlayer * vgGetObservLookatPlyr ( vgObserver *obs ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgObservChanShareMask ( vgObserver *obs, int mask); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">int vgGetObservChanShareMask ( vgObserver *obs ); <p></p></FONT></FONT></P> <H3 ><FONT size=3><FONT face=Tahoma>Vega Observer</FONT>回调函数</FONT></H3> <P ><FONT size=2>VGOBS_ADD_ENV<FONT face="Times New Roman"> – adding an environment<p></p></FONT></FONT></P> <P ><FONT size=2>VGOBS_REM_ENV<FONT face="Times New Roman"> – removing an environment<p></p></FONT></FONT></P> <H3 ><FONT face=Tahoma size=3>Vega Observer Properties</FONT></H3> <P ><FONT size=2><FONT face="Times New Roman">VGOBS_STATE observer state attribute<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGOBS_PLYRCLOAK render geometry associated with plyr<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGOBS_STEREOSEP separation of viewpoint<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGOBS_STEREORNG range of viewpoint convergence(</FONT>收敛<FONT face="Times New Roman">)<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGOBS_HAT return height above terrain<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGOBS_STRESS enable/disable load management<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGOBS_LOOKAT_TARGET specify target for observer<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGOBS_TEHTERSTATE<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGOBS_TETHERCOORD<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGOBS_MAXTLIST<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGOBS_TLAG<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGOBS_SPINRAD<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGOBS_SPINDELTA<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGOBS_SPINELEV<p></p></FONT></FONT></P> <H2 ><FONT face=Tahoma size=6>Vega Scene(vgScene)</FONT></H2> <P ><FONT face="Times New Roman" size=2>A Vega Scene (vgScene) is a collection of objects that can be viewed by an observer. Vega can manage any number of scenes at one time, and multiple observers can view the same scene simultaneously</FONT>.<p></p></P> <H3 ><FONT size=3><FONT face=Tahoma>Vega Scene Functions<p></p></FONT></FONT></H3> <P ><FONT size=2><FONT face="Times New Roman">vgScene * vgNewScene ( void ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgScene * vgNewSceneCopy ( const vgScene *scene ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgScene * vgFindScene ( const char *name ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgScene * vgGetScene ( int idx ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">int vgGetNumScene ( void ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgAddSceneObj ( vgScene *sc, vgObject *obj ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">int vgGetSceneNumObj ( vgScene *sc ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgObject * vgGetSceneObj ( vgScene *sc, int idx ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgRemSceneObj ( vgScene *sc, vgObject *obj ); <p></p></FONT></FONT></P> <P ><FONT face="Times New Roman" size=2>void vgOptimizeScene ( vgScene *sc, unsigned optim );</FONT> <p></p></P> <H2 ><FONT size=6><FONT face=Tahoma>Vega Data Set</FONT>(</FONT><FONT face=Tahoma>vgDataset</FONT>)</H2> <P ><FONT face="Times New Roman" size=2>The Vega Data Set Functions (vgDataset) is the basic mechanism Vega uses to bring data into the system. A data set is conceptually any collection of data.</FONT></P> <H3 ><FONT face=Tahoma size=3>Vega Data Set Functions</FONT></H3> <P ><FONT size=2><FONT face="Times New Roman">vgDataSet * vgNewDS ( void ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgDataSet * vgNewDSCopy ( const vgDataSet *src ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgDataSet * vgFindDS ( const char *name ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgDataSet * vgGetDS ( int _index ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">int vgGetNumDS ( void ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">ERR vgLoadDS ( vgDataSet *ds ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">ERR vgUnloadDS ( vgDataSet *ds ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">int vgMakeDS ( vgDataSet *ds, void *data, vgDSType type ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">int vgDSLoader ( void *(*loader)(char *), vgDSType type, char *ext ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">int vgFilePath ( const char *path ); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">void vgAddDSTex ( vgDataSet *ds, vgTexture *<st1:State w:st="on"><st1:place w:st="on">tex</st1:place></st1:State> ); <p></p></FONT></FONT></P> <H3 ><FONT face=Tahoma size=3>Example: Naming a dataset</FONT></H3> <P ><FONT size=2><FONT face="Times New Roman">vgDataset myDataset<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">myDAtaset=vgNewDS(); <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">vgName(myDataset, "egg.flt");<p></p></FONT></FONT></P> <H3 ><FONT size=3><FONT face=Tahoma>Vega Data Set</FONT>回调函数</FONT></H3> <P ><p> </p></P> <P ><FONT size=2><FONT face="Times New Roman"> VGDS_PRELOAD Called before a file is loaded. Called from<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman"> the DBASE process.<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman"> VGDS_MGFLTBEAD Add a callback which is called every time a new<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman"> bead is read from the MultiGen flight file.<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman"> (flt loader only) This is called from <p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman"> the DBASE process.<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman"> VGDS_POSTLOAD Called after a file is loaded. Called from the<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman"> DBASE process.<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman"> VGDS_STATE_CHANGE Get notified when the dataset changes state<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman"> (i.e. is loaded or unloaded).<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman"> This is called from the APP process.<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman"> VGDS_POSTTEXLOAD Invoked after all textures for an dataset have<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman"> been downloaded.<p></p></FONT></FONT></P> <H3 ><FONT face=Tahoma size=3>Vega Data Set properties</FONT></H3> <P ><FONT size=2><FONT face="Times New Roman">VGDS_TYPE<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGDS_ISLOADED<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGDS_USED<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGDS_IMMEDIATE<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGDS_USEPROJECTION<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGDS_CURRPROJECTION<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGDS_CURRORIGLAT<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGDS_CURRORIGLONG<p></p></FONT></FONT></P> <P ><FONT size=2><FONT face="Times New Roman">VGDS_CREATECONSTRAINTS<p></p></FONT></FONT></P> |
|