Removing a single object when multiple objects share the same name?

The below code uses a for loop to make spheres as in this thread:
http://forum.java.sun.com/thread.jspa?forumID=21&threadID=320945
However, the name is always sphere. I have another part of the code that,
using collision detection, removes a sphere using the tg.removeChild(); command when another sphere (created elsewhere) is
within a set proximity. But how do I specify which sphere it should remove when they are all called 'sphere'? Can I use a
object ID to get around this and if so, how?
    public void makeSpheres()
       Color3f lightColour = new Color3f(0.0f, 0.0f, 1.0f);    //Blue light
       Vector3f lightDirection = new Vector3f(4.0f, -7.0f, -12.0f);
       for (int i=0; i==5; i++)
           Sphere sphere = new Sphere(0.25f);
           BoundingSphere bounds = new BoundingSphere(new Point3d( getXCoords(), getYCoords(), getZCoords()), 100.0);
           DirectionalLight light = new DirectionalLight(lightColour, lightDirection);     //Each sphere has a blue light
           light.setInfluencingBounds(bounds);
           TransformGroup tg=new TransformGroup();  //Create new TG
           Transform3D transform=new Transform3D();
           Vector3f vector = new Vector3f(setXCoords(),setYCoords(),setZCoords());  //Set Position
           transform.setTranslation(vector);
           tg.setTransform(transform);            //Add sphere to scenegraph
           tg.addChild(sphere);
           Play2.objRoot.addChild(tg);
       }

Basically, you get a reference to the object you click on through one of the Pick tools from the Pickfast api. Then you iterate over the scenegraph until you find the object your picktool returned. Then you remove it. Check out the examples at
https://java3d.dev.java.net/binary-builds.html
If there are a known finite number of spheres you can keep references to them in a list or a Switch.
regards

Similar Messages

  • Connect to one wireless network when multiple networks with the same name

    Hi all,
    I'm at a location where there are two networks with the name (e.g.) "wireless". One uses WEP and one uses WPA. The WEP network is weaker than the WPA network, so my Mac tries to connect to the WPA network, even though I have manually setup the wireless network with WEP security (after trying to connect it asks for a WPA password). Is there a way that I can connect to a wireless network by MAC Address, or some way for me to tell the Macbook to ignore the WPA network? The problem is that the SSID is the same, it seems.
    Thanks,
    Nate

    The person (the landlord) isn't tech-savvy at all.
    That is clearly obvious as
    1. They would not be using WEP
    2. They would setup a different SSID
    WEP is not secure and can be cracked in minutes using tools readily available on the internet. If a hacker gain access to that network they could run other tools and hijack the dns and then you could be visiting sites on your mac that are completely bogus but look real.
    Also it is common trick that hackers use is to setup an access point nearby with the sane SSID to capture details from users that join their network thinking they have joined their own network. Again the hacker can hijack the dns and monitor all your browsing and capture details.
    The fact that someone has setup an SSID nearby with the same name would make me very suspicious.
    I would treat your landlord's network as an untrusted network same as when your using a public wifi like coffebucks.

  • [svn] 949: Bug: BLZ-96 - When sending a HttpService request from ActionScript with multiple headers with the same name , it causes a ClassCastException in the server

    Revision: 949
    Author: [email protected]
    Date: 2008-03-27 07:12:59 -0700 (Thu, 27 Mar 2008)
    Log Message:
    Bug: BLZ-96 - When sending a HttpService request from ActionScript with multiple headers with the same name, it causes a ClassCastException in the server
    QA: Yes - try again with legacy-collection true and false.
    Doc: No
    Checkintests: Pass
    Details: Another try in fixing this bug. When legacy-collection is false, Actionscript Array on the client becomes Java Array on the server and my fix yesterday assumed this case. However, when legacy-collection is true, Actionscript Array becomes Java ArrayList on the server. So added code to handle this case.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-96
    Modified Paths:
    blazeds/branches/3.0.x/modules/proxy/src/java/flex/messaging/services/http/proxy/RequestF ilter.java

    Hi all!
    Just to post the solution to this if anyone ever runs accross this thread...
    For some reason i had it bad the first time, don't have time right now to see why but here is what worked for me:
    HashMap primaryFile = new HashMap();
    primaryFile.put("fileContent", bFile);
    primaryFile.put("fileName", uploadedFile.getFilename());
    operationBinding.getParamsMap().put("primaryFile", primaryFile);
    HashMap customDocMetadata = new HashMap();
    HashMap [] properties = new HashMap[1];
    HashMap customMetadataPropertyRoom = new HashMap();
    customMetadataPropertyRoom.put("name", "xRoom");
    customMetadataPropertyRoom.put("value", "SOME ROOM");
    properties[0] = customMetadataPropertyRoom;
    customDocMetadata.put("property", properties);
    operationBinding.getParamsMap().put("CustomDocMetaData", customDocMetadata);
    Basically an unbounded wsdl type is an array of objects (HashMaps), makes sense, i thought i had it like this before, must have messed up somewhere...
    Good luck all!

  • [svn] 931: Bug: BLZ-96 - When sending a HttpService request from ActionScript with multiple headers with the same name , it causes a ClassCastException in the server

    Revision: 931
    Author: [email protected]
    Date: 2008-03-26 11:31:01 -0700 (Wed, 26 Mar 2008)
    Log Message:
    Bug: BLZ-96 - When sending a HttpService request from ActionScript with multiple headers with the same name, it causes a ClassCastException in the server
    QA: Yes - we need automated tests for this basic case.
    Doc: No
    Checkintests: Pass
    Details: RequestFilter was not handling multiple headers with the same name properly.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-96
    Modified Paths:
    blazeds/branches/3.0.x/modules/proxy/src/java/flex/messaging/services/http/proxy/RequestF ilter.java

    Hi all!
    Just to post the solution to this if anyone ever runs accross this thread...
    For some reason i had it bad the first time, don't have time right now to see why but here is what worked for me:
    HashMap primaryFile = new HashMap();
    primaryFile.put("fileContent", bFile);
    primaryFile.put("fileName", uploadedFile.getFilename());
    operationBinding.getParamsMap().put("primaryFile", primaryFile);
    HashMap customDocMetadata = new HashMap();
    HashMap [] properties = new HashMap[1];
    HashMap customMetadataPropertyRoom = new HashMap();
    customMetadataPropertyRoom.put("name", "xRoom");
    customMetadataPropertyRoom.put("value", "SOME ROOM");
    properties[0] = customMetadataPropertyRoom;
    customDocMetadata.put("property", properties);
    operationBinding.getParamsMap().put("CustomDocMetaData", customDocMetadata);
    Basically an unbounded wsdl type is an array of objects (HashMaps), makes sense, i thought i had it like this before, must have messed up somewhere...
    Good luck all!

  • Should multiple developers share the same MDS repository?

    We are starting a new customizable application using ADF, WebCenter and SOA Suite 11g wondering what is the best practice for MDS repositories. By default JDeveloper seems to use a file-based repository, however we need to take advantage of a database repository. The question is: Can & should multiple developers share the same MDS repository, or do we need to use the RCU tool to create a new repository for each developer? If developers share the same repository I"m wondering what happens to seed customizations if two developers both edit the same thing (like a SOA composite).
    Thanks for your input

    Thanks again ... I'm not so worried about packing the customizations in the EAR or MAR, I just hate developers having to manually change adf-config.xml from source control all the time.
    I've tried using {oracle.home} and it does not work. This seems to be a bug in JDeveloper, because I print the env variable and verify that it is correct but the deployment still fails.
    In adf-config.xml I have:
    <property value="*${oracle.home}\integration*"
    name="metadata-path"/>
    When WLS starts up, I print the env variable and see it is set to: D:\home\fmw\JDEVEL~1
    But then when I try to deploy my application I get this:
    INFO: MDSException encountered in parseADFConfigurationMDS-00503: The metadata path "D:\home\fmw\jdeveloper\system11.1.1.1.33.54.07\o.j2ee\drs\PriceManagementPOC\adf\META-INF\D:\home\fmw\JDEVEL~1\integration" does not contain any valid directories.
    For some reason it seems to be appending the directory of adf-config to the oracle home directory. It's as if the code assumes its a relative path. Looks like a bug to me.
    Billy
    Edited by: Billy Turchin on Aug 28, 2009 9:33 AM

  • XOQ-01950: Cube contains multiple BuildSpecifications with the same name.

    Hi All ,
    While executing the Maintain Cube option it is throwing below issue : Any Clue ?
    XOQ-01950: The AWCubeOrganization for cube "NN_OLAP_POC.MARKET_SALES_CUBE" contains multiple BuildSpecifications with the same name.
    Thanks,
    DxP

    This error should only show up when you create a cube (by importing XML), not when you maintain it. So I will assume that this is what you mean.
    If you import XML that refers to an OLAP object that already exists, then the new definition overrides the old one. The only exception to this rule is the BuildSpecification object. This kind of object is named, but it does not follow these conventions (for messy implementation reasons). If you import XML that has a BuildSpecificaiton with the same name as one that already exists, then you will trigger the error you see. Here is an example of the relevant XML.
    <BuildSpecifications>
    <![CDATA[BUILD SPEC LOAD_AND_AGGREGATE
      LOAD NO SYNCH,
      SOLVE
    ) ]]>
    </BuildSpecifications>The workaround is to delete this section from the XML before importing it.

  • Label Printing Using Address Book - How can I Print multiple labels of the same name?

    Label Printing Using Address Book - How can I Print multiple labels of the same name?

    I used to be able to print multiple copies of the same picture on one page using iphoto. There was a customise button when you went through to print and it was there somewhere. I can't see it anymore - maybe since an upgrade.
    It's gone. But as a work-around, duplicate your photo (⌘D) to create as many versions as you want copies and select all at once. Then use the "Custom" print layout and set the photo size you want.
    After printing, trash the added versions.

  • Is it possible to search for multiple folders with the same name and...

    Is it possible to search for multiple folders with the same name and then select them all and change the permissions on just those folders .i.e. Search for the budget folders in all client folders and lock them down to just the project managers. Without having to go to each folder and apply the permissions.

    user11919409 wrote:
    Is it possible to create a Clone database with the same name of source db using RMAN ...
    yes
    >
    DB version is 11.2.0.2
    Is it possible to clone a 11.2.0.2 database to 11.2.0.3 home location directly on a new server . If it starts in a upgrade mode , it is ok ....yes
    Handle:     user11919409
    Status Level:     Newbie (10)
    Registered:     Dec 7, 2009
    Total Posts:     102
    Total Questions:     28 (22 unresolved)
    why do you waste time here when you rarely get any answers to your questions?

  • Can iTunes sync multiple songs with the same name?

    My iTunes library has multiple songs with the same name (but they point to different files on the filesystem).
    Curiously when iTunes syncs to my iPhone it will only ever sync two of the files, even if more exists. I suspect what is happening is described below, but I have no way of verifying it:
    Let's assume I have 5 songs named IdenticalName, on the filesystem these are named IdenticalName.mp3, IdenticalName 1.mp3, IdenticalName 2.mp3, and so on.
    I suspect iTunes is syncing the filename without a number postfix, and the file with the "1" postfix and not continuing with the rest of the files.
    Has anyone seen similar behaviour? Did you find a workaround (other than renaming your tracks)?

    can you manually discover the new instances on the new server?
    Then just make sure the name that appears in Grid Control is different.
    e.g. prod.world is on server A and B. When you discover in Grid control, you can make it prod_B and you will see the latter without any problem.

  • Writing to multiple tags with the same name

    Hi,
    I am writing to multiple tags with the same name but in different groups. I have noticed only the tag from the first group gets updated. How can I write to a tag in a specific group in this scenario?
    Regards,
    Chanti.

    Heres what I found.
    When I tried "http://<server>:<port>/XMII/Illuminator?Server=<Name of the TAG dataServer>&Mode=CurrentWrite&TagName=<Group>.<TagName>", the outcome was "Message
    Could not add "<Group>.<TagName>" to the response list.
    Message
    No tags selected."
    When I tried "http://<server>:<port>/XMII/Illuminator?Server=<Name of the TAG dataServer>&Mode=CurrentWrite&TagName=<TagName>", it seemed like it worked fine.
    Any thoughts?

  • SignalR - Two Hubs must not share the same name

    I created asp.net mvc 5 application (call it "WebServices"), then i add my Hubs in a folder called "Hubs". Now
    what happened is that SignalR (2.0.2) generate JavaScript proxies for hubs in environment: 1-in local machine. 2-when i publish to azure web role. Now when i publish to azure website (.NET is 4.5 and websocket is opened),it didn't generate proxies. Now i tried
    to add hubs to App_Code folder ,and it generate proxies ,but the build action of the hub classes are "Content",when i change it to Compile it raised this exception :
    Two Hubs must not share the same name. 'Webservices.App_Code.MyHub1, App_Code.c9aucf2j, Version=0.0.0.0,
    Culture=neutral, PublicKeyToken=null' and 'Webservices.App_Code.MyHub1, Webservices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' both share the name 'MyHub1'.
    I love Silverlight ^^

    Hello,
    It seems this issue is more reagrding ASP.NET MVC, I suggest you posting to:
    http://forums.asp.net/1146.aspx
    There are MVC experts who will help you better.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • [svn] 889: Add test case for BLZ-82 where HttpService should return multiple headers with the same name .

    Revision: 889
    Author: [email protected]
    Date: 2008-03-21 13:08:05 -0700 (Fri, 21 Mar 2008)
    Log Message:
    Add test case for BLZ-82 where HttpService should return multiple headers with the same name.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-82
    Added Paths:
    blazeds/trunk/qa/apps/qa-regress/remote/MultipleHeadersTest.jsp
    blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/proxyService/httpservice/MultiHe aderTest.mxml

    Hi again,
    this may be old news to some people, but I just realized we can have the desired benefits I originally listed (encapsulation, reuse, maintainability, security) TODAY by using pipelined functions and using the table() function in Apex report region queries.
    So the report query basically becomes, for example (if get_employees is a pipelined function)
    select * from table(my_package.get_employees(:p1_deptno))
    The only downside compared to a (weakly typed) sys_refcursor is that you have to define the type you are returning in your package spec (or as an SQL type). So it's a bit more coding, but it's still worth it for the other benefits it provides.
    I like Apex even better now! :-)
    - Morten

  • Component and renderer can't share the same name in face-config.xml

    Hi All,
    I've noticed that a component and a renderer can't share the same name in <face-config.xml>.
    For instance,
    <component>
    <component-type>tree</component-type>
    <component-class>com.xxx.tree.component.Tree</component-class>
    </component>
    <render-kit>
    <renderer>
    <renderer-type>tree</renderer-type>
    <renderer-class>com.xxx.tree.renderer.Tree</renderer-class>
    </renderer>
    </render-kit>     
    generates a cryptic error message.
    It's not a big deal but would be nice to support it.
    The workaround of course is to use a different name for the component and renderer (tree and treeRenderer for instance)
    Stephane

    i dont know why it doesn't work for you. It works for me alright. Can u elaborate on what error messages you are getting? It maybe some other problem.

  • Having multiple CAs share the same private key

    We are developing a system which implements an HA cluster across two separate geographical locations.
    Each site will have several Windows Server 2012 machines and at least one DC, and we basically have to do a master-master replication between the two sites.
    The entire system will be under a single domain.
    We will be deploying AD CS since some of our sub-systems need certificates,
    but we want to limit the variety certificate to just one (i.e. we want all CAs to issue identical certificates).
    To do that, we have to setup AD CS so that all the DCs (both intra-site and inter-site) share the same private key.
    Is it possible to have all DCs in a domain to share a single private key?
    This article on TechNet suggests that we can do it within a cluster,
    https://technet.microsoft.com/en-us/library/cc742450%28v=ws.10%29.aspx
    but we are not sure if we can do it across different sites.
    Any advice and comments are highly appreciated.
    Wanko

    Hi Wanko,
    Its not much clear what you mean by "DCs to have single private key".
    However as per the article it indicates that you can use the same (SAN) certificate on both servers (nodes) of the cluster, the certificate SN will be the common clustername.
    This is common when you are using clustering or load-balanced system which requires you to have a common name, but individual nodes.
    Basically if you want to use single private key for the HA nodes, use the same certificate across all the nodes, that would be generated on the first node(generally). You don't need to issue identical certificates(this will not work as per my understanding)
    CA First Node: Export the Cert
    On the Welcome page of the CA Backup Wizard, click Next. Select
    Private key and CA certificate, and provide a directory name where you want to temporarily store the CA certificate and optionally the key. Click
    Next.
    Provide a password to protect the CA key, click Next, and then click
    Finish.
    CA Second Node: Import the Cert
    Open the Certificates snap-in for the computer account.
    In the console tree, double-click Certificates (Local Computer), and click
    Personal.
    On the Action menu, click All Tasks, and then click
    Import to open the Certificate Import Wizard. Click Next.
    Enter the file name of the CA certificate that was previously created on the first node, and click
    Next. If you click Browse to find the certificate, change the file type to
    Personal Information Exchange (*.pfx,*.p12).
    Type the password that you have previously used to protect the private key. The password is required even if there is no private key in the .pfx file. Do not mark this key as exportable. Click
    Next.
    Place the certificate in the Personal certificate store, and click
    Next. To complete the certificate import process, click
    Finish, and then click OK.
    Secondly I don't get what do you mean by: "we basically have to do a master-master replication between the two sites."
    Please note a Cluster can only run a single instance of Certificate Services. A failover cluster of any size can be used to provide a high availability environment for certificate services. However, Microsoft does not support more than one instance
    of certificate services on a cluster.
    References:
    Overview of CA Clustering-2003
    Active Directory Certificate Services (AD CS) Clustering - Requirements-2012
    Regards,
    Satyajit
    Please“Vote As Helpful”
    if you find my contribution useful or “MarkAs Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.

  • How do multiple developers share the same application module

    Is there a suggested method for multiple developers to share the same application module? We have 2 developers that will have EOs in the same directory and would like to know how they can share an application module but do development on different pieces of a project.
    Thanks,
    Paula

    Try using CVS or any other source control system. Still there are some points to think about before doing big projects, because there are many files which are updated by JDEV without knowledge by the developer. This causes many conflicts using a version control system like CVS.
    If you developers both are working on the server part of the application, I suggest using multiple application modules. See this blogs:
    http://radio.weblogs.com/0118231/stories/2005/05/27/howGranularShouldMyApplicationModulesBe.html
    http://radio.weblogs.com/0118231/stories/2005/07/19/nestedApplicationModules.html
    On the client side it depends on which technology you are using (struts, swing, jsf, ...).

  • Can multiple portlets share the same pageflow ?

    What is the framework behaviour if two distincts portlets are based on the same
    pageflow .jpf file.
    Will they share the classe instance or will it be two distincts page flow instances.

    Yes, multiple portlets can share the same pageflow, and the instances
    will be separate.
    Subbu
    Olivier wrote:
    What is the framework behaviour if two distincts portlets are based on the same
    pageflow .jpf file.
    Will they share the classe instance or will it be two distincts page flow instances.

Maybe you are looking for