ScnMatrix4 is a 4x4 matrix. My question is what matrix rows correspond to position(ScnVector3), rotation(ScnVector4), scale(ScnVector3). is the 4th row empty ?
Edit: I played around with the SCN4matrix, i needed it to create a shape with multiple stairs.
I needed the info about the matrix for the Shapeswithshapes method
[SCNphysicsShape shapeWithShapes: (ElementArray*) :(transformArray)];
ScnMatrix4= | Xx Xy Xy X|
| Yx Yy Yz Y|
| Zx Zy Zz Z|
| Px Py Pz W|
Xx Xy Xy = The X axis vector of the local coordinate system of the shape.
Yx Yy Yz = The y axis vector of the local coordinate system of the shape.
Zx Zy Zz = The z axis vector of the local coordinate system of the shape.
Px = position in x axis relative to parent;
Py = Position in y axis relative to parent;
Pz = Position in z Axis relative to parent;
X Y Z = read the link for info;
W= 1 define that the matrix is about the position relative to parent;
W= 0 define that the matrix is about orientation;
Basicly a SCNmatriX4 completely describes the position, rotation of a node/shape.
http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/
This Link Provides a great source for all the info you need about Matrix Manipulation;
Edit 2; i suck at editing :(
the Core Animation programming guide explains this briefly:
https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreAnimation_guide/CoreAnimationBasics/CoreAnimationBasics.html#//apple_ref/doc/uid/TP40004514-CH2-SW18
In the case of complex transforms it's not always possible to extract the position/rotation/scale information directly from the coefficients though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With