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 04:51:24 -0500 (EST)


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?
>

Tom,

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
the previously loaded vertices. The 'fix' I am including works
around that for simple shapes by testing for the T_COMPLETE code
from the tokenizing routine, and setting the striplength to the
current number of unprocessed vertices (vCount) if so.

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.