Subject:
|
Re: LDraw File Format Spec 1.0 DRAFT - Call for Public Comments
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Wed, 22 Aug 2007 17:17:46 GMT
|
Viewed:
|
5163 times
|
| |
| |
In lugnet.cad, Travis Cobbs wrote:
> In lugnet.cad, Rob Ross wrote:
> > I came across the *current* LDraw file spec here:
> >
> > http://www.ldraw.org/Article45.html
> >
> > and the matrix example is using column-major ordering. So now I'm really
> > confused. Does the current spec use column-major, and the new spec is proposing
> > to change it? Or is the current spec wrong in using that column-major example?
> > If it's really a change in the spec, won't that break everyone's existing code?
>
> From the standpoint of OpenGL, it uses row-major ordering. There are two ways
> to draw a transformation matrix. OpenGL uses the following (array offsets shown
> after):
>
> A D G X 0 4 8 12
> B E H Y 1 5 9 13
> C F I Z 2 6 10 14
> 0 0 0 1 3 7 11 15
>
> Sometimes it's done like so, though:
>
> A B C 0
> D E F 0
> G H I 0
> X Y Z 1
>
> (The 0 0 0 1 can of course be other numbers, but generally aren't in 3D.)
> Both forms work; one requires a 4-tall vector for points, and the other requires
> a 4-wide vector for points.
>
> Given the following part line:
>
> 1 16 X Y Z A B C D E F G H I stud.dat
>
> The OpenGL matrix will look like so:
>
> A B C X
> D E F Y
> G H I Z
> 0 0 0 1
>
> --Travis
Hi again.
What I meant was, I am confused by the (apparent) difference in what the
*current* spec says on this issue, and what the new proposed spec says.
If you will look at the current spec and scroll down near the end to the Line
Format header, you'll see this:
Line Format:
1 colour x y z a b c d e f g h i part.dat
Fields a through i are orientation & scaling parameters, which can be used in
'standard' 3D transformation matrices. Fields x, y and z also fit into this
matrix:
| a d g 0 |
| b e h 0 |
| c f i 0 |
| x y z 1 |
Which seems to be an example showing column-major ordering.
So my question about this is, is the spec really changing the ordering of all
matrices, OR was this just wrong in the original spec?
Thanks,
Rob
|
|
Message has 1 Reply:
Message is in Reply To:
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
|
|
|
|