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 / 14725
14724  |  14726
Subject: 
Re: LDraw File Format Spec 1.0 DRAFT - Call for Public Comments
Newsgroups: 
lugnet.cad
Date: 
Wed, 22 Aug 2007 22:05:52 GMT
Viewed: 
5063 times
  
In lugnet.cad, Leonardo Zide wrote:
  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.

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 are equivalent:

| a d g 0 |    | a b c x |
| b e h 0 |    | d e f y |
| c f i 0 |    | g h i z |
| x y z 1 |    | 0 0 0 1 |

The first is "column major", the second is "row major".
However, the following matrices are NOT equivalent to the two above (are they?):

| a d g x |    | a b c 0 |
| b e h y |    | d e f 0 |
| c f i z |    | g h i 0 |
| 0 0 0 1 |    | x y z 1 |


  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.

Without saying where the xyz go with respect to the other values, I don't see
how this is enough.  However, my proposal of just providing the first two
matrices above as examples avoids saying that it's in column major or row major
form.

--Travis



Message has 1 Reply:
  Re: LDraw File Format Spec 1.0 DRAFT - Call for Public Comments
 
(...) Those matrices would be wrong in both cases (assuming xyz is the translation), you probably swapped those with the next matrices. :) (...) The first one here is a column major and the second is a row major matrix, and you are right, they are (...) (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
 
(...) 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 (...) (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