阅读:1133回复:0
VEGA实用编程手册1
<H1 ><FONT face="Times New Roman">VEGA</FONT>实用编程手册<p></p></H1>
<H2 ><FONT size=6><FONT face=Tahoma>Vega</FONT>结构类</FONT></H2> <P ><p> </p></P> <P >VGTYPE_CHAN VGTYPE_MOTION<p></p></P> <P >VGTYPE_WINDOW VGTYPE_GFX<p></p></P> <P >VGTYPE_OBSERV VGTYPE_ENV<p></p></P> <P >VGTYPE_SCENE VGTYPE_ISECTOR<p></p></P> <P >VGTYPE_SYSTEM VGTYPE_VOL<p></p></P> <P >VGTYPE_OBJECT VGTYPE_LIGHT<p></p></P> <P >VGTYPE_DBM VGTYPE_FOG<p></p></P> <P >VGTYPE_PLAYER VGTYPE_ENVFX<p></p></P> <P >VGTYPE_IODEV VGTYPE_POS<p></p></P> <P >VGTYPE_TFLOD<p></p></P> <P >VGTYPE_PART<p></p></P> <P >VGTYPE_DATASET<p></p></P> <P >VGTYPE_CLASSDEF<p></p></P> <P >VGTYPE_CTAB<p></p></P> <P >VGTYPE_DLIST<p></p></P> <P >VGTYPE_IOMAP<p></p></P> <P >VGTYPE_MCODE<p></p></P> <P >VGTYPE_LIST<p></p></P> <H2 ><FONT size=6>函数命明规则</FONT></H2> <P >vgNewXXX<p></p></P> <P >vgFindXXX<p></p></P> <P >vgGetXXX<p></p></P> <P >vgGetNumXXX<p></p></P> <P >vgNewXXXCopy<p></p></P> <P ><p> </p></P> <P >vgSrcAssoc(source, association);<p></p></P> <P >‘vg’ is our product code<p></p></P> <P >‘Src’ is the placeholder of the source instance<p></p></P> <P >‘Assoc’ is the placeholder of the Association to be made<p></p></P> <P >Example<p></p></P> <P >/*declare variables*/<p></p></P> <P >vgChannel *channel;<p></p></P> <P >vgWindow *window;<p></p></P> <P ><p> </p></P> <P >/*get a pointer to the existing instance created thru the ADF*/<p></p></P> <P >channel=vgGetChan(0);<p></p></P> <P >window=vgGetWin(0);<p></p></P> <P ><p> </p></P> <P >/*associate the window with the channel*/<p></p></P> <P >vgChanWin(channel, window);<p></p></P> <P ><p> </p></P> <P >vgAddSrcAssoc(source, association);<p></p></P> <P > ‘vg’ (I think you’ve got it now)<p></p></P> <P > ‘Add’ is the action adding another association to our source<p></p></P> <P > ‘Src’ is the placeholder of the source instance<p></p></P> <P > ‘Assoc’ is the placeholder of the Association to be added<p></p></P> <P >Example<p></p></P> <P > /*declare variables*/<p></p></P> <P > vgChannel *channel;<p></p></P> <P > vgObserver *observer;<p></p></P> <P > /*get a pointer to the existing instance created thru the ADF*/<p></p></P> <P > channel=vgGetChan(0);<p></p></P> <P > observer=vgGetObserv(0);<p></p></P> <P ><p> </p></P> <P > /*add the observer to the channel*/<p></p></P> <P > vgAddObervChan(observer, channel);<p></p></P> <P ><p> </p></P> <P >vgRemSrcAssoc(source, association);<p></p></P> <P > ‘Rem’ is the action: removing an association from our source<p></p></P> <P > ‘Src’ is the placeholder of the source instance<p></p></P> <P > ‘Assoc’ is the placeholder of the Association to be removed<p></p></P> <P >Example<p></p></P> <P > /*declare variables*/<p></p></P> <P > vgChannel *channel;<p></p></P> <P > vgObserver *observer;<p></p></P> <P ><p> </p></P> <P > /*get a pointer to the existing instance in ADF*/<p></p></P> <P > channel=vgGetChan(0);<p></p></P> <P > observer=vgGetObserv(0);<p></p></P> <P ><p> </p></P> <P > /*remove the channel from the observer*/<p></p></P> <P > vgRemObservChan(observerl, channel);<p></p></P> <P ><p> </p></P> <P >vgGetSrcAssoc(source, index);<p></p></P> <P > ‘Get’ is the action: getting the handle of an association to our source.<p></p></P> <P > ‘Src’ is the placeholder of the source instance<p></p></P> <P > ‘Assoc’ is the placeholder of the Association we are getting<p></p></P> <P >Example<p></p></P> <P > /*declare variables*/<p></p></P> <P > vgChannel *channel;<p></p></P> <P > vgObserver *observer;<p></p></P> <P ><p> </p></P> <P > /*get a pointer to the existing instance in ADF*/<p></p></P> <P > observer-vgGetObserv(0);<p></p></P> <P ><p> </p></P> <P > /*get the channel associated with the observer*/<p></p></P> <P > channel=vgGetObservChan(observer, 0);<p></p></P> |
|