I was looking at this and had the following questions
have you tried making a Transform3D object when your class is first created?
something like

constructor()
{
        mTransform3D = new Transform3D(); //where mTransform3D is a class
variable 
}

then, in your following method
->

public void modifyTransform(Vector3d v)            // often called
{
        //mya addec code here
        mTransform3D.setIdentity();
        //Transform3d trsf = null; //do not set this to null, because otherwise
your will need to create
                                                                //a new object
in the get transform method. The get transform method gets a new object
                                                                //if the
incoming transform is null (i think) because it is setting the values of the
                                                                //incoming
transform3d with the TransformGroup's transform
        //tg.getTransform(trsf);  // problem here ....
        tg.getTransform(mTransform3D);
        mTransform3D.setTranslation(v);
        tg.setTransform(mTransform3D);

        //so, for this, you should have no creation of any objects, just setting
of values


        //trsf = setTranslation(v); //this does not work

    }

use the setIdentity method for when you are using transforms.  This is just like
in OpenGL when you push a matrix and then load an identity matrix.  Always must
keep things homogenous =)

Scott


Scott Decker
Research Scientist
Pacific Northwest National Labs
[EMAIL PROTECTED]

=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to