Adding OrbitBehavior in a VirtualUniverse (or how to get a ViewingPlatform)

I know how to add OrbitBehavior given a SimpleUniverse (get the ViewingPlatform and add to that using setViewPlatformBehavior) but in a VirtualUniverse, you cannot get the ViewingPlatform...at least not like you can from a SimpleUniverse.
So, how do you set the view platform behavior without a ViewingPlatform? Or, how can you get a ViewingPlatform in a VirtualUniverse?
THANKS!

I have done it as follows, sorry I can't put some comments,
I don't have time now :
view = new View();
view.setBackClipDistance(2000.0);
cam_tx_group = new TransformGroup(); // camera transform group
camplatform = new ViewPlatform(); // View platform
location = new Transform3D();
view.addCanvas3D(canvas);
view.setPhysicalBody(new PhysicalBody());
view.setPhysicalEnvironment(new PhysicalEnvironment());
cam_tx_group.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
cam_tx_group.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
cam_tx_group.setCapability(TransformGroup.ALLOW_CHILDREN_EXTEND );
location.setTranslation (loc); // loc is a "starting point"
cam_tx_group.setTransform(location);
viewingPlatform = new ViewingPlatform(); // for orbit behavior
viewingPlatform.setViewPlatform(camplatform);//orbit behavior
cam_tx_group.addChild(viewingPlatform);// orbit behavior
view.attachViewPlatform(camplatform);
======= and to add the OrbitBehavior ============
     orbit = new OrbitBehavior(aCanvas, OrbitBehavior.REVERSE_ALL);
orbit.setCapability(OrbitBehavior.ALLOW_LOCAL_TO_VWORLD_READ );
BoundingSphere allBounds =
     new BoundingSphere(new Point3d(0.0, 0.0, 0.0), 100.0);
orbit.setSchedulingBounds(allBounds);
orbit.setEnable(true);
orbit.setHomeTransform(location);
viewingPlatform.setViewPlatformBehavior(orbit);
// here you could type : orbit.setRotationCenter("a point3d");
========================================================
You 'll have some problems if you want to "put" the Viewpoint
to a given location in code ,
cam_tx_group.setTransform(t3d2); // the t3d2 is the target
location.setIdentity() ; // set location Transform3D to "default"
orbit.setHomeTransform(location);
orbit.goHome() ;
the last 3 lines make sure that the viewpoint goes to the correct
position.
If you find a better way for the last 3 lines, please post it :)

Similar Messages

  • Premiere Elements 12 - My videos have extra minutes of black space added that I don't know how to get rid of.

    I just finished making a video that runs to about the 13 minute mark. After that I don't have anything on the timeline. Despite this, the duration I see when I try to export is about 25 minutes. I then watched the video to confirm that I had an extra 12-13 minutes or so of blank, black, empty space added to the end of the video. I made doubly sure that there was no tiny file a chopped off on accident or anything, there's just nothing there. This has been a recurring problem, having occurred with a 7-ish minute video being expanded to 15.

    born
    What computer operating system is your Premiere Elements 12 running on? Be sure to update 12 to 12.1 via a project's Help Menu/Update. Background information. For now I will assume Windows 7, 8, or 8.1 64 bit.
    Now to the core of the matter and a quick way to find and correct the problem which is related to fragment beyond what you consider to be the end of your Timeline content.
    1. Open the project to the Expert workspace. Expand the Timeline content maximally by taking the Zoom Out-Zoom In Slider above the Timeline all the way to the right.
    2. Hit the computer keyboard End Key. That should take the Timeline Indicator to the spot where the fragment(s) is (are)..
    These fragments typically present as thin vertical black lines scattered among the track contents. Could even be a file that you pushed out of the way when
    you were editing and forgot you left it there. Search all tracks.
    3. After you find and delete it or them, then use the End Key again to make sure that this time Timeline Indicator stops at the end of your intended Timeline content when you press the computer keyboard End key.
    Any questions or need clarification, please do not hesitate to ask.
    Thank you.
    ATR

  • HT5624 how do I change the security questions on my daughters itunes account. I do not remember adding the questions and they do not make sence to me. can not figure out how to get to her  email account that it is showing for her altern

    I cant seem to be able to change the secutity questions on my minor daughters itunes account. I set the account up but I do not remember adding the security questions and they do not make sense to me. It says that the alternate account it would be sent to is@ me.com but I can not figure our how to get to it to retreive the email to reset the questions. My daughters account may have recently been hacked so I am trying to change all passwords. I changed the itunes account and added another email but I still can not change security questions in case I ever need them.
    <Email Edited by Host>

    We are fellow users here on these user-to-user forums, you're not talking to iTunes Support nor Apple - I've asked the hosts to remove your email address from your post (it's not a good idea to post personal info on any public forum).
    The reset link on an account will only show if there is a rescue email address on it, alternate email addresses are different and not used for resetting them. If she has a rescue email address on her account then steps 1 to 5 half-way down this page will give you a reset link on the account : http://support.apple.com/kb/HT5312
    Navigate to appleid.apple.com using your web browser.
    Click "Manage your account"
    When prompted, sign in using your Apple ID and password.
    Click Password & Security
    You'll be asked to answer 2 of your 3 security questions before you can make any modifications. If you are unable to remember your answers, you can choose to send an email to your rescue email to reset your security questions.
    If she doesn't have a rescue email address (you won't be able to add one until you can answer your questions) then you will need to contact Support in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use steps 1 to 7 half-way down the HT5312 link above to add a rescue email address for potential future use

  • I recently removed an outlook account and now all of my calendar events are missing. The majority of them were added from my iphone 4s. How do I retrieve the events? Backing up with iCloud did not help, as I assumed it would.

    I recently removed an outlook account and now all of my calendar events are missing. The majority of them were added from my iphone 4s. How do I retrieve the events? Backing up with iCloud did not help, as I assumed it would.

    Outlook is a mail client for PC's (and Macs). It is not a type of account. Do you mean an "Exchange Account"?
    If so, then re-add it. The calendar events live on the Exchange Server. The only way to get them back is to re-add the account to the phone. The contents of Exchange and IMAP accounts are not part of the 'backup' as they already exist elsewhere.

  • I had a second hard drive added to my Mac Pro.  How do I format it and not effect my orginal hard drive?

    I had a second hard drive added to my Mac Pro.  How do I format it and not effect my orginal hard drive?

    Just format it with Disk Utility as mentioned above.  Select the new disk on the list at the left.  Click the erase tab.  Specify Mac OS Extended (Journaled) if not already specified and give the disk a name of your choice.  Then click the erase button.
    That's the simplest way to format a disk with a single partition (volum). If you want to create multiple volume (partitions) then click the Partition tab instead of Erase.  You can then use then specify a number of volumes and size each volume by specifying its size or just dragging the slider in the bootm right of each partition.  Give each a name as before and again Mac OS Extended (Journaled).  Click Apply button to create the partitions.
    Since you appear to be new at this just "play" with the erase and partition settings so you can become comfortable with them.  So long as you have the new disk selected on the left you can't really hurt anything since it's a new disk and no data to loose.  You can always go back and erase it back to a single partition.

  • How to get the only the changed or newly added entries in AFTER SAVE.

    I have created table maintenance generated for a table,I want to get the newly added or changed entries while saving thats why im using AFTER SAVE event for the same,can anyone please tell me how to get the only the changed or newly added entries in AFTER SAVE.

    Hi,
    Welcome you post on the forum.
    I have moved your thread here because it is in English and should not in the language specific forum. What is your system version?
    Thanks,
    Gordon

  • I had the Siri app before it was added to all iphones and when Apple added it mine quit working. I deleted mine from my phone but do not see how to get it back. any suggestions?

    I had the Siri app before it was added to all iphones and when Apple added it mine quit working. I deleted mine from my phone but do not see how to get it back. any suggestions?

    bjorth wrote:
    apparently I have just an iphone 4 not 4s, so thank you.
    It does seem rather odd that an app that was acquired thru itunes would quit working once it was incorporated into the device for all users. oh well it was probably free or $.99 when I downloaded it.
    I would think that they were just testing it to see how many people would use it.  But you might want to write a polite letter to Apple requesting a credit for the purchase price of the no longer supported app.  That seems to be the least they could for one of their 'alpha testers'.

  • I deleted the recently added playlist in iTunes...how do i get it back?

    i've searched for answers but they were all for windows. does anybody know how to get the recently added playlist back on a MacBook Pro?
    MacBookPro   Mac OS X (10.4.8)   MacBookPro

    The "recently added" playlist can simply be recreated by using a smart playlist with the following criteria: "Date added is after". You pick the time frame, for instance the past month, past 2 weeks, etc.

  • How to get the Newly added fileds from Oracle to BW

    Hi ,
    We have created the view in the DB side and extracted the data to BW side. After that in the DB side they have added new filed. I want to extract the data for that filed also. But that filed is not displaying in the data source itself. We have deleted the sources system assignment to that particular info source and generated the data source in the source system side, and then also I an unable to get the newly added filed in the data source. We are extracting the data from the ORACLE data base. Please let me know the steps how to get the newly added filed in the data source.
    Thanks,
    Visu

    Hi Yadav,
    yes i have alreday created the info objects in the BW side. In the Oracle DB i can see the fileds in the data sources. Newly added filed is not displaying where as previous all fileds are displaying in the oracle DBside.
    Thanks,
    Visu

  • I have added audio to my PDF. How do I hide the icon?

    I have added audio to my PDF. How do I hide the icon?

    Thanks
    I have just changed the size of it to very small instead so that it doesn't dominate so much and set it on auto play and am happy with that.
    Thanks again

  • How to get event when any library object added to indesign doc?

    I want to do some operation when any library object is added to doc. So please tell me how to get event when any library object is added to the doc. better provide some code snippet.

    Daves61,
    I need to clarify what kind of event you're interested in.
    1. When you click once on page/spead widget in the Pages panel and only widget becomes selected. The layout window remains unchanged. OR
    2. When you doubleclick on page/spread widget the selected master spread appears in the layout window.
    In the first case you work with Pages panel.
    Have a look to file PageTransitionsPanelObserver.cpp from SDK. 
    PageTransitionsPanelObserver::LazyUpdate()
    In the second case you work with Layout window.

  • HT201077 My Photo Stream is no longer adding photos to my PC.  How do I get my photos from my iPhone 5 to my PC's Photo Stream?

    My Photos Stream is no longer adding photos to my PC.  How do I get my photos from my iPhone 5 ios 7.0.4 to my PC's Photo Stream?

    Hi jmy13,
    Thanks for visiting Apple Support Communities.
    Try these steps first if the Photo Stream on your PC is not updating:
    you can't connect to the Internet, iCloud Photos will not be able to send or receive updates to My Photo Stream. If necessary, troubleshoot your Internet connection on your PC, Mac, or iOS devices.
    Open the iCloud Control Panel and make sure that you're signed in to the same iCloud account that you're using on your other supported devices.
    In Windows 8.1, go to the Start screen, click the down arrow in the lower-left corner, then click the iCloud app.
    In Windows 8, go to the Start screen, and click the iCloud tile.
    In Windows 7, choose Start menu > All Programs > iCloud > iCloud.
    Make sure that iCloud Photos or Photo Stream is turned on in the iCloud Control Panel. Click the Options button and make sure that My Photo Stream is turned on.
    Close and reopen the iCloud Control Panel.
    Restart your computer. This may sound simple, but it does reinitialize your network and application settings and can frequently resolve issues.
    You can find the article with these steps here:
    iCloud: My Photo Stream troubleshooting
    http://support.apple.com/kb/TS3989
    Regards,
    Jeremy

  • Im a vine user and was wanting to know how to vine with no hands so i added a gesture to use on vine and now the gesture froze on the screen and i cant control my phone anymore. Its a blue circle and i want to know how to get rid of it.

    Im a vine user and was wanting to know how to vine with no hands so i added a gesture to use on vine and now the gesture froze on the screen and i cant control my phone anymore. Its a blue circle and i want to know how to get rid of it.

    never mind it finally went away

  • Hi, I am going to an exhibition where there is no internet access but would like to show people around my website. I have added "scrapbook" but cannot work out how to 'save' an entire site for viewing off-line.

    Hi, I am going to an exhibition where there is no internet access but would like to show people around my website. I have added "scrapbook" but cannot work out how to 'save' an entire site for viewing off-line. I thought there was a way to specify 1/2/3 clicks from home page etc. Please help. DAVID

    OK, solved my own problem, but am posting here in case someone else has the same problem. It totally does not make sense, especially considering that it stopped after I reinstalled Lion, but the good thing is I have my files back.
    I scoured the web and found a lot of other people are having the same problem. Most of them didn't have a clue how to fix it. This discussion was the most helpful to me: https://discussions.apple.com/thread/2569766?start=30&tstart=90
    So, I went to the WD page and followed the instructions. The first suggestion was to plug it directly into a wall, because it may not be getting enough power from a power cord. I did this and it fixed the problem. Who would have guessed?
    Anyway, if anyone else is having this problem, go to your manufacturer's website for help. Here's WD's help: http://wdc.custhelp.com/app/answers/detail/a_id/1164/related/1/session/L2F2LzEvd GltZS8xMzI2MzIzMjUwL3NpZC82dmo0blZOaw%3D%3D

  • I delected the "Recently Added" playlist file and don't know how to get it back, does anyone know how?

    I delected the "Recently Added" plylist file and don't know how to get it back, any suggestions as to how to get it back?

    See Restore Original Smart Playlists.
    tt2

Maybe you are looking for

  • Period Source Mapping in FDMEE

    Hello, I am using a custom SQL DB as a source for myFDMEE and stuck in few query , wondering if anyone can suggest ? 1- for period Mapping, do i need to have a calender (Period) pre-defined  in SQL ? if yes then how can i do that ? 2-I have data colu

  • 4G iPod shuffle not charging or recognized by itunes/windows

    I purchased the 4G shuffle less than two months ago. The battery ran out completely while I was listening in my car so I plugged into my laptop to charge battery. When I first plug shuffle in, there's a red light that shines for about 5 seconds and t

  • Ipod not turning on and connecting

    when i plug my ipod into the computer, a screen pop up and says "please wait. very low battery." i have tried turning it into disc mode but it won't let me. it also shows that my computer doesn't recognize it. i got a new battery for it so i know it

  • Mac mail full name change

    Hi, I just upgraded ONE computer amongst 4 to 10.94 and it won't let me change the full name in the account information box in mail. We each have individual names associates with the same emaIL ADDRESS on the four different computers. How can I chang

  • Keyboard error on 5730xpress music

    hi, im new to my Nokia 5730, and when i'm typing on my full keybard, its seems a error, pl help me. when i pressed "?" key, its not typing "?" it shows i typed "."  (phone detects as i typed "." and it shows like that) when i typed "." it shows i typ