Hello, I found a solution for this problem. I'm not using anymore the MouseRotate, MouseTraslate and MouseZoom behaviors. Now, I'm using PickRotateBehavior, PickTranslateBehavior, PickZoomBehavior. It's easiest and works.
the VRML's respective BranchGroups are children of yours respective TransformGroup. Each TG has a child that is a VRML's BG. And each TransformGroup must have the ENABLE_PICK_REPORTING capability set. like that: TG= new TransformGroup(T3D); TG.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); TG.setCapability(TransformGroup.ALLOW_TRANSFORM_READ); TG.setCapability(TransformGroup.ALLOW_CHILDREN_EXTEND); TG.setCapability(TransformGroup.ENABLE_PICK_REPORTING); TG.setCapability(BranchGroup.ALLOW_DETACH ); TG.setCapability(BranchGroup.ALLOW_CHILDREN_EXTEND); TG.setCapability(BranchGroup.ALLOW_CHILDREN_READ); TG.setCapability(BranchGroup.ALLOW_CHILDREN_WRITE); TG.addChild(BG); Where BG is the VRML's BranchGroup. So Thanks for replys, Melina. --- Melina Alberio <[EMAIL PROTECTED]> wrote: > No, I'm using TGTool with T3Dtool, and TGTissue with > T3DTissue. > > Don't you think it may be problem with Canvas or > bounds? I have no idea. > > Peace of my program: > > Transform3D T3DTool = new Transform3D(); > T3DTool.set(0.4,new Vector3d(-0.5, 0.0, 0.0)); > > Transform3D T3DTissue = new Transform3D(); > T3DTissue.set(0.2,new Vector3d(0.4, 0.0, 0.0)); > > TGTool = TGroup(T3DTool, BGTool); > TGTissue = TGroup(T3DTissue, BGTissue); > > protected TransformGroup TGroup(Transform3D T3Dobj, > BranchGroup BGobj){ > > TransformGroup TGobj = new TransformGroup(T3Dobj); > TGobj.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); > TGobj.setCapability(TransformGroup.ALLOW_TRANSFORM_READ); > TGobj.setCapability( > TransformGroup.ALLOW_CHILDREN_EXTEND ); > TGobj.setCapability( BranchGroup.ALLOW_DETACH ); > TGobj.addChild(BGobj); > > behaviors(BGobj, TGobj); > BGobj.compile(); > > return TGobj; > } > > > --- Alessandro Borges > <[EMAIL PROTECTED]> > wrote: > > > Check if you are not referencing the same > > Transform3D for both TG transform. > > > > > > --- Melina Alberio <[EMAIL PROTECTED]> > > escreveu: > > > Hello! I need an important help! > > > > > > I'm doing a project where I import different > Vrml > > > objects and add respective BranchGroups to two > > > different TransformGroups. > > > Below, My Objects hierarchy: > > > > > > BranchGroup (objRoot) > > > 1.1- TransformGroup (TGRoot) > > > 1.1.2- Background (background) > > > 1.1.3- TransformGroup (TGTool) > > > 1.1.3.1- Transform3D (T3DTool) > > > 1.1.3.2- BranchGroup (BGTool) > > > 1.1.3.2.1- VrmlScene (VSNTool) > > > 1.1.4- TransformGroup (TGTissue) > > > 1.1.4.1- Transform3D (T3DTissue) > > > 1.1.4.2- BranchGroup (BGTissue1) > > > 1.1.4.2.1- VrmlScene (VSNTissue1) > > > 1.1.5- DirectionLights (Luz1) > > > 1.1.6- DirectionLights (Luz2) > > > > > > Now, below, we have the behaviors applied to > VRML > > > objects: > > > > > > protected void behaviors(BranchGroup BGobj , > > > TransformGroup TGobj) > > > { > > > > > > MouseRotate mRotObj = new MouseRotate(); > > > mRotObj.setTransformGroup(TGobj); > > > mRotObj.setSchedulingBounds(TGObj.getBounds()); > > > > > > MouseTranslate mTransObj = new MouseTranslate(); > > > mTransObj.setTransformGroup(TGobj); > > > > mTransObj.setSchedulingBounds(TGobj.getBounds()); > > > > > > MouseZoom mZoomObj = new MouseZoom(); > > > mZoomObj.setTransformGroup(TGobj); > > > mZoomObj.setSchedulingBounds(TGobj.getBounds()); > > > > > > BGobj.addChild(mRotObj); > > > BGobj.addChild(mTransObj); > > > BGobj.addChild(mZoomObj); > > > > > > } > > > > > > where TGobj can be both TGTool ot TGTissue, and > > BGobj > > > can be both BGTool or BGTissue. > > > > > > Now, the problem: > > > When a run de application, the behaviors work, > > but, > > > when a manipulate(rotate, zoom, move) one of the > > > objects, the two change at the same time. When a > > click > > > at anywhere of scren and manipulate, the objects > > > change(move, zoom, rotate). > > > I'd like to restrict the manipulation area to > the > > > object area, but until now it doesn't work. > > > > > > HELP ME PLEASE! > > > > > > Melina Alberio > > > > > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Tired of spam? Yahoo! Mail has the best spam > > protection around > > > http://mail.yahoo.com > > > > > > > > > =========================================================================== > > > To unsubscribe, send email to > > [EMAIL PROTECTED] and include in the body > > > of the message "signoff JAVA3D-INTEREST". For > > general help, send email to > > > [EMAIL PROTECTED] and include in the body of > > the message "help". > > > > > > > > > > > > > > > > _______________________________________________________ > > Yahoo! Mail - Agora com 250MB de espaço gratuito. > > Abra > > uma conta agora! http://br.info.mail.yahoo.com/ > > > > > =========================================================================== > > To unsubscribe, send email to > [EMAIL PROTECTED] > > and include in the body > > of the message "signoff JAVA3D-INTEREST". For > > general help, send email to > > [EMAIL PROTECTED] and include in the body of > the > > message "help". > > > > > > > __________________________________ > Do you Yahoo!? > The all-new My Yahoo! - Get yours free! > http://my.yahoo.com > > =========================================================================== > To unsubscribe, send email to [EMAIL PROTECTED] > and include in the body > of the message "signoff JAVA3D-INTEREST". For > general help, send email to > [EMAIL PROTECTED] and include in the body of the > message "help". > __________________________________ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".