Skip to main content

Graphical "Post-it" Note

11 replies [Last post]
dinaharchery
Offline
Joined: 2007-08-13
Points: 0

Hello all,

This time I have a real question that has nothing to do with any "buggy" code on my behalf :).

I need to create an "input notes" Object that is attached to a specific area on a displayed Model. A translucent "box" that will allow the user to enter text from the keyboard directly and display it? The "text box" should also rotate with the model.

I was wondering if anyone had any ideas on how to allow for the direct entry and display of text using Java3D. I am aware of Text2D/3D Objects but really need something like a "post-it" note that can be written on directly on the displayed Model.

Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
aces
Offline
Joined: 2003-07-17
Points: 0

Very interesting !
But seems it is rendering the swing components in a 2D plate in front of 3D, like a HUD, isn't ?

Dmitri Darine

Nope :) If you click "toggle fullscreen" button and use WSAD + arrows
you will see that the gui controls are located on the rectangular
desktop which is just an object in 3D space - not HUD.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

dinaharchery
Offline
Joined: 2007-08-13
Points: 0

Another idea - kind of a hack I guess :)

What if I just attached multiple Text2D Objects (one for each line of text) to a single BranchGroup Object and then attached that to the main "root" Group Object of the model ? I would like to have a scroll-like feature but will settle for just multiple lines of text in the same area if possible.

Is there a way in Java3D Text2D Class to ensure that the text Objects can be moved one line down (for each text line - like a carriage return)?

Thanks.

Dmitri Darine

java3d-interest@javadesktop.org wrote:
>
> Is there a way in Java3D Text2D Class to ensure that the text Objects can be moved one line down (for each text line - like a carriage return)?
>
If not you can emulate it with TransformGroups.

Another way to go might be:

1. render the component into BufferedImage
2. make a Texture2D from BufferedImage
3. apply Texture2D to Shape3D

I have never tried this approach - it is just a quick thought. How to
render into BufferedImage:
http://forums.sun.com/thread.jspa?messageID=3759682

good luck

DD

[att1.html]

dinaharchery
Offline
Joined: 2007-08-13
Points: 0

Thank you very much Dmitri. You have been extremely kind for the responses.

Quick question:

Does Java3D have a HUD option ?

Once again, thank you.

Dmitri Darine

java3d-interest@javadesktop.org wrote:
>
> Does Java3D have a HUD option ?
>
>
search the forum for "postRender"

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

dinaharchery
Offline
Joined: 2007-08-13
Points: 0

Thank you.

dinaharchery
Offline
Joined: 2007-08-13
Points: 0

I have an idea that I hope someone can help me with :).

What about embedding a JTextField in a Java3D rectangle? This rectangle could then be attached to the current Model display.

Does anyone know if this will work - particularly the embedding of the JTextField in a Java3D Polygon ?

Thank you.

Dmitri Darine

This is not trivial task I guess... The only thing which comes into my
mind is this one:
https://jogl-demos.dev.java.net/ the demo called XTrans.

but it is not Java3D, it is JOGL...

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Dmitri Darine

NO! :) Now I recalled! It was a nice demo from jMokey Engine -
TestJMEDesktop.

http://www.jmonkeyengine.com/webstart/jmedemo.php?TestChooser

I don't think Java3d can do that.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

dinaharchery
Offline
Joined: 2007-08-13
Points: 0

Thank you :)

I will take a look at it - Do you know if JMonkey has NURBS trimming?

Once again, thank you.