Thursday, July 26, 2018

3d - getting bone base and tip positions from a transform matrix?


I need this for a Blender3d script, but you don't really need to know Blender to answer this.


I need to get bone head and tip positions from a transform matrix read from a file. The position of base is the location part of the matrix, length of the bone (distance from base to tip) is the scale, position of the tip is calculated from the scale (distance from bone base) and rotation part of the matrix.


So how to calculate these?


bone.base([x,y,z]) # x,y,z - floats
bone.tip([x,y,z])


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...