Re: Performer reads .iv. NOT!

New Message Reply Date view Thread view Subject view Author view

Robert D. King (king++at++ait.nrl.navy.mil)
Tue, 13 Dec 1994 05:08:38 -0500 (EST)


I am replying here instead of directly to Thom DeCarlo because my mail
sender couldn't parse Thom's address

On Mon, 12 Dec 1994, Thom DeCarlo wrote:

> I have been trying to get perfly to read a simple Inventor file but
> have had no luck. I saw in the Performer FAQ that an updated LoadIV
> program was to be distributed "at a future date." Has that happened
> yet? If so, how can I get it? If not, when?
>

Thom,

The problem is in the way that pfiv.c treats an empty set of braces when
encountering the inventor command to create a tristrip out of previously
loaded vertices. The 'fix' I am including works around that for simple
shapes by testing for a T_COMPLETE code return from the tokenizing
routine, and setting the striplength to the current number of unprocessed
vertices (vCount) if so.

The apparent 'hang' is the routine blocking *forever* on the final set of
curly braces in your .iv file!

With this patch, you should be able to use <most> of the objects made
by id3m (at least as far as my limited testing has put demands on
the 'fix').

diff between my new pfiv.c and the old pfiv.c:

336d335
< int doAll = 0;
340,345c339
< {
< if (tokenType == T_COMPLETE) {
< doAll = 1;
< break;
< }
< }

---
> 		/* EMPTY */ {;}
350c344
< 		int	stripLength = -1;
---
> 		int	stripLength;
352,356c346
< 		if (!doAll) 
< 		    sscanf(token, "%d", &stripLength);
< 
< 		if (stripLength <= 0)
< 		    stripLength = vCount;	
---
> 		sscanf(token, "%d", &stripLength);

Regards,

Rob


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:50:44 PDT

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