RE:

New Message Reply Date view Thread view Subject view Author view

From: Ippolito, Marco (MARCO.IPPOLITO++at++ca.com)
Date: 01/17/2001 14:25:27


Hello Tom,

If you're using Vega, you can get to the comment field in the header through a loader callback. You can then put a flag in the comment field of the header to tip you off to what coordinate system to use...

Here's how :

1. Install a Dataset Class Load callback that will be executed whenever the header of the file is traversed by the loader...
The callback can be installed using vgAddClassFunc -- It will look as follows:

vgAddClassFunc( VGTYPE_DATASET, VGDS_PREFLTLOAD, your_fltLoaderCallback, NULL);

2. Have the class callback install an OpenFlight Bead Dataset callback to scan for a specific bead (in this case the Header) -- It will look as follows:

vgAddFunc( dataset, VGDS_MGFLTBEAD, yourBeadCallback, udata);

The bead callback will look something like this:

static void yourBeadCallback(pfNode *node, int beadOptcode, int *beadData,
                       COMMENTcb *cbcom, void *udata)
{
        char* comment;
    
        if(mgOp == 1) /* header bead*/
        {
                if (cbcom != NULL) {
                      comment = cbcom->text;
                      printf ("Comments in comment field of the header is %s\n", comment);
                }
                /* Process the comment string here */
        }
}

Alternatively, you could write the flt file to memory, and parse it for the flag in question (you will need the OpenFlight Spec to do this, it is available for download at www.multigen-paradigm.com)

Regards,

Mark Ippolito
OpenFlight Loader
MultiGen-Paradigm, Inc.
(972) 960-2301 x252
marco.ippolito++at++ca.com

You Wrote:
=======================================================
Is there a Performer function call that will return the Database Origin
located in the header DB node of an OpenFlight file? I would like to obtain
this in order to convert my coordinate system from Lat Lon (Flat Earth) to
local-space Cartesian.

Thank you for your help,

Tom
-----------------------------------------------------------------------
 List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
Open Development Project: http://oss.sgi.com/projects/performer/
             Submissions: info-performer++at++sgi.com
         Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Jan 17 2001 - 17:03:46 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.