How to change a Shape3D node's picked in the branchGroup loade by OBJ file

Hi,all
I need your help!
I loaded a OBJ file to add the its branchgroup to the scenegraph,then,I registered the mouse listener for the canvas3D, each time the canvas3D received a mouse click, i will use the pickInfo to get the picked node,then ,change its properties,such as appearance,transform3D,etc.
But now occurs the problems:I can pick the node,but it's just a Shape3D node,how can I change its Transform3D?
I try to change its appreance by:
Node node = closestRs.getNode();//the picked node
Shape3D nodeShape = (Shape3D)node;
nodeShape.setCapability(Shape3D.ALLOW_APPEARANCE_OVERRIDE_WRITE);
nodeShape.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
nodeShape.setCapability(Shape3D.ALLOW_PARENT_READ);
Appearance app = new Appearance();
ColoringAttributes ca = new ColoringAttributes();
ca.setColor(new Color3f(0.8f,0.3f,0.2f));
app.setColoringAttributes(ca);
nodeShape.setAppearance(app);
then,causes the following errors:
Exception in thread "AWT-EventQueue-1" javax.media.j3d.RestrictedAccessException: Cannot modify capability bits on a live or compiled object
at javax.media.j3d.SceneGraphObject.setCapability(SceneGraphObject.java:169)
at edu.whu.j3d.test.CanvasMouseListener.mouseClicked(CanvasMouseListener.java:46)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
at java.awt.Component.processMouseEvent(Component.java:6044)
at java.awt.Component.processEvent(Component.java:5806)
at java.awt.Component.dispatchEventImpl(Component.java:4413)
at java.awt.Component.dispatchEvent(Component.java:4243)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
how can I do this?
can you tell me how to complete my mission?Hope your help!

Hi,all
I need your help!
I loaded a OBJ file to add the its branchgroup to the scenegraph,then,I registered the mouse listener for the canvas3D, each time the canvas3D received a mouse click, i will use the pickInfo to get the picked node,then ,change its properties,such as appearance,transform3D,etc.
But now occurs the problems:I can pick the node,but it's just a Shape3D node,how can I change its Transform3D?
I try to change its appreance by:
Node node = closestRs.getNode();//the picked node
Shape3D nodeShape = (Shape3D)node;
nodeShape.setCapability(Shape3D.ALLOW_APPEARANCE_OVERRIDE_WRITE);
nodeShape.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
nodeShape.setCapability(Shape3D.ALLOW_PARENT_READ);
Appearance app = new Appearance();
ColoringAttributes ca = new ColoringAttributes();
ca.setColor(new Color3f(0.8f,0.3f,0.2f));
app.setColoringAttributes(ca);
nodeShape.setAppearance(app);
then,causes the following errors:
Exception in thread "AWT-EventQueue-1" javax.media.j3d.RestrictedAccessException: Cannot modify capability bits on a live or compiled object
at javax.media.j3d.SceneGraphObject.setCapability(SceneGraphObject.java:169)
at edu.whu.j3d.test.CanvasMouseListener.mouseClicked(CanvasMouseListener.java:46)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
at java.awt.Component.processMouseEvent(Component.java:6044)
at java.awt.Component.processEvent(Component.java:5806)
at java.awt.Component.dispatchEventImpl(Component.java:4413)
at java.awt.Component.dispatchEvent(Component.java:4243)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
how can I do this?
can you tell me how to complete my mission?Hope your help!

Similar Messages

  • How to change specified hierachy node to master data attribute automatic?

    Dear BW experts:
             How to change specified hierachy node to master data attribute automatically? I have a retail business: I have a fixed material group hierachy in R3 Retail ,Now I will extract the material group hierachy ,my goal is that the specified material group hierachy node as dimension in query ,not show hierachy level,So I need change specified material group hierachy node to material group's attribute.
    Anybody solve the requests?
            Thank you for your help in advance !

    If I understand your requirement correctly, you need to have a specific Material Group Hierarchy level (Say Level 2) to be an attribute of Material Group. Usually, this level represents a Brand or Segment, or something with specific meaning.
    If this is correct, here are the things you need to do:
    1) Create an InfoOnject for this specific attribute representing the specified hierarchy level
    2) Add this InfoObject to Material Group as an navigational attribute
    3) Select this navigational attribute in your InfoProvider
    4) Create a transformation routine for this navigational attribute in Material Group Transformation so that the specified hierarchy level for Material Group will be found and populated. The detail of this routine will depend on your specific requirement. Also, you have to make sure Material Group Hierarchy is updated before Material Group attributes are loaded. If you are not family with ABAP, please ask an ABAPer to help you for the Transformation Routine.
    5) Include this navigational attribute in your query along with other required InfoObjects.
    Hope this help and good luck!
    Bill

  • How to change font size, maximum column size in the result screen ?

    hi All
    That's great when using SQL Dev.
    But I also have a trouble that how to change font size, maximum column size in the result screen ?
    My users think that font in result screen is shown very small, and whenever the data in each colum is long then it's not shown full data in column, they must double click for extend the size. Have the option to default the max size for showing full data in each column ? I try but still not to do that .
    Appreciate for anyone to help us.
    Thanks all.
    Sigmasvn

    You can't change the font for the results screen yet, however you will be able to select an auto-fit option for selected columns, so if some columns have slitghtly wider text you'll be able to set the column widths to handle these wider columns.
    Also, there s the option of switching the layout of a record in the grid.
    Sue

  • I have a macbook pro in which i use for church recordings. it has a built in mic so like one hole for headphones and mic. how do i get it to only pick up the sound from the external mic that is coming into the mixer to the laptop. it seems to pick up ever

    I have a macbook pro in which i use for church recordings. it has a built in mic so like one hole for headphones and mic. how do i get it to only pick up the sound from the external mic that is coming into the mixer to the laptop. it seems to pick up everything, like for example any little movement i make or even just asking the next person a question will get picked up by the internal mic. is there a way i can mute the internal mic so it can only pick the external mic and not every movement im making like chewing etc

    I have a macbook pro in which i use for church recordings. it has a built in mic so like one hole for headphones and mic. how do i get it to only pick up the sound from the external mic that is coming into the mixer to the laptop. it seems to pick up everything, like for example any little movement i make or even just asking the next person a question will get picked up by the internal mic. is there a way i can mute the internal mic so it can only pick the external mic and not every movement im making like chewing etc

  • How to change colors of individual column bar in the same data series

    in mac numbers, how to change colors of individual column bar in the same data series. The entire column series gets selected in the column bars and cannot select to change colors of specifc bars.

    Hi Kiran,
    no its not possible through Theme editor also ,because these colors are coming from Compiler which u are using.
    Regards,
    Govindu

  • How do I get premiere elements 13 to read the video of my .mov files?

    I am working on a PC.  How do I get premiere elements 13 to read the video of my .mov files? I hear the audio but don't see any video.Thank you.

    phyllism
    Thanks for the reply. Glad that QuickTime install resolved the Premiere Elements 13/13.1 video playback problem.
    When you double click any of the thumbnails for your .mov file in the Elements Organizer 13/13.1, does the Elements Organizer 13/13.1's player open to play back the .mov file contents for both video and audio?
    You wrote
    in the browser, the preview is an audio file, not a QT preview.
    I was not sure if you were just going by what appears in the thumbnail, namely film strip with music note, or whether you had gone through the actual playback there. In the Apple Pro Res footage that I have, I get the same thumbnails that you are seeing for Windows Explorer. In Elements Organizer 13/13.1, the thumbnail for my Apple Pro Res file is just a film strip on gray.
    I think what you are seeing is "normal" for the situation. But, please verify your observation with 13 updated to 13.1 if you have not done that already.
    Thanks.
    ATR

  • How to change  delivery  block for all item in the schedule lines via va32

    dear sap expert:
    i onle can  change delivery block for one  sales order item in the schedule line  every times via va32,it will take so many time because there are hundreds of item  in a sceduling agrrement. how to change all the item  one times.
    please give me a way to resovle the problem.
    best regards.

    dear:
      the fast change function cann't resovle the problem,i first double click the item of schedule agreement  ,then select the schedule lines option, finally in the delivery block input the reason of bolck.
    best regards.

  • How to change material type and industrial sector of the exsisting material

    Hi,
    There is an issue where user wants to change material type and industrial sector of the exsisting material .Is  it posible to do so??
    IF not ,how can we delete that material from material master so that another material with same number and required material type and industrial sector  can be created.
    Points will be definitely rewarded.
    Thanks
    Rohit

    Hi Rohit,
    You can change the material type in MMAM trxn code if the material dosenot conatain any open purchase requisitions, open reservations & open purchase orders. Also material stock should be zero.
    Remember the new material type should have same attributes same as old material type.
    OLD Material New Material
    1) Standard Price 1) Standard Price
    2) Manufacture part 2) Manufacture part
    profile actvated profile actvated
    3) Quantity & Value 3) Quantity & Value
    Updation in all areas Updation in all areas
    4) should have same GL 4) Should have same GL acs
    acs
    It is not possible to change Industry sector once created.
    If you want to delete the Material, you can flag it in MM06 trxn code.
    Reg,
    Ashok
    Dont forget to Assign points if useful.

  • How to change clip speed w/o moving all the other clips in a sequence?

    when I have many clips in a sequence and try to change the speed of a clip (which changes the length) FCE automatically shifts all the following clips. is there a way to turn this feature off?

    Not in FCE. FCP 7 has that feature.
    Think about it; when you speed up a clip, the duration is shorter, therefore the clip is shorter. When you slow down a clip, the duration lengthens, therefore the clip is longer. How would FCE know that you don't want the clip to remain the same duration?
    You'll need to trim the clip accordingly based on the amount of speed adjustment you want.
    -DH

  • HT1918 How to change my sercurity question if I forgot the answers to them?

    How to change security questions if I forgot the answers to them?

    If you have a rescue email address set up on your account then you can try going to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you might see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address set up then go to Express Lane  and select 'iTunes' from the list of 'products' in the middle of the screen.
    Then select 'iTunes Store', and on the next screen select 'Account Management'
    Next choose 'iTunes Store Account Questions' and fill in that you'd like your security questions/answers reset.
    You should get an email reply within about 24 hours (and check your Spam folder as well as your Inbox)

  • How to change Labels of Fields being shown in the search help as F0001 etc.

    Dear All,
    For one of my fields of screen I have been calling a search help configured using F4IF_INT_TABLE_VALUE_REQUEST.
    In this function I am returning the field in dynfields. Let me know please how to change the Labels of Field Names being shown in the search help as F0001, F0002 etc....
    Regards,
    Alok.

    Hi Alok,
    You can change the Field Label by going to the Data Element and changing the Field Label .
    Hope this helps
    Regards
    Sunil

  • TS1702 How can change my security question if I forgot the old one

    How can I change my security question if I forgot the old one since I did it long time ago

    Didn't the link to contact the iTunes Store staff in the 'Additional Information' section of that article work for you? If you don't already have a valid rescue email address, only Apple itself can reset the questions.
    (90010)

  • How to change my Macbook Pro's mane on the network ?

    Hi all,
    I trust your all well !
    Could you please help me ? I want to change my Macbook Pro's mane on the network, I mean when I check all the computers using the network, I always find mine named with its IP or "MACBOOKPRO-1FQC" and I would like to change to "Ben's MacBook Pro" or something similar. I tryed to figure out to do it but I din't find out.
    Thaking you in advance,
    Ben

    Go to System Preferences>Sharing and Edit the name of your computer:
    That simple.
    Clinton

  • Help! The new version of Firefox only prints in landscape mode and I cannot figure out how to change this default option. I need the default to be portrait.

    Where in the world are the printer options??

    '''{ Ctrl + P }''' to open the "native print dialog" box, then hit Properties and change it the printer Properties display box.
    Once that is changed Firefox should hold that setting until the next time you print something thru Firefox, unless you would be using a different printer.

  • How to get structure of IDOC into xi in the scenario is IDOC - XI - File

    hi XI Guys,
          When i want to Integrate SAP sys(IDOC) with File how to get structure of IDOC into XI, As we will define Data types in File -> XI -> File. Please send Step by Step process as i am new to Netweaver(XI)
    ThankYou,
    B.Pushparaju.

    When i want to Integrate SAP sys(IDOC) with File how to get structure of IDOC into XI
    >>>>
    import the IDoc under the imported object in your SCV. Note that import should be allowed for the SCV.
    As we will define Data types in File -> XI -> File.
    >>>>
    Ref. these blogs to help you out ..
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

Maybe you are looking for