|
|

How to let the red lines of X axle be rotated to ZY axle
Dim AngleTx As Single, AngleTy As Single, AngleTz As Single
AngleTx = -TestMesh.GetRotation.x / 180 * gcPI
AngleTy = -TestMesh.GetRotation.y / 180 * gcPI
AngleTz = TestMesh.GetRotation.z / 180 * gcPI
Dim xX As Single, xY As Single, frontX As D9_3DVECTOR, frontXr As D9_3DVECTOR
'Rotate Y axle
frontX = Vector3(MeshCenter.x + sngLEN * Cos(AngleTy), MeshCenter.y, MeshCenter.z + sngLEN * Sin(AngleTy))
'Rotate Z axle
frontXr = Vector3(MeshCenter.x + sngLEN * Cos(AngleTz), MeshCenter.y + sngLEN * Sin(AngleTz), MeshCenter.z)
dMath.Project3DPointTo2D frontX, xX, xY, False
How does YZ rotation add together? |
|