How do I do to add and remove Shape3D objects dynamically from TransfGroup?

Hi, everyone,
How do I do to add and remove Shape3D objects dynamically from TransformGroup?
I have added two Shape3D objects in the TransformGroup and I wanted to remove one of it to add another. But, the following exception occurs when I try to use �removeChild� :
�Exception in thread "AWT-EventQueue-0" javax.media.j3d.RestrictedAccessException: Group: only a BranchGroup node may be removed at javax.media.j3d.Group.removeChild(Group.java:345)�.
Why can I add Shape3D objects and I can�t remove them? Do I need to add Shape3D object in the BranchGroup and work only with the BranchGroup? If I do, I think this isn�t a good solution for the scene graph, because for each Shape3D object I will always have to use an associated BranchGroup.
Below, following the code:
// The constructor �
Shape3D shapeA = new Shape3D(geometry, appearance);
shapeA.setCapability(Shape3D.ALLOW_GEOMETRY_READ);
shapeA.setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);
shapeA.setCapability(Shape3D.ALLOW_APPEARANCE_READ);
shapeA.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
Shape3D shapeB = new Shape3D(geometry, appearance);
shapeB.setCapability(Shape3D.ALLOW_GEOMETRY_READ);
shapeB.setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);
shapeB.setCapability(Shape3D.ALLOW_APPEARANCE_READ);
shapeB.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
BranchGroup bg = new BranchGroup();
bg.setCapability(ALLOW_CHILDREN_READ);
bg.setCapability(ALLOW_CHILDREN_WRITE);
bg.setCapability(ALLOW_CHILDREN_EXTEND);
TransformGroup tg = new TransformGroup();
tg.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
tg.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
tg.setCapability(TransformGroup.ALLOW_CHILDREN_READ);
tg.setCapability(TransformGroup.ALLOW_CHILDREN_WRITE);
bg.addChild(tg);
tg.addChild(shapeA);
tg.addChild(shapeB);
// The method that removes the shapeB and adds a new shapeC �
Shape3D shapeC = new Shape3D(geometry, appearance);
shapeC.setCapability(Shape3D.ALLOW_GEOMETRY_READ);
shapeC.setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);
shapeC.setCapability(Shape3D.ALLOW_APPEARANCE_READ);
shapeC.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
tg.removeChild(shapeB);
tg.addChild(shapeC);Thanks a lot.
aads

�Exception in thread "AWT-EventQueue-0"
javax.media.j3d.RestrictedAccessException: Group:
only a BranchGroup node may be removed I would think that this would give you your answer -
Put a branch group between the transform and the shape. Then it can be removed.
Another thing you could try: This doesn't actually remove the shape, but at least causes it to hide. If you set the capabilities, I think you can write the appearance of the shapes. So, when you want to remove one of them, write an invisible appearance to it.

Similar Messages

  • How am I able to add and remove people from a group message?

    How am I able to add and remove people from a group message?

    You'd need to start a new thread.

  • How do you add and remove links to websites in folders on Safari?

    How do you add and remove links to websites in folders on Safari?

    For clarification, works like a bookmark of website only it is listed in toolbar with "Most Visited", "Latest Headlines", "News", and "Popular".  I have done it before but can't find it for the life of me.
    Thanks!

  • How to remove Java Applications from "Add and Remove Programs" list?

    I have deployed my Java applications (both JWS and Applet) via JNLP with allow-offline option enabled and without installer-desc option specified.
    My questions are:
    1. An entry is added to the Add and Remove Programs list after launching the application via JNLP. Is it due to the specification of JNLP or JWS? Is there anyway to prevent this behavior?
    2. I removed my application by clearing the cache via Java Control Panel but the entry for the application is still listed in Add and Remove Programs. How can I remove the entry in the Add and Remove Programs?
    I have tried following methods but neither works:
    1.Go to Add and Remove Programs, and click [remove] button to the right of my application.
    *Warning message like 'Application cannot be uninstalled completely' is thrown.
    2.Follow instructions listed @ [Microsoft Online Support site|http://support.microsoft.com/kb/314481/en-us] to remove my application manually via Windows registry.
    *Couldn't find appropriate registry entry to delete.
    Thanks in advance!

    Hi, guys!
    This issue has been officially approved as a new bug (Bug Id: 6946221) for the JDK 1.6_20(might include any release below) release.
    It will take a couple of days for it to be shown up in the external Bug database. However, once it becomes available for viewing on external Bug database.I would like to encourage your valuable participation to vote on this bug to get it fixed ASAP by the SUN developer teams.
    Java Bug Database @
    [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6946221|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6946221]
    Voting for the bug @
    [http://bugs.sun.com/bugdatabase/addVote.do?bug_id=6946221|http://bugs.sun.com/bugdatabase/addVote.do?bug_id=6946221]
    Thank you for your cooperation!
    Edited by: Jay-K on Apr 23, 2010 12:14 AM

  • How do I add and remove mp3s from my iPhone?

    I've forgotten again how to add and remove mp3s from my iPhone.  Can someone please remind me?  I am an iTunes subscriber using a PC running Windows 7 and iTunes 11.1.

    dj003 wrote:
    Where are all these places, and how do I do it, step-by-step?  I really have zero understanding at all.  I know how to drag-and-drop mp3s onto my Sandisk mp3 player.  It's basically one-step.  I can't figure out how this is done in iTunes for an iPhone.
    Make sure you have iTunes 11.1.1 installed on your computer.
    Plug your iPhone into your computer.
    Open iTunes. Create a new Playlist and name it whatever you want. I use iPhone Sync.
    Go to your Music Library, click and drag the music you want into your new Playlist.
    Click on your iPhone along the top right. Click on Music and select Sync Music and choose just the new Playlist.
    Click on the Sync button on the bottom right of the iTunes screen.

  • How do I remove Bing from my toolbar at the top of the page. I have already tried both of the suggestions given in the help section; I could not find Bing in my control panel "add and remove programs," and there was one other suggestion which I also tried

    ''locking due the age of this thread - asked and answered''
    I have tried all of the suggestions given by FF in order to remove Bing from my computer but nothing seems to work. I would appreciate some advise. For instance when I go to add and remove programs I can't even find Bing listed. Looking forward to your suggestions. Thanks.
    == This happened ==
    Every time Firefox opened
    == I first installed Firefox

    Right click "Tools". Uncheck "Search Toolbars".

  • Add and remove modules in Apache

    Is it possible to add and remove modules within Apache (actually compile an relink Apache) with a source download form Apache.org (1.3.28?) and incorporate the necessery modules and configuration from Oracle?. I have looked for some kind of documentation for this, but ended up with nothing. Can anybody explain this?.

    If you really understand apache and how oracle implements the apache server then yes you could add/remove modules if you have the source code from oracle. I dont think that you can download apache1.3.28 from apache.org and expect to use that source to build an executable that can plug into oracle.

  • Javascript array ;Add and remove elements without using push and pop

    Hi
     I need to perform add and remove  operation in Javascript with following scenarios
    i) Add element, if element does not exist in array(javascript)
    ii) Remove element, if element exist in array(javascript)
    Without using push and pop method how to achieve this?
    Regards
    Siva

    Completed the Scenario.

  • Cannot uninstall I tunes. In control panel add and remove programs it will not give me the option to remove any of the I tunes. In program files it tells me access denied to remove any of the related items. I have tried using the removal methods from i tu

    My i tunes will not work at all. I have tried all the steps given to remove my I tunes player but in my control panel, add and remove programs it does not give me an option to remove any of the apple/ I tunes. I tried to go to program files and remove all the files but access is denied. This all started about 1 1/2 years ago and with every i tunes update i got more and more errors or problems until it stopped working. At one time i could remove and reinstall i tunes to try to fix it but now i cannot do anything. I believe one of the last  was i could not open i tune because it was being used or was on another network, not 100% sure its been so long and frustrating I quit trying 6 months ago. Hopefully someones got some help !!!
    Thanks I appreciate your time; Philip

    See Troubleshooting issues with iTunes for Windows updates.
    tt2

  • Need to Add and Remove Columns of ADF Read Only table from Backing bean

    I have a scenario where I am trying to Populate TransientVO which is shown has a ADF Read Only Table in page.
    I have couple of Check Boxes Based on their selection I am trying to render and hide certain Columns.
    But the Issue which I am facing is only the Column Header seems to change where as the Rows and Values doesnt..
    even If I apply the expression language rendering condition on the outputText inside those columns.. ..
    So I am thinking to add and remove VO Attribute columns to the table from backing bean.
    Need some sample code snippet or a better design to achieve this. Its kind of urgent too...having an aggressive deadline :(
    Please chip in People..
    Thanks in Advance .
    TK

    Table Code..
    <af:table value="#{bindings.InventoryGridTrans.collectionModel}"
                                    var="row"
                                    rows="#{bindings.InventoryGridTrans.rangeSize}"
                                    emptyText="#{bindings.InventoryGridTrans.viewable ? 'No data to display.' : 'Access Denied.'}"
                                    fetchSize="#{bindings.InventoryGridTrans.rangeSize}"
                                    rowBandingInterval="0" id="t4"
                                    partialTriggers="::sbcSales ::sbcUsage ::cb1">
                            <af:column sortProperty="Period" sortable="false"
                                       headerText="#{bindings.InventoryGridTrans.hints.Period.label}"
                                       id="c38">
                              <af:outputText value="#{row.Period}" id="ot33"/>
                            </af:column>
                            <af:column sortProperty="Past12SalesCount"
                                       sortable="false"
                                       headerText="#{bindings.InventoryGridTrans.hints.Past12SalesCount.label}"
                                       id="c29"
                                       rendered="#{backingBeanScope.IndexPageBackingBean.onUsage != true and backingBeanScope.IndexPageBackingBean.onSales == true}">
                              <af:outputText value="#{row.Past12SalesCount}"
                                             id="ot40"
                                             rendered="#{backingBeanScope.IndexPageBackingBean.onUsage != true and backingBeanScope.IndexPageBackingBean.onSales == true}"
                                             visible="#{backingBeanScope.IndexPageBackingBean.onUsage != true and backingBeanScope.IndexPageBackingBean.onSales == true}">
                                <af:convertNumber groupingUsed="false"
                                                  pattern="#{bindings.InventoryGridTrans.hints.Past12SalesCount.format}"/>
                              </af:outputText>
                            </af:column>
                            <af:column sortProperty="Past12UsageCount"
                                       sortable="false"
                                       headerText="#{bindings.InventoryGridTrans.hints.Past12UsageCount.label}"
                                       id="c40"
                                       rendered="#{backingBeanScope.IndexPageBackingBean.onUsage == true and backingBeanScope.IndexPageBackingBean.onSales != true}"
                                       visible="#{backingBeanScope.IndexPageBackingBean.onUsage == true and backingBeanScope.IndexPageBackingBean.onSales != true}">
                              <af:outputText value="#{row.Past12UsageCount}"
                                             id="ot47"
                                             rendered="#{backingBeanScope.IndexPageBackingBean.onUsage == true and backingBeanScope.IndexPageBackingBean.onSales != true}"
                                             visible="#{backingBeanScope.IndexPageBackingBean.onUsage == true and backingBeanScope.IndexPageBackingBean.onSales != true}">
                                <af:convertNumber groupingUsed="false"
                                                  pattern="#{bindings.InventoryGridTrans.hints.Past12UsageCount.format}"/>
                              </af:outputText>
                            </af:column>
                            </af:column>
                    </af:table>

  • Want to add and remove GL account in report through report painter

    Hi,
    Thanks in advance,
    1.I want to add new GL account in IS01 report i.e. Income Statement. I am trying to add through report painter but could not able to do it.
    2.Also i want to delete existing GL account from report through report painter.
    Any body pls suggest the steps to add and remove GL account through report painter because this report is under report painter.
    Thanks,
    KMR

    the account is probably in account group or set. Look for that one in report painter and then go to the set or account group and remove/add the account.

  • Add and Remove rows

    Hi,
    I have 2 tables, and I needed to add/remove some rows from the first table to the second.
    I've followed the tutorial: Link: [Add and Remove from a List|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/927d8c3c-0a01-0010-57b4-e89f505e2bff] and it works great!
    But the user can add two or more times the same row, so I need to avoid that. The user should be able to add every row only once!!
    I thought about some condition on button Add (for example, disable the ADD button if the same row is present in both tables, but it didnt work).
    Any ideas to achieve that?
    Thanks in advance!
    Best Regards
    Marcelo.

    Hi again Ahmed
    I've solved my problem, but now I'm facing a new issue about the same topic. 
    Following your tips, I've found a solution, but now, I need to copy a complete field of a table to the data store.
    For example, my table has 4 field (country, key, name and city), and I need to copy ALL the key values to the data store. So, if I have 4 rows in the table, let's say "key1", "key2", "key3", "key4"
    I've reached a solution, but it involves to walk throught the entire table, selecting every row automatically (I use a spinner) and "copying" every key field of every row to the data store. When I say "copying" I mean adding it to the same virtual field of the data store, that is to say, concatenating the key values one after another.
    The problem arises when the table has more than 100 records, because 100 is the top value that a spinner can reach.
    Any ideas about can bypass that limit?
    Thanks in advance, your help is really appreciated.
    Best regards
    Marcelo

  • Is there any API to add and remove certs from acrobat trusted identities?

    Is there any API to add and remove certs from acrobat trusted identities? if this is not possible any work around for this. Please help me

    No, there is not – that would be a security concern.

  • Add and Remove Publishers from Replication Monitor using T SQL

    Is there any possibility to add an Publishers from Replication Monitor using T SQL.i am trying to configure the replication using T SQL..i can create all other steps but didn't find any way to add publisher to the replication monitor..kindly suggest..

    Hi Snehasis,
    Tom is correct, there is no T-SQL command to add a publisher to Replication Monitor.  However, the server from which you launch Replication Monitor will automatically be added to Replication Monitor if it is a Publisher.  Also, you can add additional
    Publishers using the Add Publisher dialog.
    This is covered in
    Add and Remove Publishers from Replication Monitor
    Brandon Williams (blog |
    linkedin)

  • Uninstall firefox after trying add and remove akso Mozilla,s instructions

    I am using Mozilla Firefox version !8.0(x86 en gb on windows Xp) I wish to un-install Mozilla Firefox. I tried the usual "Add and Remove" from Control Panel, this did not work which in its self is odd. I then tried the Mozilla site and followed those instructions which failed also.It makes me feel uncomfortable that removing a program is made so difficult
    Please advise
    Mike R

    Seeing a couple of errors in the system log is not that unusual, but the number you are seeing is indicating a real problem.
    Did you double-click any of the errors in System Events? It would open a pop-up and give more detailed information on the error and usually has a link to the Microsoft help website concerning that specific error. It is likely the "msi" error is significant, as that is a Microsoft installer file (often used for uninstall also). It seems that either Control Panel is messing up or the msi process is crashing for some reason. The information in that error may contain the answer. If there are error numbers, you could do a search for that error number.
    When you say you "re-formatted" your computer, what exactly do you mean? Did you re-install Windows?
    SparkTrust PC Cleaner could possibly be the culprit. Security software, by design, watches for processes that try to make changes to your computer. Along with cleaning, it also claims to "optimize" the registry, which can lead to big trouble if a critical key is removed by accident. I use Registry Mechanic, but with any cleaner, I never allow it to make changes until I have a chance to examine each proposed change. The first "automatic" registry cleaner I used 15 years ago did severe damage to my machine. Windows became unbootable because of registry damage. I ended up having to re-install Windows from scratch.
    PC Cleaner should not have disabled System Restore. If you haven't made any large installs or changes, System Restore simply may not have created a restore point. But there should have been at least the original when you installed Windows. To verify the settings, right click on "My Computer" and choose "Properties". There should be a System Restore tab where you can verify the allowed size and whether or not it is active.
    It is generally a good idea to manually tell System Restore to create a restore point on occasion, on a day when everything is working as it should.
    Is there a way to temporarily disable SparkTrust? It might be possible it sees the uninstall action as some kind of malware and won't allow it to run. That is simply a guess, but it is generally good policy to disable active security software during an installation (of trusted software), as the security software may interfere with the processes.
    I really don't believe Firefox is the culprit here. I think there is a problem with Windows. I have been using Firefox for well over a decade and have never had an uninstall problem.
    If you can copy and paste error details for the event log, I may be able to learn more.

Maybe you are looking for

  • Help!  Brand new MBP and Mid '04 23" Cinema Display cable issue!

    Just got a new MBP, and I can't figure out which adapter I need to use my trusty 23" display. The mini display port to dual-link DVI adapter doesn't look right, and I already know the mini display port to DVI adapter doesn't work. Will the dual-link

  • Need BAPI for Parking G/L Account

    Hi All, I need BAPI for Parking G/L account document. Please let me know. Regards R.Ragu Useful Answers will be rewarded.

  • Please insert Business Place and Section Code to proceed

    Hi I am getting following customised error "Please insert Business Place and Section Code to proceed" which is mainatined as validation while clearing the vendor through f-44 but when i see the document which has to be clear in which both business pl

  • Missing lines when exporting to local file

    I've recently created a query in SQ01 which pulls out sales order information and uses a data reading program to display the texts. The query works absolutely fine and shows all the data required in SAP. The problem comes however when I export it to

  • Assign authorization object to standard transaction (VA02)

    I've success to create an authorization object and assigned to va02. I also use su24 to check indicator for my customize object. There are reported that it is Check. I think it is activated. Then i access va02, but it still can access, I suppose i no