here's a simple explanation of matrices (the math ones).
a rotation matrix (the most common in 3D applications) can be thought of as 3 unit vectors. a unit vector is a vector with a
length of 1 unit. the 3 vectors represent the 3 axis, X, Y, and Z. so the Identity Matrix looks like this:
1 0 0
0 1 0
0 0 1
the first row represents the X axis, the next 3 represent the Y axis, and the last 3 represent the Z axis. as you can see, this describes no rotation, because the X-axis is pointing in the X direction, the Y in the Y direction, etc.
now imagine you flip the object 180 degrees around the Z axis. the matrix would look like this:
-1 0 0
0 -1 0
0 0 1
the X-axis now points in the negative direction, the Y-axis now points in the negative Y direction, and the Z-axis is unchanged.
that's basically how matrix rotation works. each row is a unit vector, describing the orientation of one of the 3 axis'.
the matrices in Newton are actually 4x4, with the 4th row being the offset (position) information.
matrices are REALLY usefull, because you can determine things VERY easily. for example in my bowling game, I can determine if a pin has fallen down by simply examining the Y component of the object's Y-axis (2nd row of the matrix). if the pin is standing up, this number should be very close to 1. if the pin has fallen, this number should be < 1. it works perfect every time, and would be nearly impossible to determine just from the 3 euler angles dbpro provides.
NDB_NewtonBodyGetMatrix Pin
if (NDB_GetVector_Y(2) < 0.9) then PIN_FELL
you can also use this concept to determine which way a car is facing, etc. very usefull once you get used to it.
Go Go Gadget DBPRO!
Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB