Adding Text to Java3d

HI ,
In my application i need to add text in my java3d scene at the runtime at any no of places. How
can i acheive that. Somebody suggested me of Overlays.I dont know what is that actually (I am learning that actually)..but can somebody help me in this problem. Any example or url will be really appriciable.
Thanks
Akhil Nagpal

Hi,
I tried to add the text using the same piece of code at the place where i used to add straight lines.
The piece of code is exactly same as urs.
Shape3D tmpShape3D = new Shape3D();
PolygonAttributes tmpPolygonAttributes = new PolygonAttributes();
Appearance tmpAppearance = null;
Transform3D tmpTransform3D = null;
tmpShape3D = new Text2D("Hi ABCDEFGHIJKLMNOPQRSTUVWXYZ", new Color3f (Color.red), "Arial", 30, Font.BOLD);
tmpAppearance = tmpShape3D.getAppearance();
tmpPolygonAttributes.setCullFace(PolygonAttributes.CULL_NONE);
tmpAppearance.setPolygonAttributes(tmpPolygonAttributes);
tmpTransform3D = new Transform3D();
tmpTransform3D.setScale(0.5f);
tmpTransform3D.setTranslation(new Vector3f(1.0f, 1.0f, 0.0f));
TransformGroup tmpSingleComment = new TransformGroup(tmpTransform3D);
tmpSingleComment.setCapability(TransformGroup.ALLOW_CHILDREN_READ);
tmpSingleComment.addChild(tmpShape3D);
bgRed = new BranchGroup();
bgRed.addChild(tmpSingleComment);
bgRed.setCapability(BranchGroup.ALLOW_DETACH);
bgRed.setCapability(BranchGroup.ALLOW_CHILDREN_WRITE);
bgRed.setCapability(BranchGroup.ALLOW_CHILDREN_READ);
bgRed.setCapability(BranchGroup.ALLOW_CHILDREN_EXTEND);
transsceneWF.addChild(bgRed);
Here every time i have to create a new BranchGroup (bgRed) for each Text i add. Earlier in this place i was adding my lines objects depending upon there start and end possition.This was just to test.Also it does not thro any error or exception while adding text nodes.
But i am not able to see any text. can u telll whats wrong in this.....
Regards,
Akhil Nagpal

Similar Messages

  • Adding text to java3d canvas

    Hi,
    I have a java3d program running.Now in my running java3d program in the java3d scene i have to draw some lines by dragging the mouse (I am able to do that)....then at any point on some event i should be able to add text (say "these to lines are parallel")..
    Can you explain or give me a working example which has the similar functionality.This will be a great help. As we are new to java3d technology.this is very urgent.Thanks in advance
    shyam

    Try this:
    import java.awt.Font;
    import. javax.vecmath.Color3f;
    int size= 120;
    Text2D textObject = new Text2D("These two lines are parallel", new Color3f(1f, 1f, 1f),
    "Serif", size, Font.BOLD);
    yourTranslationGroup.addChild(textObject);
    Note: you may have to add a rotation, to make sure the text us oriented such that it's perpendicular to the camera.
    Cheers,
    -jeroen

  • Photoshop CC : Workspace Flashing Black When Inserting Guides & Completely Black When Adding Text

    I recently bought Photoshop CC (2 Days Ago) and shortly after installing I jumped onto Photoshop CC and started to set up the prefferences for my personal use and started to just do some basic stuff and see whats new in CC. when inserting Guides & adding Text the workspace started to flash/stay BLACK. I don't know whats going on but my specs are better than the minimum requirements? Any idea whats going on? Operating System : Windows 8.1

    Have a look through this step by step guide.
    http://blogs.adobe.com/crawlspace/2012/07/photoshop-basic-troubleshooting-steps-to-fix-mos t-issues.html
    It's coming up 1am here, so I am calling it a night.

  • I saved a PDF doc in adobe and then added text to the form. But every time I try an email it it only

    I saved a PDF doc in adobe and then added text to the form. But every time I try an email it it only sends the original form without text. Once I've changed a doc in Adobe, how can I save it so that I'm able to use it with added text and notes? Also, I'm using a new iPad.

    If you are using those apps or websites, they are likely viewing the PDF using iOS' built in PDF previewing, which will not show annotations and markup to the PDF. We have informed Apple of this issue, but do not have any insight into whether or when they will fix it.
    Regarding the qustion about importing pictures, Adobe Reader does not provide any capabilities to import pictures into a PDF. To do this, you'll need to use Acrobat, available on your desktop computer.

  • How can I remove the underline from added text for tracing edits

    We have a lot of content that includes underscores and when we use the track text edit feature added text is green and underlined. How can I change the properties of the added text to not be underlined?

    Starting with FM11, you could specify a custom colour to be used for track changes, but the styles (underline, strikethrough) are still hardwired.
    Even if you try to make the changes to the rack text edit conditions in a MIF file, they will get overwritten as the MIF is interpreted when opened by FM.
    Please use the new Bugs & Features form to submit an enhancement request: https://bugbase.adobe.com/index.cfm

  • Adding Text to a photo...Need help

    I'm new to Adobe Photoshop Elements 7. I'm following the instructions for adding text to a photo, but I can't see what I'm typing. I can see the cursur, but nothing else. I can see the text in the Layer, but not on the photo. Please help.

    Check the font size in the options bar. If it's really small you won't see it.
    Look in your layer's palette and insure your text is in a layer located above the photo in the stack.
    You might also check your image's resolution in the Image Size dialog. I've seen a couple of posts where someone changes the resolution to 1 with resample turned off...then can't see the text because it's too small even when they have large numbers inserted in the font size box.

  • Acrobat crashes whenever adding text

    This occurs whether there is a text box to be filled in or using the add text function. There may be other things also crashing it but this is the biggest issue for me on my Mac host system. If I open the same documents in a Windows VM using Reader, I can enter text without difficulty.
    Mac 10.8.4
    Acrobat XI Version 11.0.03
    Here's some of the error message displayed:
    Crashed Thread:  0  Dispatch queue: com.apple.main-thread
    Exception Type:  EXC_CRASH (SIGABRT)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Application Specific Information:
    abort() called
    terminate called throwing an exception
    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0   libsystem_kernel.dylib                  0x929d3a6a __pthread_kill + 10
    1   libsystem_c.dylib                       0x96905b2f pthread_kill + 101
    2   libsystem_c.dylib                       0x9693c4ec abort + 168
    3   libc++abi.dylib                         0x94e1a7e0 abort_message + 151
    4   libc++abi.dylib                         0x94e18249 default_terminate() + 34
    5   libc++abi.dylib                         0x94e18289 safe_handler_caller(void (*)()) + 13
    6   libc++abi.dylib                         0x94e182f1 std::terminate() + 23
    7   libc++abi.dylib                         0x94e193e6 __cxa_throw + 110
    8   com.adobe.linguistic.LinguisticManager          0x14054a46 0x1404e000 + 27206
    9   com.adobe.linguistic.LinguisticManager          0x1405dabb devtech::LM_FileSpec::LM_FileSpec(FSRef const&) + 43
    10  com.adobe.AcrobatPlugin.Spelling          0x1340b733 0x133d0000 + 243507
    11  com.adobe.AcrobatPlugin.Spelling          0x1340b05e 0x133d0000 + 241758
    12  com.adobe.AcrobatPlugin.Spelling          0x1340affb 0x133d0000 + 241659
    13  com.adobe.AcrobatPlugin.Spelling          0x13400acb 0x133d0000 + 199371
    14  com.adobe.Acrobat.framework             0x00286b29 0xda000 + 1755945
    15  com.adobe.Acrobat.framework             0x0028666a 0xda000 + 1754730
    16  com.apple.CoreFoundation                0x9743c406 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22
    17  com.apple.CoreFoundation                0x9743bda5 __CFRunLoopDoTimer + 709
    18  com.apple.CoreFoundation                0x97420bb2 __CFRunLoopRun + 1842
    19  com.apple.CoreFoundation                0x9742001a CFRunLoopRunSpecific + 378
    20  com.apple.CoreFoundation                0x9741fe8b CFRunLoopRunInMode + 123
    21  com.apple.HIToolbox                     0x9017ff5a RunCurrentEventLoopInMode + 242
    22  com.apple.HIToolbox                     0x9017fbf5 ReceiveNextEventCommon + 162
    23  com.apple.HIToolbox                     0x9017fb44 BlockUntilNextEventMatchingListInMode + 88
    24  com.apple.AppKit                        0x9070f93a _DPSNextEvent + 724
    25  com.apple.AppKit                        0x9070f16c -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 119
    26  com.apple.AppKit                        0x907055cc -[NSApplication run] + 855
    27  com.adobe.Acrobat.framework             0x000e38b0 0xda000 + 39088
    28  com.adobe.Acrobat.framework             0x000e1ff3 RunAcrobat + 307
    29  com.adobe.Acrobat.Pro                   0x000d3ed5 main + 91
    30  com.adobe.Acrobat.Pro                   0x000d3e71 start + 53

    I'm having a similar issue. Every third or fourth time I save after adding text Acrobat crashes with no meaningful reason (at least none in the crash message)...even though the added text is saved. I'm working through trying different text settings to see if there is a problem there. I'll post what I find.

  • Unable to print added text only in Acrobat Pro XI

    User is trying to print added text that's been added to an existing PDF page.  In Acrobat X she chose "Form fields only" under Comments & Forms from the Print menu.  In XI it produces a blank page.  The added text only shows up if she chooses Document or Document and Markups, but then she gets the entire document.  She only wants the added text to print.

    Thanks to all who commented here.  I found that adding text using Tools>Content Editing>Add Text will not allow the user to print solely the added text.  As everyone responded here, that's as designed.  However, using Comment>Annotations>Add Text does allow the user to print solely the added text as she was used to doing in Acrobat X.  I thought it was the same tool under two different headings, but obviously they interact differently in the print menu.  Choosing Form fields only from the Print Menu's Comments & Forms panel will produce solely the text added under the Comment panel's Add Text tool without printing the rest of the document page.  And the user doesn't have to turn the document into a form to do so.

  • Why does Preview automatically resize the text box to cut off the last character of added text? How do I fix it?

    Why does Preview automatically resize the text box to cut off the last character of added text? How do I fix it?
    I use the Tools > Annotate > Add Text feature, and when I click away after adding text, it automatically changes the text box size such that the last letter -- or last word -- gets bumped off into an invisible line below it, forcing me to manually adjust every single text box. It is highly annoying when trying to complete PDF forms (e.g. job applications).
    It appears to be a glitch, quite honestly, an error resulting from Apple's product design. Has it been fixed in the new operating system (for which they want $30)?
    I would very much appreciate any help you can provide! Thank you for your time.

    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites that cause problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • Why does added text disappear when I move the cursor

    After adding text to an unprotected .pdf file the text disappears when I move the cursor and want to add a second box of text. The text in the first box reappears when I double click on the space where the box was. How do I set the text so that it remains visible and printable?

    Hi,
    I think the data in the PDF file was filled-in using MAC preview.
    One option is to ask the user to fill the file again using Adobe Reader or Acrobat.
    Or else refer to following link:
    http://acrobatusers.com/actions-exchange/pdf2fdf_auto-save
    Regards,
    Anoop

  • Adding text to a photograph

    Hi,
    My question is in 2 parts really:
    1) Once the photos are uploaded into iphoto, is there anyway of adding text to the photo?  Say a title, or details of something about the picture that I wouldn't want to forget?  If so, how can I do this?
    2)My camera has the ability to add text to pictures.  If I did this, when I came to uploading them into iphoto, would the text come with the pictures, and if so, where would it be displayed?
    3)When exporting the photographs, to share with others or print, would I be able to disable the text, so it doesn't show on the photograph?
    Thanks very much.

    in iPhoto there are several ways to add information about a photo - a title - a decscription - keywords - putting it in an album = these are all metadata and local to your computer - you can choose to include or not include them when you export a photo
    if you want to actually put text on a photo then you must use a thir party program (Preview can do this - Annotate) or external editor - one you add text to a photo it is there and the old information behind the text is gone
    as to what you camera does - read the camera manual - if it puts text in the EXIF ro IPTC fields and if iPhoto reads thos fields then that information will be part of the iPhoto database - it it puts text directly on a photo then it is part of the photo
    LN

  • Adding text to a photo in iphoto

    How do you add text to a smart album photo?  Also, when syncing to my iphone, I want the text to appear.  I am building a tropical plant field guide.

    iPhoto has no capability of adding text onto an image.  For that you'll need a 3rd party image editor setup as the  external editor in iPhoto.
    Some Image Editors that support  layers:
    Photoshop Elements 11 for Mac - $79
    Rainbow Painter - $30
    Imagerie - $38
    Acorn - $50
    Pixelmator - $60 
    Seashore - Free
    Portraits and Prints - Free
    GIMP for Mac - Free
    OT

  • In "Previews" when adding text to a picture I can't change the font, even though a few days ago I could.  How do I fix this?

    In "Previews" when adding text to a picture I can't change the font, even though a few days ago I could.  How do I fix this?

    kgwrotethis wrote:
    10.6
    Use Software Update to update your os to 10.6.8 and anything else that needs to be updated.  After the installations go to /Library/Preferences - trash the com.apple.Preview.plist file.  Repair permissions, restart your computer and empty the trash.  Your Preview issue should now be resolved.

  • Added text & signatures do not print correctly

    I am using Acrobat Reader v10.4.4 on my iPad Mini with IOS 6.1.2 and am having issues printing. I can open any PDF and have it displayed correctly. I can add text and signatures and the document is saved correctly because it can be opened after the changes are made and they are still there. When I try to print the document where I have added text and signatures to, the document does not print correctly. All of the text and the signature are shrunk to a very small size and appear in the lower left hand of the page.
    I depend on my apps to work they way they should and having this issue makes my work very hard. I have to be very creative and perform unnecessary steps to get my PDF's to print the way they should. Does anyone have some insight in to this bug?

    Hi,
    Thanks for reporting this issue. We would like to investigate this issue at our end and if you could share one such pdf file in which you are facing the issue at [email protected], that would greatly help us.
    Thanks,
    Ankit

  • Adding text to photo

    I would like to add text to photos - that is have the text appear on the photo itself. Can I do this with iphoto?
    Thanks, M.

    Not easily with iPhoto only, but Martin S. has directions for doing so here:
    http://simnet.is/klipklap/iphoto/adding-text/
    Rather easier is to use an external editor for the job: starting with free and working up:
    Seashore
    Graphic Coverter
    Acorn
    Photoshop Elements
    You can set Photoshop (or any image editor) as an external editor in iPhoto. (Preferences -> General -> Edit Photo: Choose from the Drop Down Menu.) This way, when you double click a pic to edit in iPhoto it will open automatically in Photoshop or your Image Editor, and when you save it it's sent back to iPhoto automatically. This is the only way that edits made in another application will be displayed in iPhoto.
    Regards
    TD

Maybe you are looking for