THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/02/2004 at 07:08, xxxxxxxx wrote:
Cinema 4D Version: 8.200
Language(s) : C.O.F.F.E.E ; XPRESSO ;
Is it possible to retrieve the coordinates of the tip and the root of a bone with COFFEE?
On 18/02/2004 at 04:32, xxxxxxxx wrote:
I found out that the coordinates of the root corresponds to the value retrieved from the GetPosition() function. Can someone tell me how to calc. the coordinates of the tip?
On 19/02/2004 at 19:25, xxxxxxxx wrote:
Bones extend along the Z axis, so just get the length and go that distance along the Z axis:
Matrix m = obj->GetMg(); // Or GetMl() for the local coordinates
Real length = obj->GetDataInstance()->GetReal(BONEOBJECT_LENGTH);
Vector tip = m.off + !m.v3 * length;
On 19/02/2004 at 19:26, xxxxxxxx wrote:
(Come to think of it, perhaps that ! for normalization shouldn't be there. I haven't checked if a bone with deformed coordinates axes calculates its length with the normalized or unnormalized axes.)
On 20/02/2004 at 01:03, xxxxxxxx wrote:
Thanks Mikael! Let me know if you have any info about the normalisation
On 20/02/2004 at 01:49, xxxxxxxx wrote:
var m = obj->GetMG();
println(m.off); //creates a sytax error!!
I think this member only exist in C++. Do you have an equivalent in COFFEE for me?
On 22/02/2004 at 17:17, xxxxxxxx wrote:
In C.O.F.F.E.E. that would be m->GetV0() and m->GetV3(), ! would be vnorm().
On 22/02/2004 at 17:19, xxxxxxxx wrote:
Normalization would be easy to find out. Just test it with a bone that you have scaled (using the animation tool, not the model tool) and see which one works. (The one with vnorm()/! or the one without.)