Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java 3D > Re: Ghost image...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 802 of 823
Post > Topic >>

Re: Ghost image while tracking

by Joyal <dhgouveia@[EMAIL PROTECTED] > Mar 11, 2008 at 07:44 AM

maybe when you move the object , you dont multiply the matrix of the
Transform Group , and it change the position, or maybe im wrong xD

i give a example:

ColorCube cube=new ColorCube();

BranchGroup modelObj=new BranchGroup();
TransformGroup trasnformModel=new TransformGroup();
TransformGroup rotateModel=new TrasnformGroup();

rotateModel.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
rotateModel.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
rotateModel.addChild(cube);

transformModel.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
transformModel.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
transformModel.addChild(rotateModel);

modelObj.addChild(transformModel);

//Transform to Move the object and rotate
Transform3D t3d= new Transform3D();
Transform3D t3dRot= new Transform3D();
Transform3D t3dMov= new Transform3D();

//Movement
t3dMov.setTranslation(new Vector3d(0.0f,0.0f,1.0f));
t3d.mul(t3dMov);
transformModel.setTransform(t3d);

//Rotate all the object
t3dRot.rotX(x);
t3d.mul(t3dRot);
transformModel.setTransform(t3d);


//New Transform to Rotate the object but doesnt change his egde
Transform3D t3d2= new Transform3D();
Transform3D t3dRot2= new Transform3D();

//Rotate the object but in the same edgde
t3dRot2.rotZ(z);
t3d2.mul(t3dRot2);
rotateModel.setTransform(t3d2);


i hope it's help you! :)

pd: sorry my english

On Mar 10, 9:40 pm, Mark Hood <inva...@[EMAIL PROTECTED]
> wrote:
> Weird... you replyed to a post from over a year ago.
>
> Anyway, abandoning Java 3D is an option and makes sense over the long
> term, but it might not be the best option short term if one has a lot
> of code invested in it, especially when a fix for a specific problem
> is available and well-known:
>
> Java 3D has a 1-frame latency between the view parameters currently in
> use by the renderer and the scene graph view platform position that
> the application sets.  So if you take the view parameters from
> something like Canvas3D's ImagePlateToVworld and align some geometry
> in the scene graph to it, it will end up being 1 frame behind the
> actual view by the time the scene graph is actually updated by the
> system.
>
> The ViewInfo utility class (somewhere in com.sun.j3d.utils.universe)
> will give you view info that is up-to-date with respect to the current
> state of the scene graph.
>
> -- Mark
 




 4 Posts in Topic:
Ghost image while tracking
me_dave@[EMAIL PROTECTED]  2007-12-03 06:36:15 
Re: Ghost image while tracking
Zaxonic <zaxonic@[EMAI  2008-03-07 20:47:09 
Re: Ghost image while tracking
Mark Hood <invalid@[EM  2008-03-10 18:40:18 
Re: Ghost image while tracking
Joyal <dhgouveia@[EMAI  2008-03-11 07:44:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 5 14:46:48 CDT 2008.