Hi, all,
I have problems with transformation matrices in DGDK.NET
.
Let's say I want to rotate on itself an object with world coordinates stored in a 3D structure (P) and using rotation angles stored in another 3D structure (TR1). Here is the code:
With oDBMath
.RotateYPRMatrix4(Matrix, TR1.AY, TR1.AX, TR1.AZ)
.SetVector3(Vector1, P.X, P.Y, P.Z)
.TransformCoordsVector3(Vector2, Vector1, Mat)
P.X = .XVector3(Vector2)
P.Y = .YVector3(Vector2)
P.Z = .ZVector3(Vector2)
End With
Whatever values are stored in P and TR1, P's all three coordinates are always set to zero! How come? Something escapes me, but what? I have tried with Vector4s having W set to 1.0, same thing.
Thanks,
Thierry