Question: pfGetGSetAttrLists()

New Message Reply Date view Thread view Subject view Author view

John Kapp (kapp++at++cs.nps.navy.mil)
Tue, 7 Jan 1997 11:09:21 -0800


I was hoping that there might be some good samaritan out there who might be able
to shed some light on how the pfGetGSetAttrLists() function works or on why I
might be having the problem I'm having. Some background:

The following functions (updateLsd and setupLsd) attempt to locate 4 particular
geosets and then retrieve the coordinates of their vertices. The model hierarchy
is passed in as shipRoot. The model itself was built using MultiGen

The Problem: A stand alone program was written and this code worked fine. However,
the actual code has been inserted into a large networked battlefield simulation
program. Now the pfGetGSetAttrLists() (line 30) causes a segmentation fault, as does
any use of pfGeoSet functions (ie pfGetGSetAttrBind() or pfGetGSetAttrRange())
through the geo that was returned in line 18.

Any ideas why?

Our limited experience leads us to guess that there must be some
attempt to access an area of memory that is preventing the pfGetGSetAttrLists().

Is this the right way to go about retrieving coordinates of geometry? Our goal is
to overlay other geometry on that retrieved. We accomplished that in a stand alone
and thought, much to our naivete, that we would just cut and paste.

Thanks in Advance,

Jack Kapp
Erkan Akyuz

#######################################################################

1 void updateLsd(pfGroup* shipRoot) {
2
3 pfNode *monitor, *object;
4 pfGroup *cic;
5 pfGeode *lsd;
6 pfGeoSet *geo;
7
8 //Find CIC in ship model
9 object = pfFindNode(shipRoot, "CIC", pfGetGroupClassType());
10
11 //cast object to pfGroup and assign to cic
12 cic=(pfGroup*)object;
13
14 // LSD's are children numbered 31 32 33 34
15 for(int i=31; i<=34; i++){
16 monitor = pfGetChild(cic, i);
17 lsd = (pfGeode*)monitor;
18 geo = pfGetGSet(lsd, 0);
19 setupLsd(geo);
20 }
21
22 return;
23 }
24
25 void setupLsd(pfGeoSet* geo){
26
27 pfVec3 *coords;
28 ushort *icoords;
29
30 pfGetGSetAttrLists(geo, PFGS_COORD3, (void**)&coords, &icoords);

//********************************************************
        .
        .
        .
   
     CODE USING coords
   
        .
        .
        .
//********************************************************

    return;
}
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/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 2.0b2 on Mon Aug 10 1998 - 17:54:17 PDT

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