Vega  FAQ's FAQs 51 thru 100

 

FAQs 1 thru 51 square72_blue.gif FAQs 51 thru 100 square72_blue.gif FAQs 101 thru 150 square72_blue.gif FAQs 151 thru 200 square72_blue.gif FAQs 201 thru 250 square72_blue.gif FAQs 251 thru 300

     

  1. What 3d model file formats does Vega Support:

  2. How to I use 3ds, Dxf, 3d Max files in Vega

  3. Can I use Borland C++ Builder with Vega NT

  4. Can I use Vega in MFC

  5. How do I get debug information with MFC and Vega NT

  6. Can I use Vega in a container such as ActiveX

  7. Is there a COM interface for VegaNT

  8. Can I use Vega with Tcl/TK

  9. What is vgTcl

  10. How do I get a Vega class property

  11. How do I change a Vega class property

  12. How do I set a property on vgSystem before

  13. How to find a vgObject

  14. How do I delete an vgObject

  15. How can I find out if a vgObject is in my FOV

  16. How do I create a vgObject in Code

  17. How to get a position of an vgObject

  18. Why does my vgObjects Position always return 0,0,0

  19. How to position a vgObject

  20. How to find a vgPart

  21. How do I delete a vgPart

  22. How to get a position of a vgPart

  23. Why can't I position my vgPart

  24. How do I compile my Vega Irix applications statically

  25. What is Distributed Vega

  1. How can I restart Vega

  2. How do I move things in Vega

  3. What motion models does Vega provide

  4. What is the Spin Motion Model

  5. What is the Drive Motion Model

  6. What is the UFO Motion Model

  7. What is the Warp Motion Model

  8. What is the Fly Motion Model

  9. What is the Trackball Motion Model

  10. What is the Missile Motion Model

  11. What is a Walk Motion Model

  12. What is a PickFly Motion Model

  13. What is the Flight Simulation Motion Model

  14. What is a Device Direct Motion Model

  15. What is a Symmetric Viewing Frustum  

  16. What is a Asymmetric Viewing Frustum  

  17. What is a Orthographic  Viewing Frustum

  18. How can I Show the frame rate of my application

  19. Can I disable the ~ key

  20. How can I get Statistics in Code

  21. What is a bitplane

  22. What are the core Vega Classes

  23. What is the difference between vgGetPos and vgGetWCSPos

  24. What Graphics state Properties are supported

  25. What is an LOD

Faq's

 

 

* 51 *   What 3d model file formats does Vega Support  up

     

    Vega for NT directly supports the following 3D file format

     

    flt

     

    fst

    MultiGen's OpenFlight v14 and above

     

    MultiGen's fast binary file format

     

    Vega for Irix supports the following 3D file format ( the same as OpenGL Performer 2.2.x)

     

    flt

    pfa

    pfb

    dxf

    3ds

    obj

    dwb

    lsa

    lsb

    bin

    bpoly

    byu

    gds

    gfo

    im

    irtp

    iv

    m

    medit

    nff

    post

    phd

    poly

    pts

    ptu

    s1k

    sgf

    sgo

    spf

    sponge

    star

    stla

    stlb

    sv

    tri

    unc

    MultiGen OpenFlight v14 and above

    OpenGL Performer ASCII format

    OpenGL Performer fast binary format

    AutoDesk AutoCAD ASCII format

    AutoDesk 3DStudio binary data ( OLD!!!!!)

    Wavefront Technologies data format

    Coryphaeus Software Designer's Workbench

    Lightscape radiosity solutions (ASCII)

    Lightscape radiosity solutions (binary)

    Minor SGI format used by powerflip

    Side Effects Software PRISMS binary

    Brigham Young University CAD/FEA data

    McDonnell-Douglas GDS things data

    Minor SGI format (radiosity output)

    Minor SGI format (OpenGL Performer example)

    AAI/Graphicon Interactive Real-Time PHIGS

    SGI Open Inventor/VRML 1.0

    University of Washington mesh data

    Medit Productions medit modeling tool

    Eric Haines' ray tracing test data format

    Minor SGI format (example gridded terrain loader)

    Minor SGI format (polyhedra)

    Side Effects Software PRISMS ASCII data

    University of Washington point data

    Minor SGI format (OpenGL Performer example)

    U.S. Army SIMNET databases (Texas Instruments)

    U.S. Navy standard graphics format

    Minor SGI format

    U.S. Navy simple polygon format

    Sierpinski sponge 3D fractal generator

    Yale University compact star chart data

    3D Structures Stereolithography (ASCII)

    3D Structures Stereolithography (binary)

    Format of John Kichury's i3dm modeler

    University of Minnesota Geometry Center data

    University of North Carolina data

     

     

* 52 *    How to I use 3ds, Dxf, 3d Max files in Vegaup

     

* 53 *   Can I use Borland C++ Builder with Vega NT up

     


    Vega NT is only supported on Microsoft Visual Studio ( Service pack 5 and above)

    A couple of people have had some success in using Borland's C++ Builder, here's the details of what they have done, I cannot say if this will work or not

    1) Convert all lib files to Borland compatible.


      This bat file (mycoff2omf.bat) will convert a lib file to Borland format, using the coff2omf routine supplied with C++:

      @echo off

      Coff2omf -q %1 x.lib >> convertlog.txt

      if errorlevel 1 goto :fail

      copy %1 orig_lib

      copy x.lib %1

      echo File %1 copied and converted >> convertlog.txt

      goto :EOF

      :fail

      echo Error in file %1, not converted >> convertlog.txt

      The Coff2omf routine is found in the Borland executable directory, and should be in the path.

      This bat file (convertAll.bat) uses the first bat file to convert all lib files in the Vega lib directory. The easiest way to do this is to put both bat files in the Vega directory.

      cd "c:\program files\paradigm\Vega\lib"

      mkdir orig_lib

      attrib -r *.lib 

      for %%f in (*.lib) do MyCoff2omf %%f

      del x.lib
       

    2) You have to modify the jlu.h file to eliminate a define of ptrdiff_t already defined by Borland: 


      #ifndef _BORLAND

      typedef int ptrdiff_t;

      #endif
       

    3) In you Borland project, under Project | Options | Directories/Conditionals in the Conditionals Edit box, enter:

      _DLL;_BORLAND;WIN32

     

* 54 *   Can I use Vega in MFCup

     


    Yes you can use Microsoft's Foundation Class library with Vega NT :

    Vega ships with a simple example project, see <%>Sample\Vega\pguide\ch03\MFCVega
     

* 55 *  How do I get debug information with MFC and Vega NT up

     


    Yes you can get the debug out in an MFC application that is normally sent to the console window in Vega NT

    This can be done in a couple of ways :
     

    • You can send the output to the debugger window of Visual Studio

      In your Vega directories search for "EditPlatform.bat" and run the batch file

      Then check the USE_OUTPUTDEBUGSTRING box and this will allow out put to the Visual Studio debug window.

       

    • You can  use vgCreateConsole();
    • Or you could  create your own console using AllocConsole();

       

       

      Code :

      --

         


        if( AllocConsole() ){

          

           //

           // Now we have to pipe the all Vega output to the new console window                

           //

          

           int outHandle = _open_osfhandle( ( long );

           

           GetStdHandle( STD_OUTPUT_HANDLE ), _O_TEXT  );

         

           FILE *outFile = _fdopen( outHandle, "w"  );

         

           *stdout = *outFile;

         

           setvbuf( stdout, NULL, _IONBF, 0 );

         

           }

         

         

       

     

* 56 *   Can I use Vega in a container such as ActiveX  up

     


    Yes and no is the answer to using Vega NT in an ActiveX container. While it is certainly possible to use Vega in an ActiveX container is has one inherent and very limiting factor. Vega NT gets its heritage from Vega Irix and OpenGL Performer, which are designed to be use as stand alone application both call exit(0) during there shutdown process.

    Vega and Performer both use large amounts of memory and create their own memory pool and manager. This memory pool other major components of Vega and Performer are only correctly freed when the program Exits. This means that they are not re-entrant  meaning you cannot simply  initialise start stop and repeat the initialise, start, stop Vega or Performer again by default they both call Exit(0) during their shutdown process.
     

* 57 *   Is there a COM interface for VegaNT up

     

    No there is no COM interface for VegaNT, ( Vega Irix does have a TCL/TK interface )

     

* 58 *   Can I use Vega with Tcl/TK  up

     

    Yes you can use Tcl/TK with Vega, vgTcl provides Tcl//TK bindings for Vega and  was created by the talented Mike Weiblen.

    vgTcl was distributed with Vega on the installation CD's as a vgGift, which means it was officially unsupported by MultiGen-Paradigm although it was maintained by Mike Weiblen.

     

* 59 *   What is vgTcl up

     

    vgTcl provides Tcl//TK bindings to Vega, vgTcl was distributed with Vega on the installation CD's as a vgGift,

    Further details on vgTcl can be found on Mike Weiblen's web site vgTcl readme
     

* 60 *   How do I get a Vega class property up

     

     

    With Vega there are 2 ways to get properties from Vega Class instances

     

    • Firstly using the vgCommon  function   "float  vgGetProp( vgCommon *handle, int which )";

      For example to retrieve the state of a vgChannel we call int state = (int) vgGetProp( vgGetChan(0), VGCOMMON_ENABLED );

      See the individual vgClasses man pages for which properties can be retrieved using vgGetProp

    • Secondly using the class specific functions where the property cannot be returned as a float

      For example to retrieve the current filed of view form a channel we call

     

    Code :

    --

       

      float h = 0.0f;

      float v = 0.0f;

      vgGetChanFOV( vgGetChan(0), &h, &v  );


     

       

      See the individual vgClasses man pages for what vgGetxxx functions are available
       

* 61 *   How do I change a Vega class property up

     


    With Vega there are 2 possible ways to change properties for Vega Class instances.

     

    • Firstly using the vgCommon function   "void  vgProp( vgCommon *handle, int which, float prop )";

      For example to change the state of a vgChannel we call  vgProp( vgGetChan(0), VGCOMMON_ENABLED, VG_ON );

      See the vgClasses individual man pages for which properties can be changed using vgProp

    • Secondly using the class specific functions where the property cannot be set with float or int

      For example to  the current filed of view for  a channel we call

       

    Code :

    --

       

      float h = 45.0f;

      float v = -1.0f;

      vgChanFOV( vgGetChan(0), h, v  );


     

      See the individual vgClasses man pages for what vgClassxxx set functions are available
       

* 62 *  How do I set a property on vgSystem beforeup

     


    Generally to set properties on Vega Classes using vgProp(..)  Vega must first have been initialised using vgInitStys(). So how can you set System properties if vgInitStys() has not been called, well its rather straight forward use vgClassProp for example:

     

     

    Code :

    --

       

       

      vgClassProp( VGTYPE_SYSTEM, VGSYS_GRAPHICS, VG_FALSE );

       

       

      vgInitSys();

       

       

      vgDefineSys( argv[1] );

       

       

      vgConfigSys();

       


     

     

    See vgCommon for more details; vgClassProp and vgGetClassProp are very similar to their related functions (vgProp and vgGetProp), but they set and return class properties. Class properties are those which exist at the class level. In other words there is one for each class, as opposed to one for each class instance.
     

* 63 *  How to find a vgObject up

     


    To find a vgObject is pretty straight forward, there are two ways to get a pointer to a specific vgObject

     

    • Firstly you can find an vgObject by name using vgFindObj( "objectName");,Note the text search is case sensitive, also if you have vgObject with same name the first one in Vega internal list will be returned
    • Secondly you can get a vgObject by using vgGetObj( int index)  if you know the index. Note that if you delete a vgObject then indices of other object may change.

    See vgObject man pages further details on the vgObject Class

* 64 *  How do I delete an vgObject up

     


    To delete a vgObject simply use the vgCommon function vgDelete( vgCommon *handle ); For example :

    Code :

    --

       

      vgObject *obj = vgGetObj( 0 );

      vgDelete( obj );


     

     

    Note before you attempt to use vgDelete() you must first ensure that the vgObject is removed from all association with vgScene, vgPlayer, etc.

    See vgObject man pages further details on the vgObject Class

* 65 *   How can I check if a vgObject is within my FOV up

     


    The following pseudo code show you how to test is a vgObject is within the current Field of View:

     

    • get the pfNode* from the vgObject with vgGetPfNode (see the vgObject man page)
    • get the bounding sphere from the pfNode (see the pfNode man page)
    • get the pfChannel from the vgChannel, vgGetChanPfNode (see the vgChannel man    )
    • call pfChanContainsSphere( chanPointer, spherePointer)  (see the pfChannel man    )


    See the  "How Check if a vgObject is in the FOV" Sample code for further details

    See vgObject man pages further details on the vgObject Class

* 66 *  How do I create a vgObject in code up

     


    To create a new vgObject in code you have to do the following:
     

    • Create a new and empty vgDataSet with vgNewDS
    • Set the path to the file for the dataset to load with vgName
    • Use vgProp to set initial properties on the dataset
    • Load the model file using vgLoadDS
    • Create a new empty vgObject
    • Name the vgObject
    • Set the vgObject as dynamic or static with vgProp
    • Set the optimisation mode for the object with vgProp
    • Set any offset for the object with vpPos
    • Associate the vgObject and vgDataSet using vgObjDS
    • Now we make the object with vgMakeObj
    • Set the Isector mask for the vgObject and its geometry
    • Set the representation mask for the vgObject

     

    See the  "How to create a vgObject" Sample code for further details

    See vgObject man pages further details on the vgObject Class

    See vgPart man pages further details on the vgPart Class

    See vgDataSet man pages further details on the vgDataSet Class

    See vgMotion  man pages further details on the vgMotion Class

    See vgCPos man pages further details on the vgCPos Class


* 67 *   How do you get the Position of a vgObject up

     


    To get the position of a vgObject you need to use a vgPos, something alone the lines of:

    Code :

    --

       

      vgObject   *obj = NULL;

      vgPosition *pos = NULL;

       

      float x = 0.0f, y = 0.0f, z = 0.0f;

      float h = 0.0f, p = 0.0f, r = 0.0f;

       

      //

      //  Grab a pointer to the object

      //     

      obj  = vgGetObj( 0 );

       

      //

      //  Create a vgPos

      //     

      pos  = vgNewPos( );

       

      //

      //  Retrieve the current position from the object

      //     

      vgGetPos( obj, pos );

       

      //

      //  Now retrieve the position vectors

      //     

      vgGetPosVec( pos, &x, &y, &z, &h, &p, &r );

       

      //

      //  Release the vgPos as where done

      //     

      vgDelPos( pos );

       

     

    See the  "How get the vgObject Position" Sample code for further details

    See vgObject man pages further details on the vgObject Class

    See vgCPos man pages further details on the vgCPos Class

* 68 *   Why does my vgObjects position always 0,0,0 up

     


    First make sure that your vgObject has actually been added to your vgScene

    If the vgObject has been attached to a vgPlayer or your using Vega LADBM then using vgGetPos will return 0,0,0 for your position because this will return the only the local position

    To get the position of the vgObject in this instance you need to get the World coordinates rather than the local coordinates thus we need to use vgGetWCSPos rather than the vgGetPos function

    See the  "How get the vgObject World Coordinate Position" Sample code for further details

    See vgObject man pages further details on the vgObject Class

    See vgCPos man pages further details on the vgCPos Class

* 69 *    How can I set the position of a vgObject up

     


    Setting the postion of an Object in Vega is unfortunately a little awkward than it needs to be, in that you must first get the objects current position if you   want to update only part of the object translation or rotation. For example:

    Code :

    --

       

      vgObject   *obj = NULL;

       

      vgPosition *pos = NULL;

       

      float x = 0.0f, y = 0.0f, z = 0.0f;

      float h = 0.0f, p = 0.0f, r = 0.0f;

       

      //

      //  Grab a pointer to the object

      //     

      obj  = vgGetObj( 0 );

       

      //

      //  Create a vgPos

      //     

      pos  = vgNewPos( );

       

      //

      //  Retrieve the current position from the object

      //     

      vgGetPos( obj, pos );

       

      //

      //  Now retrieve the position vectors

      //     

      vgGetPosVec( pos, &x, &y, &z, &h, &p, &r );

       

      //

      //  Now update the vectors

      //     

      x = x + 10.0f;

      y = y + 20.0f;

      z = z + 30.0f;

       

      //

      //  Now We can Set the position vectors

      //     

      vgPosVec( pos, x, y, z, h, p, r );

       

       

      //

      //  Now we can finally set the current position for the object

      //     

      vgPos( obj, pos );

       

       

      //

      //  Release the vgPos as where done

      //     

      vgDelPos( pos );

       

       

     

    See its a little awkward ;), also not if your doing this alot it would be make sense to create a function and also keep the vgPosition instance around rather than creating and deleting each time ( its faster and stops fragmentation )

    See vgObject man pages further details on the vgObject Class

    See vgCPos man pages further details on the vgCPos Class

* 70 *  How can I find a vgPart in vgObject up

     


    There are two ways to find and retrieve vgParts from a vgObject using the 2 following functions:

     

    • vgFindPart
       
    • vgFindPartOccurence


    vgFindPart finds a named vgPart of an vgObject. If the name is NULL, then the root vgPart of the vgObject is returned. If multiple vgParts within the vgObject have the same name, the first occurrence of that vgPart will be returned if the third argument is set to NULL. To find subsequent occurrences, the third argument should be a pointer to the previous vgPart found.

    Code :

    --

       

      vgObject *obj = NULL;

      vgPart   *w1  = NULL;  

      vgPart   *w2  = NULL;

      vgPart   *w3  = NULL;

      vgPart   *w4  = NULL;

       

       

      //

      //  Grab a pointer to the object

      //     

      obj = vgFindObj( "Blue Car" );

      w1 = vgFindPart ( obj, "wheel", NULL );

      w2 = vgFindPart ( obj, "wheel", w1 );

      w3 = vgFindPart ( obj, "wheel", w2 );

      w4 = vgFindPart ( obj, "wheel", w3 );

       

       

     

     

    vgFindPartOccurence will also find a named vgPart of an vgObject. If multiple vgParts within the vgObject have the same name, the 'n-th' occurrence of the vgPart can be directly retrieved by setting the third argument to 'n'.

    Code :

    --

       

      vgObject *obj = NULL;

      vgPart   *w1  = NULL;  

      vgPart   *w2  = NULL;

      vgPart   *w3  = NULL;

      vgPart   *w4  = NULL;

       

       

      //

      //  Grab a pointer to the object

      //     

      obj = vgFindObj( "Blue Car" );

      w1 = vgFindPartOccurence ( obj, "wheel",);

      w2 = vgFindPartOccurence ( obj, "wheel", 2 );

      w3 = vgFindPartOccurence ( obj, "wheel", 3 );

      w4 = vgFindPartOccurence ( obj, "wheel", 4 );

       

       

     

    See vgObject man pages further details on the vgObject Class

    See vgPart man pages further details on the vgPart class

     

* 71 *  How to Delete a vgPartup

     


    Its pretty straight forward to delete a vgPart you simply use vgDelete

    Code :

    --

       

      vgObject *obj  = NULL;

       

      vgPart   *part = NULL;  

       

       

      //

      //  Grab a pointer to the object

      //     

      obj  = vgFindObj( "my_nice_object" );

      part = vgFindPart ( obj, "wheel", NULL );

      vgDelete( part );

       

     

    See vgPart man pages further details on the vgPart class
     

* 72 *   How to get the position of a part up

     


    You can get the position of a vgPart the same way you get a positron of a vgObject, using vgGetPos

     

     

    Code :

    --

       

      vgObject *obj  = NULL;

       

      vgPart   *part = NULL;  

       

       

      vgPosition *pos = NULL;

       

      float x = 0.0f, y = 0.0f, z = 0.0f;

       

      float h = 0.0f, p = 0.0f, r = 0.0f;

       

       

      //

      //  Create a vgPos

      //     

      pos  = vgNewPos( );

       

       

      //

      //  Grab a pointer to the object

      //     

      obj  = vgFindObj( "my_nice_object" );

      part = vgFindPart ( obj, "wheel", NULL );

      //

      //  Retrieve the parts position

      //     

      vgGetPos( part, pos );

       

      //

      //  Now retrieve the position vectors

      //     

      vgGetPosVec( pos, &x, &y, &z, &h, &p, &r );

       

       

     

     

    vgGetPos with get the vgPart local coordinates with respect to the vgObject the vgPart belongs to, to get the world coordinate then you again use the vgGetWCSPos function instead of vgGetPos()

    Not only parts that are DCS's or SCS's will return a valid position all other vgParts will return 0,0,0,0,0,0

    See the  "How Get a vgPart's Position" Sample code for further details

    See the  "How Get a vgPart's World Coordinate Position" Sample code for further details

    See vgPart man pages further details on the vgPart class

    See vgCPos man pages further details on the vgCPos Class
     

* 73 *   Why can't I position my vgPartup

     

     

    Only vgParts that are DCS nodes can be positioned, a vgParts type with vgGetProp ( part, VGPART_TYPE );

    See the  "How Position a vgPart" Sample code for further details

    See vgPart man pages further details on the vgPart Class

     

* 74 *  How do I compile may Vega Irix applications statically up

     


    Here's a simple example of a make file for creating statically link executables for Vega Irix

    You may need to add other Lib's that you may be using or remove other lib's your not using

    Here a link to the makefile


      #!pmake -V -W

       

      OBJECT_STYLE = N32

      LCDEFS = -D__STDC__ -DFUNCPROTO -fullwarn -DPF_CPLUSPLUS_API=0 -DOPENGL

      LCINCS = -I. -I/usr/include/PSI

      CFLAGS = $(DOPT) $(LCDEFS) $(LCINCS)

       

      BASICGFXLIBS   = -lmpc -limage -lGL -lGLU

      BASICXLIBS     = -lXmu -lX11

      BASICMOTIFLIBS = -lXm -lXt

      BASICSYSLIBS   = -lm -lC -lfpe

      BASICPFLIBS    = -L/usr/lib32 \

                       -lpfdu_ogl \

                       -lpfutil_ogl \

                       -lpf_ogl

       

      BASICVGLIBS    = -L/usr/lib32 \

                        /usr/lib32/libvgsym.a  \

                        /usr/lib32/libvgsw.a  \

                        /usr/lib32/libvgsv.a  \

                        /usr/lib32/libspv.a \

                        /usr/lib32/libsp.a \

                        /usr/lib32/libvgnsl.a  \

                        /usr/lib32/libvgmarine.a  \

                        /usr/lib32/libvgladbm.a  \

                        /usr/lib32/libvgfx.a  \

                        /usr/lib32/libvgdiguy.a  \

                        /usr/lib32/libvgcmobj.a \

                        /usr/lib32/libvgaudio.a  \

                        /usr/lib32/libvg.a  \

                        /usr/lib32/libvgfst.a  \

                        /usr/lib32/libvgimg.a  \

                        /usr/lib32/libsynclink.a  \

                        /usr/lib32/libxvsutil.so  \

                        /usr/lib32/libaw.a \

                        /usr/lib32/libawaux.a \

                        /usr/lib32/libawcompat.a \

                        /usr/lib32/libawd.a \

                        /usr/lib32/libawhwi.a \

                        /usr/lib32/libawin.a \

                        /usr/lib32/libpsi.a \

                        /usr/lib32/libaudio.so \

                        /usr/lib32/libaudiofile.so \

                        /usr/lib32/libdiguy.a \

                        /usr/lib32/libdiguy_pf22_ogl.a \

                        /usr/lib32/libdiguy_util.a \

                        /usr/lib32/libpfdb/libpfpfb_ogl.a \

                        /usr/lib32/libpfdb/libpfflt_ogl.a

       

      LLDLIBS = $(BASICVGLIBS) $(BASICPFLIBS) $(BASICGFXLIBS) \

                $(BASICXLIBS) $(BASICSYSLIBS)

       

      COMultiGen-ParadigmLER = CC

       

      CFILES = sample.c

       

      OBJFILES = sample.o

       

      EXE = Vega_static_sample

       

      all:

          make depend

          make compile

          make link

       

      fast:

          make compile

          make link

       

      # Create Makedepend file

      depend: Makedepend

       

      # Compile the objects

      compile: $(OBJFILES)

       

      # Create the executable(s)

      link: $(EXE)

       

      $(EXE): $(OBJFILES)

          @echo -- linking $@ --

          $(COMultiGen-ParadigmLER) -mips3 -n32 $(OBJFILES) $(LLDLIBS) -o $@

       

      clean:

          /bin/rm -f $(EXE) $(OBJFILES) core

       

      clobber: clean

          /bin/rm -f Makedepend

       

      Makedepend: $(CFILES)

          @if test ! -f Makedepend ; then

              mkdepend -c "$(COMultiGen-ParadigmLER) -M $(CFLAGS)" -e \\x/usr/includexd -i $@ $(CFILES)

              mv $(.TARGET) $(.TARGET)=

              nawk '{ if ( match($$0, /[A-Za-z]/) == 1 ) \

              { printf "./" } print }' < $(.TARGET)= > $(.TARGET)

              rm -f $(.TARGET)=

          else

              @echo "updating dependencies for $?"

              mkdepend -c "$(COMultiGen-ParadigmLER) -M $(CFLAGS)" -e \\x/usr/includexd -i $@ $?

              mv $(.TARGET) $(.TARGET)=

              nawk '{ if ( match($$0, /[A-Za-z]/) == 1 ) \

              { printf "./" } print }' < $(.TARGET)= > $(.TARGET)

              rm -f $(.TARGET)=

          fi

       

      ## use the Makedepend file if it exists

      sinclude Makedepend

       

      .c.o:

          @echo "compiling $(.IMPSRC)"

          $(COMultiGen-ParadigmLER) -c $(CFLAGS) -mips3 -n32 -o $(.TARGET) $(.IMPSRC)

       

      .C.o:

          @echo "compiling $(.IMPSRC)"

          $(COMultiGen-ParadigmLER) -c $(CFLAGS) -mips3 -n32 -o $(.TARGET) $(.IMPSRC)

     

* 75 *   What is Distributed Vegaup

     


    Distributed Vega in a Nutshell

    Distributed Vega is a Vega module for low-end hardware such as PCs, in which one system known as the master host drives the visual simulation on a number of other systems known as slaves. Distributed Vega is TCP/IP based to allow systems to be connected to the master via communication media such as LAN, WAN, or cross-over cable.

    Distributed Vega hides from the user, the complexities of establishing connections, and exchanging data and control information among the systems. It works with both connectionless (multicast) and connection oriented communication and has two modes of operation. The synchronous mode guarantees that each frame rendered by all the systems will be based on the same data.

    If hardware swaplock is available, the system takes advantage of that. The asynchronous mode allows the slaves to re-synchronize with the master based on a user-specified frame count. All the systems run their own application and access their own copy of the database.

    60hz, if your app can run at 60hz on a single machine then you should be able sustain 60hz
     

* 76 *  How can I restart Vega up

     


    Unfortunately this is not really possible to do with Vega or OpenGL Performer, they are simply not designed to be re-entrant. You can only call vgInitSys() once within an application and you have to fully exit can close the app.
     

* 77 *  How do I move things in Vega up

     


    The view point which is represented by a vgObserver is generally moved using a vgMotion Model. Alternatively you can use your own algorithm to move the vgObserver using vgPosVec and vgPos or by attaching to a vgPlayer.

    vgPlayer's can be moved by attaching them to a vgMotion Model, a vgNavigator or again through API using vgPosVec and vgPos.

    vgObject's can be moved using the vgPosVec and vgPos functions or by attaching to a vgPlayer.

    Some vgPart's can be moved using the vgPosVec and vgPos functions ( must be a DCS/DOF node)

    See vgMotion  and the Vega Programmers Guide for further details vgMotion Class

    See vgMotion  man pages further details on the vgMotion Class

    See vgPlayer man pages further details on the vgPlayer Class

    See vgObject man pages further details on the vgObject Class

    See vgPart man pages further details on the vgPart Class

    See vgCPos man pages further details on the vgCPos Class
     

* 78 *  What motion models does Vega provide up

     


    Out of the box Vega provides you with 8 relatively basic motion models and 3 complex motion models with allow the user to navigate through their 3d vgScene. These simple motion models can be used to change the position of a vgObserver and or vgPlayer in a vgScene


      The motion models provide are:
       

      • Spin
      • Drive
      • UFO
      • Warp
      • Fly
      • Trackball
      • Walk

      There are two more complex motion models provided are: 

       

      • Flight Simulator
      • Missile
      • PickFly

    There is one further Motion model supported:
     

      • Input Device Direct

      The "Input Device Direct" motion model is intended as a direct interface to the data provided by the various types of input devices supported by Vega.
       

    Further the user may create and define up to six additional motion models for use with Vega

    See vgMotion  and the Vega Programmers Guide for further details vgMotion Class
     

* 79 *  What is the Spin Motion Model up

     


    Spin (VGMOT_SPIN ) is a convenient motion model designed for viewing model or point of interest. While Spin is a simple motion model, it is the hardest one to describe.

    Unlike the other motion models, the model does not change position, only its orientation. Spin requires that a button be pressed before any motion can take place.

    While the first button (left mouse) is depressed, the model will be rotated about its origin around the Z axis. Moving the input device left will cause the model to be rotated clockwise, and moving right will cause the model to be rotated counter-clockwise.

    If the third button (right mouse)  is depressed, and the device is moved up or down, then the model will be pitched up or down (rotated about the X axis).

    The second button (middle mouse) is used to make the eyepoint appear to zoom towards or away from the origin of the model. While holding the second button down, moving the input device up, the eyepoint is "zoomed" in towards the model, and moving the device down causes the eyepoint to zoom away from the model.

    See vgMotion  and the Vega Programmers Guide for further details vgMotion Class
     

* 80 *  What is the Drive Motion Model up

     


    The Drive (VGMOT_DRIVE) motion model allows the user to move a player or observer by simulating the motion of a car.

    The first button (left mouse) corresponds to the accelerator/gas pedal of a car,

    The third button (right mouse)to the brake pedal of a car

    The second button (middle mouse) acts as an extremely good emergency brake. It can cause the motion model to instantly come to a complete stop no matter how fast it is moving.

    The input device position is used to steer the motion model. Moving the device to the left causes the motion model to turn left. Moving the device to the right causes the motion model to turn right. Note that you cannot turn if you are not moving, just like in a real car.

    If you want to go backwards, just apply the brake when the car is not moving, the car will begin to backup and go faster and faster in reverse. The steering will be backwards, again just like in a real car.

    Applying the  accelerator/gas while in "reverse" will cause the car to go slower and slower until it comes to a stop and then begins to go forward.

    See vgMotion  and the Vega Programmers Guide for further details vgMotion Class

     

* 81 *  What is the UFO Motion Model  up

     


    The UFO (VGMOT_UFO) motion model simulates flight motion for an inertia-less aircraft, which means that the aircraft has no momentum and can travel at mach 1 one second, and then hover the next, hence the name UFO.

    This motion model behaves similarly to the Drive motion model in that the first button (left mouse) is similar to the accelerator/gas pedal on a car, and the third button is similar to a brake (acceleration in the opposite direction).

    When pressed simultaneously, the first (left mouse) and second buttons (right mouse) act as a "turbo" thruster option that causes the motion model to go approximately five times faster than it would otherwise.

    The motion model gains altitude by pushing the stick up (moving input device down), and by pressing the first button for thrust. Turning left and right is accomplished by moving the input device left or right respectively.


    See vgMotion  and the Vega Programmers Guide for further details vgMotion Class

     

* 82 *  What is the Warp Motion Model up

     


    The Warp (VGMOT_WARP) motion model allows the position of the attached player or observer to be changed much more rapidly than is possible with the other motion models.

    If you think of the database as being a rectangular two dimensional map that has been reduced so that it just fits on top of the current window. The position of the input device corresponds to the location of the player or observer on the map.

    To increase the viewing elevation, press the second button (right mouse)

    To lower the elevation, press the first button(left mouse)

    Note that  this motion model, it is very easy to go to any part of the database by moving the input device from one side of the window to the other.

    See vgMotion  and the Vega Programmers Guide for further details vgMotion Class
     

* 83 *  What is the Fly Motion Model  up

     


    The Fly (VGMOT_FLY) motion model simulates the flight of a simple airplane.

    The motion model is very similar to the UFO motion model except that Fly allows you the ability to pitch and roll but does not allow you to hover. The first button (left mouse) acts as accelerator,

    The second button (right mouse) will stop motion as long as it is held down,

    The third button (middle mouse) acts as the decelerator.

    Sliding the input device left or right will cause the object to roll in that direction and pushing the device forward or backward will cause the object to pitch down or up respectively.

    See vgMotion  and the Vega Programmers Guide for further details vgMotion Class.
     

* 84 *  What is the Track Ball Motion Model  up

     


    The Trackball (VGMOT_TRACKBALL) motion model implements a simple trackball that allows the user to rotate the scene about an arbitrary center point. The distance from the center of rotation is controlled by the user.

    This model is most useful as an object viewer.

    The input device first button(left mouse) is pressed, the scene is rotated based upon movement of the mouse.

    The second button(right mouse) increases or decreases the distance from the center point.

    See vgMotion  and the Vega Programmers Guide for further details.
     

* 85 *  What is the Missile Motion Model up

     


    The Missile (VGMOT_MISSILE) motion model simulates various types of weapons including guided missiles, unguided rockets, ballistic bombs and artillery shells.

    It was designed to be used in conjunction with the Flight Simulator Motion Model. For this reason the Missile motion model uses an input button not used by the Flight Simulator for fire control.

    When using the mouse, "fire" is the middle button; using any other input device it is toggle button 0. Unfortunately, the simple motion models already use these buttons and continue to do so for backwards compatibility.

    Note it is not possible to fire missiles from a vehicle using (say) a Drive motion model (without also applying the emergency brake!)

    See vgMotion  and the Vega Programmers Guide for further details.
     

* 86 *  What is the Walk Motion Model up

     


    The Walk (VGMOT_WALK) is a simple motion model that simulates a very basic walk model that can be used for moving around on the ground in Urban simulations keeping the view at a constant height above the terrain.

    The motion model automatically creates 2 internal Isectors that used for terrain clamping and step/stairs detection. The height and depth of the steps that can be negotiated are definable. The motion model will bump up and down steps that are within its range.

    The first button(left mouse) moves you forward at a constant velocity following the direction of the mouse

    The third button moves(right mouse) you backwards at a constant velocity

    The Second button (middle mouse) allows you to look up/down/left and right without move

    While moving you can allow pan around up and down, the HAT above terrain does not change

    Pressing all three mouse buttons at once resets the position to the initial start position of the motion model

    See vgMotion and the Vega Programmers Guide for further details.

     

* 87 *  What is the PickFly Motion Model  up

     


    The PickFly (VGMOT_PICKFLY) model is a different type of flying motion model that allows the user to move about the scene in a more intuitive manner.

    The PickFly motion model has also has a vgPicker embedded into the motion model. Allowing items in the scene graph to be selected, high lighted, transformed and rotate.

    The motion model automatically creates the two internal Isectors its needs to function.

    One is used for the line of sight intersecting used during the picking action.

    The second is used to clamp selected items to the terrain. See vgPicker for full details on how the selection process works.

    The controls for PickFly are:

    Note the middle mouse button must be held down to move

    The left mouse button tap + middle mouse  held down move forward along the current heading and pitch, holding the left mouse button will add more acceleration.

    The right button tap + middle mouse button held down move backwards along the current heading and pitch , holding the right mouse button will add more acceleration.

    The middle mouse held down on its own rotates view around the current stationary position.

    The left mouse button will select or deselect the item under the mouse pointer, if the items isector mask matches the vgPicker isector mask.

    The right mouse button with pointer movement will transform the selected item(s).

    The left mouse button + right button will reset the selected item(s) to their pre-selection position.

    Hold the input device middle button + left arrow key will move the view to the left.  

    Hold the middle button + right arrow key will move the view to the right.  

    Hold the middle button + up arrow key will move the view upwards.  

    Hold the middle button + up arrow key will move the view downwards.  

    Pressing all three mouse buttons at once resets the position to the initial position of the motion model

    See vgMotion and the Vega Programmers Guide for further details.

    See vgPicker man pages further details on the vgPicker Class
     

* 88 *   What is the Flight Simulation Motion Model up

     


    The Flight Simulator (VGMOT_PLANE) motion model is a more complex mathematical model of an aircraft.

    The motion model includes aerodynamic effects, is fully aerobatic, and uses a quaternion based system of angular integrations.

    The math model used with in he motion model is of a 6 degree of freedom point mass with damped second order rotations.

    Thrust vectoring is implemented in pitch such that a helicopter or VTOL aircraft can be simulated, and a low speed attitude control system is selectable when aerodynamic forces become negligible.

    Many of the dynamic properties of the motional model are customizable so that a wide range of aircraft types can be approximated.

    Due to the limited number of input channels available from the mouse, only a few of the Flight Simulator controls are active when using the default input device.

    To fully control the Motion Model a BGSytems flybox or similar input device should be used.

    Mouse operation is defined as:
     

    • Mouse X - Roll control
    • Mouse Y - Pitch control
    • Left Mouse - less throttle
    • Right Mouse - more throttle

    For other input devices control is:
     

    • Input X - Roll control
    • Input Y - Pitch control
    • Input Z - Yaw control
    • Toggle 3 - flaps
    • Toggle 4 - gear
    • Toggle 5 - brakes
    • Toggle 6 - Alpha limiter
    • Toggle 7 - freeze
    • Toggle 8 - reset
    • slider 0 - throttle
       
    • Toggle 0,1,2 - not used

    See vgMotion and the Vega Programmers Guide for further details.
     

* 89 *   What is the Device Direct Motion Model up

     


    When the "Device Direct" (VGMOT_DEVICE) option is selected, the motion model gets its position directly from the input device to which it is attached (or by default, the mouse)

    See vgMotion and the Vega Programmers Guide for further details.
     

* 90 *   What is a Symmetric Viewing Frustum  up

     


    The Symmetric frustum defines the perspective projection applied to all scene elements processed for a channel. The near clipping distance is used to form a plane called the near clipping plane. The far distance defines the far clipping plane.

    For the symmetric frustum, both these planes are perpendicular to the line of sight of the viewer. The horizontal and vertical FOV's (fields of view) determine the radial extent of the view into the scene. FOV's are entered as degrees for the full width of the view desired. Entering a -1 for either but not both FOV causes the system to aspect match that FOV axis.

    For example suppose the horizontal FOV is 45 degrees and the vertical is set to -1. Once the window and channel are sized, the system selects the appropriate FOV degree for the vertical FOV to maintain an aspect ratio equal to that of the channel viewport.

    See vgChannel  and the Vega Programmers Guide for further details.
     

  • * 91 *   What is a Asymmetric Viewing Frustum  up

       


      An Asymmetric frustum or oblique projection is similar to the symmetric projection, except that the line connecting the center of the near face of the frustum with the eyepoint is not perpendicular to the near plane. That is, the line of sight is off-axis. This is useful for creating video walls, or matching the visual system to a specific video projection system, like a dome where the projection device is off axis to the screen.

      This type of perspective frustum requires six values to define it. Clicking on the Asymmetric Frustum option displays the six entry fields. The near and far values are the same as the symmetrical frustum.

      The left, right, bottom, and top values define the side planes of the frustum. They are the angle offset in degrees for the plane they represent.

      See vgChannel  and the Vega Programmers Guide for further details.

       

    * 92 *   What is a Orthographic  Viewing Frustum  up

       

       

      The Orthographic projection is a non-perspective projection. This means objects appear to be the same size no matter what their distance is from the viewer. Generally used for a Map view or Hud overlay view

      The sides of the frustum are parallel to the line of sight of the viewer. The Near and Far distances define the near and far clipping planes.

      The Left, Right, Bottom, and Top values define the frustum side planes. These values bear a direct relationship to the scale of the object being viewed.

      See vgChannel  and the Vega Programmers Guide for further details.

      Also see the following Viewing Frustum Overview Image

       

    * 93 *    How Can I Show the frame rate of my Application up

       


      On Vega NT the frame rate can be shown in the top left hand corner by pressing the '~' 'tilde'. Pressing the '~' again will cycle the displaying of the applications statistic's for draw, cull, app, etc.

      On Vega for Irix you have to write some code to show the frame rate, typically in your keyboard handler, as the '~' key is not set up on Vega for Irix

       

      Code :

      --

         

        static int stats = 0;

        stats += 1;

        if( stats > VGCHAN_FILL + 1 )

             stats = VGCHAN_STATSOFF;

        vgProp( mainChan, VGCHAN_STATSSEL, stats );

         

       

      See vgSimple for how to do this in the context of an application and the Vega Programmers Guide for further details.

       

  • * 94 *    Can I disable the '~' Key up

       

       

      Unfortunately no you cannot disable the '~' key from displaying the states ( This only effects Vega NT)

       

    * 95 *     How can I get statistics in my code up

       

      You have to drop to the OpenGL Performer level to do this, the  gist of getting statistics is shown below:

       

      Code :

      --


        unsigned int qtmp[5];

        float ftmp[5];

        int ret;

        qtmp[0] = PFFSTATS_BUF_PREV | PFSTATSVAL_GFX_GEOM_TRIS;

        qtmp[1] = PFFSTATS_BUF_PREV | PFFSTATSVAL_PFTIMES_PROC_TOTAL;

        qtmp[2] = NULL;

        ret = pfMQueryFStats( pfGetChanFStats( pfChannel(vgGetChanPfNode(0) ), qtmp, ftmp, 0 );

        fprintf( stderr, "ret = %d bytes\n", ret );

        fprintf( stderr, "Query num tris: %.0f\n", ftmp[0] );

        fprintf( stderr, "Query frame time: %.0f msecs\n", ftmp[1] * 1000.0f );

         

         

       

      See the Performer documentation for more information on collecting statistics

       

    * 96 *  What is a bitplane  up

       


      Each Vega window uses a frame buffer, which is a collection of bitplane's storing the information about each pixel. The organization of these bitplane's defines the quality of the rendered images.

      Bitplane's are allocated for features such as:
       

      • colour information
      • Alpha (transparency)
      • depth buffer(Z-bits)
      • Samples
      • Accumulation RGB Buffer
      • Accumulation Alpha Buffer
      • Stencil
      • Buffer Mode (Single/Double(default))


      Note that support for the various bitplane configurations and combinations are not uniform across different Windows Graphics cards and Irix systems.

      Vega will ask the system for a bitplane specification supplied through the Lynx Windows panel settings or through code, the request may not be granted. When the notification level (in Systems panel) is set to Info or higher, messages tell the user which bitplane configuration is actually being used

      There are two methods of specifying bitplane configuration Vega.

       

      • The first is to request individual assignments in each bitplane category by selecting values for a collection of option menus
      • The second method is to specify the value of the OpenGL Pixel Format  that contains a configuration acceptable to your application


      On Irix you can use findvis on the command line to display the available bitplane configurations supported on the Irix system

      On Windows you can use a program from nVidia to show the available bitplane configurations http://developer.nvidia.com/object/nvpixelformat.html

      Color RGB
      Specifies the given number of bits for each of the Red, Green, and Blue components of each picture element. Larger values take longer to clear, and this may impact performance. Larger values per R,G,B produce smoother images because more colors are available. Vega runs in RGB or RGBA mode, not color index mode. 

      Alpha
      Some systems have storage of a fourth component, called alpha. This is used for transparency blending and storage of transparency values. It is possible to do some transparency methods without alpha planes. Alpha planes are required for any transparency method which requires that the current transparency level of a pixel be stored for later use.

      Depth Buffer Z Bits
      Depth information is stored in a Z-buffer. Larger numbers of bits allocated for the Z-buffer improve depth calculations and reduce "Z fighting". This effect occurs when the distance between two surfaces cannot be resolved within the numeric resolution. The image then flickers between the two surfaces. The near and far clipping plane distances also influence how the Z-bits store the depth information

      Samples
      Some systems, support multi-sampling. This technique allows each screen pixel to be resolved from a set of pixel fragments rendered at a higher resolution. This allows smoother, less jagged, images to be rendered. These images are referred to as anti-aliased. Aliasing is an artifact of digital sampling. The higher the number of samples for multi-sampling are supplied, the higher the quality of the images. The number of multi-samples available on a system is influenced by the resolution to which the display is set. On windows system this may need to be set at the graphics driver level first.

      Stencil
      The Stencil defines the number of bitplane's allocated for the stencil buffer. The statistics screen describing the fill rate of an application requires that there be at least 4 stencil planes allocated for the window's visual. Stencil planes have other special purposes which are not used directly by Vega.

      Accumulation
      Species the number for red, green, and blue bits for an accumulation buffer, and also a number for alpha planes in the accumulation buffer. Some machines have hardware storage for accumulation buffers. Vega does not use an accumulation buffer by default, but some modules and special purpose applications do.
       

    * 97 *   What are the Core Vega Classes up


      The core Vega classes's are:

      Class

      Description

      vgChannel

      A viewport in a window

      vgClassDef

      User Class Definition

      vgColorTable

      Color Table

      vgDataSet

      Method of loading objects

      vgDbm

      Database Manager

      vgDispList

      Display List

      vgEnv

      Control of physical phenomena

      vgEnvfx

      Physical phenomena

      vgFog

      Fog control

      vgGfx

      Graphics control for a channel

      vgIDev

      Input Device

      vgIsector

      Intersection methods

      vgLight

      Light sources

       

       

       
       

      Class

      Description

      vgMotion

      Dynamics

      vgObject

      Visible geometry

      vgObserver

      The viewpoint in a simulation

      vgPart

      Parts of objects

      vgPath

      Path parameters

      vgPlayer

      A dynamic object

      vgScene

      A collection of objects

      vgSplineNavigator

      Path specification

      vgStat

      Customised statistics

      vgSystem

      Vega System

      vgTexture

      Texture

      vgTFLOD

      Terrain fade level of detail

      vgVolume

      Bounding volumes

      vgWindow

      Graphics processing pipeline

    * 98 *   What is the difference between vgGetPos and vgGetWCSPos up

       


      The function vgGetWCSPos is used to return the world coordinate position of the class instances.

      When ever the position of an instance is expressed in relation to another instance, then vgGetPos will always use relative coordinates(local). For example when vgPos is used to position a part, it is always expressed in relation to its parents.

      More often the position that is required from vgGetPos is this relative position, but sometimes the absolute or world coordinate position is required.

      For example when positioning say the barrel on a tank it is easier to use parent relative coordinates, but when the gun is fired, and we will want to put a special effect at the tip of the barrel and thus we will need to get the world coordinate position of that part, in order to correctly position the special effect.

      The syntax of vgGetWCSPos is identical to vgGetPos. The only classes which support the vgGetWCSPos function are:
       

      • vgObject
      • vgPart
      • vgPlayer

       

      Note that if a class is passed to vgGetWCSPos which is not supported, then  the position returned is that same as calling vgGetPos

      See vgPlayer man pages further details on the vgPlayer Class

      See vgObject man pages further details on the vgObject Class

      See vgPart man pages further details on the vgPart Class

      See vgCPos man pages further details on the vgCPos Class

       

    * 99 *    What Graphics State Properties are supported up

       

       

      Vega Supports the following graphics states through vgGFX
       

      • Enable or disable lighting (VGGFX_LIGHTING)
      • Enable or disable the Z buffer for visible surface determination (VGGFX_ZBUFFER)
      • Enable or disable system fog (VGGFX_FOG)
      • Enable or disable transparency (VGGFX_TRANSPARENCY)
      • Enable or disable the rendering of backfaced geometry disabling improves performance (VGGFX_BACKFACE)
      • Enable or disable the rendering of frontfaced geometry (VGGFX_FRONTFACE)
      • Enable or disable wireframe rendering(VGGFX_WIREFRAME)
      • Set the current blend function in OpenGL (VGGFX_BLENDMODE)

       

    * 100 *   What is LOD  up

       


      LOD is an acronym for Level Of Detail (LOD)

      Basically the idea behind LOD processing is that objects which are barely visible don’t require a great amount of detail to be shown in order to be recognizable.

      Object are typically barely visible either because they are located a great distance from the eyepoint or because atmospheric conditions are obscuring visibility.

      Both atmospheric effects and the visual effect of perspective minimize the importance of objects at ever increasing ranges from the current observers eye point. The effect is that the perspective foreshortening of objects, which makes them appear to shrink in size as they recede into the distance.

      To improve performance and to save rendering time, objects that are visually less important in a frame can be rendered with less detail.

      The LOD approach optimizes the display of complex objects by constructing a number of progressively simpler versions of an object and selecting one of them for display as a function of range.

      An undesirable effect called popping occurs when the sudden transition from one LOD to the next LOD is visually noticeable. To remedy this SGI graphics platforms offer a feature known as Fade Level of Detail that smooth's the transition between LOD's by allowing two adjacent levels of detail to be sub-sample blended. Vega NT does not currently support Fade Level Of Detail.

      Heres a link to a Pracitcal overview of an LOD 

       

       

       

       

      ©  Copyright 2004-2006 Gordon Tomlinson  All Rights Reserved.

      All logos, trademarks and copyrights in this site are property of their respective owner.