Daniel,

Thank you for your reply which did arrive intact.  If I understand correctly this
means that the labels are disconnected from their nodes so if you
rotate/translate either an individual node or a branch of nodes then you have to apply
this transform to the labels separately or is there away of associating the map node
with it's label?

Cheers

Carolyn


Daniel Selman wrote:
>
> Carolyn,
>
> Welcome to the wonderful world of Java 3D! I'll have a shot at answering
> your questions:
>
> I think what you are trying to do can be handled by an appropriate scene
> graph. For example:
>
>                  ROOT
>                  |  |
>              -----  --------
>              |              |
>              |             Map Branch
>        Labels Switch
>              |
>          Labels TG
>          |       |
>     Label 1   Label N
>        TG       TG
>         |        |
>        BG       BG
>
> (I hope this arrives intact)
>
> Labels Switch: use this Switch Node to control the visibility if the labels
> Labels TG: use this TransformGroup Node to move *all* the labels relative to
> the map
> Label 1/N TG: use these TransformGroup Nodes to move individual labels
> Label BG: use this BranchGroup Node to contain the geometry (Shape3D) for
> each label
>
> The important point to note is that a transform applied to the Labels TG
> will be automatically applied to all of the child nodes of the Labels TG
> (recursively, down the scene graph). This makes the scene graph a very
> convenient data structure for doing the kind of positioning that you
> describe.
>
> Your choices for label geometry are either Text2D or Text3D nodes. If you
> plan on having many labels then Text2D is probably the only realistic
> option.
>
> I would recommend you check out some of the Java 3D tutorials around (see
> the earlier Java 3D book thread for a list). We also have some sample code
> on our site at:
>
> http://www.tornadolabs.com/News/news.html
>
> Best of luck!
>
> Daniel Selman
>
> [EMAIL PROTECTED]
>
> Tornado Labs Ltd.
> http://www.tornadolabs.com
>
> -----Original Message-----
> From: Discussion list for Java 3D API
> [mailto:[EMAIL PROTECTED]]On Behalf Of cgerrard
> Sent: Friday, July 28, 2000 3:43 PM
> To: [EMAIL PROTECTED]
> Subject: Is it possible to associate a property from one node to another
>
> Hi,
>
> I've just started working in Java3D and I wonder if anyone can answer any
> of these questions.
>
> Firstly can you link a property from one node to another, for example
> it would be nice to set a relationship between one transform group and
> another so if the transform changes the second one will become adjusted
> by the same difference.
>
> How do you cope with a situation where you want to add a transform group
> to a switch that controls the visibility of objects of that type but
> you also need to add the transform group to another transform group to
> handle
> positioning.
> The scenario is that I have a map showing nodes each of which has
> a label.  I can position the label by adding it to the TG of the parent node
> but this means I can't added to a global branch label switch so that
> I can turn all node labels on and off.
>
> What is the best way to show text on the map?  I had hoped I'd
> be able to use Swing but of course I found out the hard way that
> Canvas3D extends Canvas so all Swing components get hidden by the
> platform level painting in the Canvas3D object.
>
> Thanks in advance for any help you can give.  The lack of detailed
> technical info available for Java3D at present is giving me quite some
> problems as a newcomer.
>
> Cheers
>
> Carolyn Gerrard
> [EMAIL PROTECTED]
>
> ===========================================================================
> 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