To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.dev.org.ldrawOpen lugnet.cad.dev.org.ldraw in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / Organizations / LDraw / 1862
1861  |  1863
Subject: 
Re: BFC and Primitives
Newsgroups: 
lugnet.cad.dev.org.ldraw
Date: 
Fri, 8 Mar 2002 17:39:40 GMT
Viewed: 
300 times
  
In lugnet.cad.dev.org.ldraw, Travis Cobbs wrote:

I have a question.  Given that the cylinder primitives (among others) are
used in situations where they are either the inner surface or the outer,
won't adding BFC information to them cause problems?

This was an issue during the BFC Thread Wars.  We figured there were
basically two ways to resolve the issue:

1. Make two versions of each primitive, an "outer facing" and an "inner
facing".  Each BFC'ed part file would need to use the correct version.
2. In each BFC part file, add a flag to any primitive reference that
required the primitive to be inverted.

It seems like option #1 would result in simpler renderers, that
potentially took up slightly more memory.  But option #2 would be easier
to maintain, since we wouldn't have two copies of a number of files.

My inclination (I *might* be biased) was towards easier maintenance.  So
the BFC standard allows for references like:

0 BFC INVERTNEXT
1 16 0 -4 0 4 0 0 0 4 0 0 0 4 4-4cyli.dat

These types of references actually turn out to be uncommon (in my
experience so far).  I usually only need a handful in any one file.  So
it's not a large burden on the part author.  Getting the vertex wrapping
corrected is usually a much bigger deal.

Supporting the INVERTNEXT in the renderer is a bit more of an issue - I
think it can be done by keeping a variable that is set to either 1 or
-1, and passed as a parameter into the recursive processing routine
(assuming the processing routine is written recursively).  This variable
is multiplied against the polygon determinants when culling the
polygons.

There is a psuedo-code rendering routine in the BFC proposal at
<http://www.geocities.com/partsref/bfc/bfcspecv4.txt>.  Please remember,
the psuedo-code was written without an actual working example to go on.
And the logic would be simplified if the parser treated the
INVERTNEXT/subfile line pair as a single command.

Geez, I can't believe that document was last updated 2 years ago. :(

Steve



Message is in Reply To:
  Re: BFC and Primitives
 
(...) I have a question. Given that the cylinder primitives (among others) are used in situations where they are either the inner surface or the outer, won't adding BFC information to them cause problems? --Travis Cobbs (tcobbs@REMOVE.halibut.com) (22 years ago, 8-Mar-02, to lugnet.cad.dev.org.ldraw)

26 Messages in This Thread:











Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR