Geomtransforms, don't work ?

I use them as described in the manual. But when I try to read the position from the body, all it returns is a vector with the values {NaN,NaN,Nan} If someone has a working example
with geomtranforms I’d really appreciate to see them…

Heres my code, what do I do wrong ?


 //create geom box
     box = new GeomBox("geombox:"+getName(),bxs,bys,bzs);
    //create geomtransform
    geomTransform = new GeomTransform("geomtransform:"+getName());
    //set geom for geomtransfrom
    geomTransform.setEncapsulatedGeom(box);
    //Create body
    body = new Body(name,world);
    //get position and rotation to be used for this body, as stated in the Transform3d object (tr)
    Vector3f pos = new Vector3f();
    tr.get(pos);
    Matrix3f m = new Matrix3f();
    tr.get(m);
    //set position and rotation of body
    body.setPosition(pos);
    body.setRotation(m);
    //set geom
    body.setGeom(geomTransform);
    //set mass parameters
    body.adjustMass(mass);

Heck!!! I got the same thing, but with rotations!!!
see:
http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=physics;action=display;num=1111337078

Just looked at your code, dont get whats wrong. I mean you didnt even START your simulation at that point and still…

It seems to me, that you’re problem is mine in blue - i use rotations, you use positions, in both cases we get those NaN values.

I think if we got a solution - the solution works for both.
Have you tried the advice Will gave me?

[quote]It seems to me, that you’re problem is mine in blue - i use rotations, you use positions, in both cases we get those NaN values.

I think if we got a solution - the solution works for both.
Have you tried the advice Will gave me?
[/quote]
I’m sure if you calll getPosition and I call getRotation we will both get NaN’s . I tried his suggestion, didnt work. I tried everything, calling getPosition on the enclosed geom, on the body, on the GeomTransform. Everything. Changing the order I calll methods, create the body before the GeomTransform, create it after, add Geomtransform to the body before I add the GeomBox to the GeomTransfrom and vice versa. I spent abount 8 hours trying different combinations.
According to the ODE docs it’s very simple, so I just dont get it. Maybe it’s because I use joint and jointAmotors to connect the bodies ? Should that cause any problems ?

I don’t know. Have you tried it as stand-alone code?

did you also try to set the position of the GeomTransform directly?