Thorsten,

Don't forget node.setCapability(ALLOW_LOCAL_TO_VWORLD_READ);

Fred


----- Original Message -----
From: "David Yazel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 7:35 AM
Subject: Re: [JAVA3D] obj coordinates


> That is correct.  You have to be part of a live scene to call
that method.
> That is because there is no "root" by which to calculate the
ultimate
> destination of the points until it exists within the live
scene.
>
> Dave Yazel
>
> ----- Original Message -----
> From: thorsten topol <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, December 18, 2001 6:17 AM
> Subject: Re: [JAVA3D] obj coordinates
>
>
> Hi,
> Thanks for your help, but I just can't find the
> getLocalToVWorldTransform() class.
> I tried to use the getLocalToVworld() class instead,
> but it does not seems to work.
>
> Here is my code:
> ...
> objs= scene.getNamedObjects();
> Set keys = objs.keySet();
> Iterator ite = keys.iterator();
> while (ite.hasNext()){
>       Shape3D node = (Shape3D) objs.get(ite.next());
>       if (node != null) {
>           node.setAppearance(appearance1);
>       }
>       Transform3D t3d3 = new Transform3D();
>       try{
>           node.getLocalToVworld(t3d3);
>       }
>       catch(RestrictedAccessException e)
>                 {System.out.println(e);}
>       ...
> }
> ...
> (I am trying to get the coordinates of several objects
> loaded from a file)
>
> When I run this code I have this exception:
> javax.media.j3d.RestrictedAccessException: Node: local
> to vworld transform is undefined for a node that is
> not part of a live scene graph
>
> How can I solve this problem and where can I find the
> getLocalToVWorldTransform() class
>
> Thanks in advance.
>
>
>
>
>  --- Justin Couch <[EMAIL PROTECTED]> a �crit : >
> thorsten topol wrote:
> >
> > > I would like to get my 3d object coordinates in
> > order
> > > to put its name (a text3d) on its barycenter.
> > > Do you know how to get these coordinates?
> >
> > Sounds like you want to know the object's
> > coordinates in the world
> > coordinate system. You can find this out by calling
> > getLocalToVWorldTransform(). Use the Transform3D to
> > then put your label
> > in the correct place.
> >
> >
> > --
> > Justin Couch
> > http://www.vlc.com.au/~justin/
> > Freelance Java Consultant
> > http://www.yumetech.com/
> > Author, Java 3D FAQ Maintainer
> > http://www.j3d.org/
> >
> --------------------------------------------------------------
-----
> > "Humanism is dead. Animals think, feel; so do
> > machines now.
> > Neither man nor woman is the measure of all things.
> > Every organism
> > processes data according to its domain, its
> > environment; you, with
> > all your brains, would be useless in a mouse's
> > universe..."
> >                                               - Greg
> > Bear, Slant
> >
> --------------------------------------------------------------
-----
> >
> >
>
================================================================
===========
> > 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!? -- Une adresse @yahoo.fr gratuite et en
fran�ais !
> Yahoo! Courrier : http://courrier.yahoo.fr
>
>
================================================================
===========
> 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".
>
>
================================================================
===========
> 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".
>
>

===========================================================================
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".

Reply via email to