On 25/03/2013 at 15:39, xxxxxxxx wrote:
I'm currently looking over some coffee scripts and looking at taking some of the tips in them into python. Could someone please shine some light on or help me re-write this coffee script snippet into python?
I'm getting stuck on m = new(Matrix)?
var mobj = Object->GetMg(); var tobj = Target->GetMg(); var oldrot, newrot; var p1 = mobj->GetV0(); var p2 = tobj->GetV0(); var m = new(Matrix); m->SetV0(p1); m->SetV3(vnorm(p2 - p1)); m->SetV2(vnorm(vcross(p2-p1, vector(0,1,0)))); m->SetV1(vnorm(vcross(p2-p1, vector(0,0,1)))); newrot=m->GetHPB(); var orot=mobj->GetHPB(); newrot.z=orot.z; oldrot=mobj->GetHPB();