How to update 2 TransformGroup at exactly the same time?

Hi all,
In my 3D scene, I would like to apply transformation to my shapes at the same time that my eye point is moving; for example, just like in car racing games where your car is always visible in front of you, and your eye point and lookAt point change as the car moves.
As a beginner to 3D programming, I've chosen the following approach. My first TransformGroup has the Transform3D object on which I'll called the lookAt method. This takes care of changing the eye point. My second TransformGroup has the shapes for the car as its child. Both TransformGroup objects are added to the root node of my scene graph.
While both TransformGroup have the ALLOW_TRANSFORM_WRITE capabilities set, I launched another thread to call the setTrasform methods on the 2 TransformGroup objects at regular intervals.
This seems to be working in terms of translating my objects and eye point, but I see noticable flickers. I suspect that's because for any given frame, the two setTransform calls to the two TransformGroup objects don't happen at exactly the same time. Do you think that is the problem?
Please let me know of any other approach to this problem.
Thanks in advance.

Use the Behavior framework for making changes in the scene. This uses an internal j3d thread which is in sync with the rendering thread.
See chapter 4 (Interaction) and 5 (Animation) in the 2nd module of the j3d tutorial (this may not be the correct chapters, since i have a rather old version of the tutorial)

Similar Messages

  • How to update two tables at the same time using jdbc

    Plz will anybody tell me what is the code or query in jdbc by which you insert entry in one table and simultaneously it goes in another table?
    Thanks in advance

    You might be
    able to design a trigger to do what you're talking
    about, but that would be a database thing, not a java
    thingAnother option would be an updatable view (google for usage), but it has limitations and should be used with caution. And yes, its a database thinggy and not java.
    cheers,
    ram.

  • Updating two tables at the same time

    Please,
    Does someone have an idea on how to update two tables at the same times?
    Thanks a lot in advance

    I was thinking about a single session and single update command.
    That's why I thougth someone else could have a clue.
    Thank you

  • Make 2 methods run at exactly the same time

    Hi,
    How can I make 2 mothds be executed at exactly the same time? Is it anything to do with the synchronized keywor?
    Thanks.

    You can't really.
    Even in the case of two computers, you probably don't have control over how the OS will give Java CPU cycles, so even though you thing you're clicking at the same time, the methods may start at slightly different times.
    Similarly , on a multi-CPU machine, you don't generally control how threads are apportioned among the CPUs, or when they get time.
    How exact does "exactly" need to be? +/- 1 μs? +/- 1 ms? 100 ms?
    Why do you need this?
    Why do you think you need this? There may be another ay to acommplish your ultimate goal without needing two methods to start simultaneously, or close to it.

  • HT2905 i want to delete dublicates with exactly the same time, advice?

    i want to delete dublicates which show exactly the same time, any advice?
    anybody any idea how to fix this?
    i have 1600+ duplicates with exactly the same problem so deleting each number will take me ages.
    any free program or function in itunes you can use?

    Hold down ths shift key then highlight the first of the group and then the last of the group.
    If the files are not in order hold down the command key and then select them one at a time in any order.

  • Getting two midi threads to start at exactly the same time

    Hello, is it possible to get two threads to start at exactly the same time because when I start two threads or more at the same time that playback midi using a synthesizer, they never start at exactly the same time.
    Any help would be appreciated.

    Use the Behavior framework for making changes in the scene. This uses an internal j3d thread which is in sync with the rendering thread.
    See chapter 4 (Interaction) and 5 (Animation) in the 2nd module of the j3d tutorial (this may not be the correct chapters, since i have a rather old version of the tutorial)

  • Bluetooth mouse and keyboard go off exactly the same time, and don't connect agian after ive installed the mac os x 10.8 updates please fix this apple

    After Installing the mac os x update for 10.6.8 ive recentley in the last couple of days the bluetooth mouse and keyboard going off at the same time ive looked at some help but i feel like this is a software bug after installing so any other suggetions than taking it into an Apple Store,
    I hope apple fixthis problem in there next patch update.

    Hi,
    Welcome to the    Discussions
    Does the App launch form the Applications Folder rather than the DOCK ?
    The icons in the DOCK are links to the App. Sometimes this link can get broken.
    8:37 PM Sunday; December 27, 2009
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"

  • How to support multiple users at the same time?

    Hi all,
    I have a Labview software which controls a analyzer via GPIB connector. When user A is using the software, user B has to wait until A is done. But actually, the analyzer is not very busy, when user A is using the software.
    I want user A, B, C and D can use the software at the same time. just like we can open Multiple websites at the same time.
    How can I program the software, so that the software can be open multiple times? Do you have any example?
    Thanks a lot.
    Steven
    Solved!
    Go to Solution.

    Are all the users going to be measuring the exact same thing from the same instrument?
    It would be possible to write a separate instrument server application that would handle all the direct interactions with the instrument. When one of the users needed to access the instrument, they would gain access to it through this server.
    The big, Big, BIG caveat is that each interaction with the instrument would need to be atomic. In other words each access would need to configure the instrument, initiate the reading, report the results, and then reset the instrument back to some known default value.
    As Dennis said, not a trivial process, but probably do-able...
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to open 2 playlist at the same time and have them in two diferents windows?

    until iTunes 10 i can open more than one playlist at the same time, and have this playlist in diferents windos but since 11 i cannot do it anymore.. is anoying if i need to fast switc music froms playlists.. so it become usseless...
    i think the aim of the previous itunes (before 10) it was to give a service of arranging librerys of musics.. but now, it becomes a sell party program...
    and only to you to know, if i dont put my credit card on my account i cannot even buy FREE programs on appstore...
    thats bad... very bad..
    if you need some tips how to do it proprerly here you got one..
    if is not broken... dont fix it...
    now i have my iphone 6, my ipad and the iphone of my wife, but i have itunes 10 because is the one who have the multi windows possibilities.. and now i cannot sync the devices..
    thats very bad..
    i hope you can help me...
    if you dont understand my problem i can show you via video..
    thanks

    You could create an applescript to do it.
    tell application "Dreamweaver's Full Name"
    activate
    end tell
    tell application "BBEdit's Full Name"
    activate
    end tell
    tell application "Acrobat's Full Name"
    activate
    end tell
    Replace the quoted text (leaving the quotes) with the full name of the application, and save the applescript as an application bundle, and put it in your dock.
    NOTE: You may have to put the full path to the application for it to work (I.E. /Applications/Dreamweaver.app). If you do, encase the full path in quotes.
    Good luck!
    Message was edited by: joshz

  • How to display multiple reports at the same time

    Hi,
    I'm trying to display multiple reports at the same time, each one in separates tabs or windows using Forms 11g 11.1.1.6
    I have a button which has a call to a procedure which makes use of rp2rro library to show the specific reports, for example:
    call_report('report1');
    call_report('report2');
    call_report('report3');
    call_report('report4');
    The main problem is that, just the last report is been displayed.
    Is there some way to display report1, report2 etc in separate tabs or windows ??
    Regards
    Carlos

    You shouldn't have a problem calling different reports at once. As long as you're using Forms 11g they show up in different windows.
    The question is how you are calling the report.
    Here is how I manipulate it.
    After I pass parameters with the ADD_PARAMETER built-in I set some key values (destype, desformat, desname) with the RP2RRO's procedures.
    Finally calling RP2RRO.RP2RRO_RUN_PRODUCT and then WEB.SHOW_DOCUMENT passing the correct procedure parameters the report comes up in a window. If you repeat the above changing the appropriate variables (the report_name in the RP2RRO_RUN_PRODUCT and so on) you can get multiple reports in different windows.

  • How to use multiple languages at the same time for spell checking?

    I use two different languages all the time and words are mostly so different (English and Finnish) that I could have spell checking on for both languages at the same time.
    Now it seem to allow to select only one language at the time and I have to switch back and fort zillion of times per day.

    Thanks for the quick answer.
    The Dictionary Switcher doesn't seem to work with Finnish language, it doesn't detect it at all to be one of the choices although in the Firefox context menu Languages -> Finnish/Finland is shown.
    Also, if it would work, I would need to get rid of multiple EN_* langauges. I just need EN_UK or EN_US, not all 22 different EN_*.
    One option would be to create a custom dictionary, which would have words from both languages. The next task is then to find out how to make this kind of custom ENFI-dictionary, which would have words from both English and Finnish languages.
    Finnish may be a some kind of special case for spell checking anyway, because the support is in its separate plugin:
    http://voikko.sourceforge.net/

  • How to import multiple images at the same time in illustrator?

    How to import multiple images in a document at the same time in illustrator?
    It's possible?

    Script: Place Multiple Files in Illustrator (Kelso)
    http://kelsocartography.com/blog/?p=2047

  • How to use multiple proxies at the same time?

    im planning to use multiple proxies at the same time on mac but i have no idea how to do it?!. i need help!thanks!

  • How to play two videos at the same time

    Hi everyone!
    Ok, so what I'm trying to do is basically play two videos, which are already saved on the computer, at the same time. I can get one video to play, but when i try to start another it just displays a blank screen.
    import javax.swing.*;
    import javax.media.*;
    import java.awt.*;
    import javax.media.protocol.*;
    public class TwoVideoTest {
         public static void main(String[]args) {
         MediaLocator locator1 = null;
         MediaLocator locator2 = null;
         try {
         locator1 = new MediaLocator("file:/C:/truck1.mpg");
         locator2 = new MediaLocator("file:/C:/truck2.mpg");
         } catch(Exception e) {
         System.out.println("COULNDT CREATE LOCATORS IN MAIN TEST CLASS");
                          System.exit(-1);
         Player player1 = null;
         Player player2 = null;
                     try {
          player1 = Manager.createRealizedPlayer(locator1);
         player2 = Manager.createRealizedPlayer(locator2);
                      } catch(Exception e) {
              System.exit(0);
         JFrame frame = new JFrame();
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JPanel panel1 = new JPanel();
       JPanel panel2 = new JPanel();
        panel1.add(player1.getVisualComponent());
       frame.getContentPane().add(panel1);
       frame.setSize(new Dimension(500,500));     
       frame.setVisible(true);
       player1.start();
       player2.start();
    }

    HELLO AGAIN! I guess i post too soon....
    So i modified my code and now the videos play together. Threads, sigh.
    But the audio that comes with the video doesn't appear to be starting at the same time. And this problem I ASSURE you i have no clue how to handle. And yes i know, the two video audios will overlap, but this a test for heavens sake!
    Anyways, heres the modified code in case it will help anyone
    import javax.swing.*;
    import javax.media.*;
    import java.awt.*;
    import javax.media.protocol.*;
    public class Video implements Runnable{
         String url;
         MediaLocator locator;
         Player player;
         JPanel panel;
         public Video (String url,JPanel panel) {
              this.url = url;
              try {
                   locator = new MediaLocator(url);
                   player = Manager.createRealizedPlayer(locator);     
                   panel.add(player.getVisualComponent());
                   player.start();
              } catch (Exception e) {
                   System.out.println("ERROR CREATING MEDIALOCATOR");
                   System.exit(-1);
         public void run() {
              try {
              Thread.sleep(100);
              } catch(Exception e) {}
         public static void main(String[]args) {
            JFrame frame = new JFrame();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JPanel panel1 = new JPanel();
              JPanel panel2 = new JPanel();
              panel1.setPreferredSize(new Dimension(100,100));
              panel2.setPreferredSize(new Dimension(100,100));
              Thread thread1 = new Thread(new Video("file:/C:/truck1.mpg",panel1));
              Thread thread2 = new Thread(new Video("file:/C:/truck2.mpg",panel2));
              frame.getContentPane().add(panel1);
              frame.getContentPane().add(panel2);
              frame.setSize(new Dimension(500,500));     
              frame.setVisible(true);
              thread1.start();
              thread2.start();
         

  • How to select two things at the same time ?

    Hey guys, i'm French and I need your help !
    I'm working everyday on iWork and especially Pages.
    How to select two parts of a text at the same time ?
    Before we only need to select one, to press the "cmd" button and then to select another part. It doesn't work anymore!
    Thanks for you help
    and sorry for the mistakes !

    Hey guys, i'm French and I need your help !
    I'm working everyday on iWork and especially Pages.
    How to select two parts of a text at the same time ?
    Before we only need to select one, to press the "cmd" button and then to select another part. It doesn't work anymore!
    Thanks for you help
    and sorry for the mistakes !

Maybe you are looking for

  • Porblem in displaying the data in main window and footer in sapscript

    Hi Friends, I have created a 2 pages with a main window and 6 footer windows for purchase requistion printout. My requirement is footer windows should only be displayed at the last page. If i bring the footer window at the last page there is blank sp

  • P67A-C45 discontinued P67A-G45 will be my replacement thru MSI.

    As subject states. What do you all think. Anyone have any issues with this board over the C45. It does have 2 pcie slots for future crossfire setup which I think will help futureproofability. Just lookin for opinions Thanx.

  • Considerations for 802.1x Port Based and Wi-Fi Certificate Authentication

    Lately, we have been going back and for with the thought of doing certificate authentication for Wi-Fi and Port. We have Server 2012 PKI and CA and it seems fairly straight forward to pump out a certificate to a user and have them authenticate with t

  • Plz correct Code given or tell error

    Hi all, I am trying to find solution but no result. The code is given below. It compile without any error... but when run it, it gives an error " Object read error ! Writing aborted; java.io.NotSerializableException Class name Exception in Thread "ma

  • Authorization for doing IP

    Hi, I am trying to create a planning layout in the bex analyzer. I inserted a button in the workbook and in properties, i have given execute planning function. When i try to assign the planning function, open dialog box appears with the following opt