To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 14721
14720  |  14722
Subject: 
Re: LDraw File Format Spec 1.0 DRAFT - Call for Public Comments
Newsgroups: 
lugnet.cad
Date: 
Tue, 21 Aug 2007 22:42:03 GMT
Viewed: 
4919 times
  
In lugnet.cad, Travis Cobbs wrote:
In lugnet.cad, Rob Ross wrote:
The "so-what" would be that I, as someone who will eventually read in these
files to create OpenGL renderings of them, would expect the matrices to be in
column-major order, unless explicitly stated otherwise.

I think the original suggestion that we mention that it is in row-major format
is valid.  I agree that the fact that OpenGL (almost certainly one of the top
two most used 3D APIs on the planet) uses column major format is a good reason
to specify that LDraw uses row-major format, instead of just saying "standard".
It just proves that "standard" in this context is ambiguous.

--Travis

  You guys are both wrong, OpenGL is NOT column major. This is one of the
biggest mistakes I keep hearing people repeat about OpenGL.

  The API doesn't care if you use column major or row major matrices, it just
expects an array of 16 floats with the translation at the end. The column major
notation you see on the manual is just an example that a lot of people take as
the only way to do things when it's not.

  The same is true for LDraw, it's not really column or row major. All you need
to explain is that line type 1 is an array of floats that form a matrix and
you're using a column major notation and post multiplying the matrices for
reference in the spec but the LDraw standard is not column major, you can get
the same exact results by pre multiplying using row major matrices.

  While at it, please disallow spaces in filenames in line type 1.

Leonardo



Message has 4 Replies:
  Re: LDraw File Format Spec 1.0 DRAFT - Call for Public Comments
 
(...) The OpenGL 2.1 specification: page 23 Vertex Arrays "Matrices are loaded into these slots in column major order." page 43 Matrices LoadMatrix takes a pointer to a 4 × 4 matrix stored in column-major order as 16 consecutive floating-point (...) (17 years ago, 22-Aug-07, to lugnet.cad)
  Re: LDraw File Format Spec 1.0 DRAFT - Call for Public Comments
 
(...) I think we'll just include two examples of how the data would go into a matrix in the two different directions and leave it at that. At this point, I think the best thing would be to add something like the following to the currently proposed (...) (17 years ago, 22-Aug-07, to lugnet.cad)
  Re: LDraw File Format Spec 1.0 DRAFT - Call for Public Comments
 
(...) So we may considered this fully, please give your reasons for this request. The file names always fall at the end of the line, so, "because it's easier to parse" has already been considered by the LSC and discarded many thanks William Howard (17 years ago, 22-Aug-07, to lugnet.cad)
  Re: LDraw File Format Spec 1.0 DRAFT - Call for Public Comments
 
(...) That's true. However, unless I'm badly mistaken, in addition to the xyz1 being at the end, you also need the other parameters to be in the proper direction in order to get the results that the LDraw library wants. The following two matrices (...) (17 years ago, 22-Aug-07, to lugnet.cad)

Message is in Reply To:
  Re: LDraw File Format Spec 1.0 DRAFT - Call for Public Comments
 
(...) I think the original suggestion that we mention that it is in row-major format is valid. I agree that the fact that OpenGL (almost certainly one of the top two most used 3D APIs on the planet) uses column major format is a good reason to (...) (17 years ago, 21-Aug-07, to lugnet.cad)

55 Messages in This Thread:


















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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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