How to spin an object with both x and z-rotation in M3G?

I want to spin an object with both x and z-rotation in M3G. I get a good result when I implement this in OpenGL, but the combined rotation doesn't get right when I try to do this in M3G. The x rotation and the z rotation looks like they should when I only use one of them. This is achieved by adding only spinAnimationTrack or rotationAnimationTrack. The problem is that the rotation gets messed up when I add both spinAnimationTrack and rotationAnimationTrack. What am I doing wrong? This is my code:
KeyframeSequence spinKeyframes =
new KeyframeSequence(3, 4, KeyframeSequence.SLERP);
spinKeyframes.setRepeatMode(KeyframeSequence.LOOP);
spinKeyframes.setDuration(4000);
spinKeyframes.setKeyframe(0, 0,
getRotationQuaternion(-50.0f, new float[]{1.0f, 0.0f, 0.0f}));
spinKeyframes.setKeyframe(1, 2000,
getRotationQuaternion(50.0f, new float[]{1.0f, 0.0f, 0.0f}));
spinKeyframes.setKeyframe(2, 4000,
getRotationQuaternion(-50.0f, new float[]{1.0f, 0.0f, 0.0f}));
AnimationTrack spinAnimationTrack =
new AnimationTrack(spinKeyframes,
AnimationTrack.ORIENTATION);
AnimationController animatorS = new AnimationController();
spinAnimationTrack.setController(animatorS);
animatorS.setSpeed(0.4f * speed, 0);
KeyframeSequence rotationKeyframes =
new KeyframeSequence(2, 4, KeyframeSequence.SLERP);
rotationKeyframes.setRepeatMode(KeyframeSequence.LOOP);
rotationKeyframes.setDuration(4000);
rotationKeyframes.setKeyframe(0, 0,
getRotationQuaternion(359.0f, new float[]{0.0f, 0.0f, 1.0f}));
rotationKeyframes.setKeyframe(1, 4000,
getRotationQuaternion(0.0f, new float[]{0.0f, 0.0f, 1.0f}));
AnimationTrack rotationAnimationTrack1 =
new AnimationTrack(rotationKeyframes,
AnimationTrack.ORIENTATION);
rotationAnimationTrack1.setController(animatorR1);
animatorR1.setSpeed(0.4f * speed, 0);
mesh1.addAnimationTrack(spinAnimationTrack);
mesh1.addAnimationTrack(rotationAnimationTrack1);

People often make this harder than it is. It's usually not necessary to using clipping paths or to make cuts confined to the areas of overlap to make objects appear to intertwine. Usually, you can simply cut where objects do not overlap. There are no masks, clipping paths, pathfinders, etc., involved in this knot:
Your specific situation may be somewhat complicated by the use of drop shadows, depending on the specific parameters.
JET

Similar Messages

  • How to burn a dvd with both Mac and Windows files

    I have a DVD that has both Mac and Windows formatted files. When the DVD is mounted only Mac formatted files show. I want to burn a DVD copy containing both formatted files. How do I do that? Thanks in advance.

    Correction! It is a CD and there are two partitions with Mac and Windows files.

  • Can a Servlet be used for Storing Objects with both JSP and JSF used on it?

    Hi,
    Pages I have:
    SearchEmployee.jsp
    This page has a search engine that search out the Employee. This Employee Object will be stored inside a Servlet(controller) for future references by other pages. I used JSP, html tags for forms, and request.getParameter() to built this search engine.
    Problem:
    I have a JSF Form that wants to DISPLAY the employee which I have found in my Search Engine. How can I get the JSF's value="#{Controller.employeeObj.name}" to get the value from the object?
    This seems logical as my JSF form is just retrieving the stored object in the Controller. I currently cant seem to output it

    The servlet shouldn't be used to store ANY data, let alone data to be accessed by other sevlets. Put the object into the Session object.

  • How to read a file with both text and binary data?

    For text data I use a BufferedReader,
    for binary data I use a DataInputStream.
    Since readLine is deprecated in DataInputStream, how can I read in a proper way a file that contains some lines of text followed by some binary data.
    Is there a way to do this without writing a new 'readLine' for DataInputStream (that has to take into account the different newlines for Unix en other OS's)?

    sorry about that ^
    NEW STRING str
    WHILE there is stuff in the file DO
        getByte()
        IF reading a string THEN
            WHILE byte is not a return character DO
                convert the byte to character/string
                append char to str
            WEND
        ELSE IF reading raw data THEN
            parse raw data
            do stuff with it
        END IF
    WEND

  • How Select All Text Objects with Specific Contents and Move to Top-Center?

    Mavens,
    In a ~230 page InDesign CC Book (9 INDD files), on about ~35 pages, there is a small text block with the word "NOTES."
    Currently, the NOTES text block is in the Middle-Center of the page. I would like to find a way for InDesign to move all ~35 instances of the NOTES text block to the Top-Center (of the page each text block is on).
    Is there an easy way to do this with Edit --> Find/Change?
    Thanks!

    Probably not.
    That text block really belongs on a master page applied to those 35 pages, and if it is, all you have to do is move it on the master page. If it isn't, you've got some work to do. Probably easiest to fix one, then coy it and use Paste in Place on the other pages, and delete the frame that's in the wrong place.

  • Sending emails with both body and attachment to multiple recipients

    I have a requirement to send email with body and attachment to multiple recipients.
    Body of the email is a standard text. It is a proxy-to-mail scenario.
    Here is what I've done: (I'm using PI 7.11)
    One mapping from Source to Target structure (format of the attachment text file)
    Second mapping from Target Structure to Mail Package format.
    In the second mapping I'm concatenating the output of first step into "Content" of the Mail Package.
    "XIPAYLOAD" is the message protocol used.
    The "Keep attachments" option in the Mail adapter allows only to send "Content" as attachment or as body of the email.
    How to send an email with both content and text?
    The other problem is even with using ASMA, I can't send email to multiple recipients. I can only do CC and TO for 1 person each - a total of 2. Although I can resolve this by creating mailing lists, it is better if this can be addressed in PI.
    Thanks for any input you can provide!
    Edited by: crazylad on Jan 18, 2012 3:39 PM

    Thank you for your response Mikael.
    For the first question, I was able to find the solution in the following blog:
    XI Mail Adapter : Dynamically building attachment and message body content using a simple UDF
    (I just needed to search with the right set of key words )
    The key is to set the "Content Encoding" as "None" in the mail adapter. If this is not done, the mail will be sent with an attachment - untitled.bin containing both the mail body and the attachment text. Also, don't forget to check the "Keep Attachments" checkbox in the mail adapter.
    Multiple recipients could be added by separating the email IDs with a Comma. I have used ASMA to set the recipients.

  • Investigate book with both landscape and portrait pages

    I've an old book where I sucessfully swapped landscape and portrait pages, but there are complications why I cannot use it as a model for my current project. Since I no longer remember how I accomplished this, I have to investigate how to build a book with both landscape and portrait pages.
    I know about paragraph tags set to use a new page. Also a table on Reference page which lists Paragraph Tag Name, Right-Handed Master Page, Left-Handed Master Page, Range Indicator.
    But this doesn't seem to be enough; something is not working.
    Could you please point me toward resources which discuss how to do this?
    Thank you kindly,
    Theresa

    I think there was a big discussion of this already either here on the forum or over at the Frameusers.com list (I forget which). Try googling -

  • I have a MacBookPro5,5 how do i connect it to my hdtv WITH BOTH AUDIO AND VIDEO? and where can i buy this cable(s)?

    i have a MacBookPro5,5 how do i connect it to my hdtv WITH BOTH AUDIO AND VIDEO? and where can i buy this cable(s)?

    thank you roger. i have attempted to connect my mbp now 3 times (all different ways with different cables purchased) but unfortunately no success. i understand that with me having an older mbp it can be a challenge. i have found this page http://www.wikihow.com/Connect-a-Macbook-to-a-TV but with my unsuccessful history, i have become skeptical. i will try your suggestion and let you know. thank you again.

  • How to separate an object with a 3d effect

    How to separate an object with a 3d effect
    Hi, I have outlined some text and applied a 3d effect but now I want to separate each letter so I can adjust the colour on the face of the letter with the colour on the extruded part.
    I am sure it is probably straight forward but could do with a little help!
    Thanks

    I think what the OP wants to do is to keep the extruded part the same color and change the face of the letters to different colors. And he/she did mention that the text is outlined.
    If that's the case, I can think of two things to do if you want to keep the 3D effect live (i.e., unexpanded).
    1. You could apply a stroke to the outlined text, in the color you want for the extruded part. Then just change the fills individually (Tip: view in Outline mode and use the Group Selection tool to select each letter).
    2. If you don't like how the stroke looks on the letters, make all the letters the same color — the color you want for the extruded part. Then make a copy of this group of letters. Select the copy, then click in the Appearance panel to to edit the 3D effect. Put the Extruded Depth at Zero. Now chnage the colors to your liking, then align them with the original. Interestingly, you can't just use the Align functions, you have to eyeball it.

  • Motion how to create 3d effect with a background and one primary object

    motion how to create 3d effect with a background and one primary object

    … like that?
    http://youtu.be/yOht1GJpEm4

  • HT1689 I just upgraded to iTunes 11 and now I get a "itunes cannot connect with this ........ Could not allocate a resource. Happens with both ipad and iPhone. Any thoughts on how to resolve this issue?

    I just upgraded to iTunes 11 and now I get a "itunes cannot connect with this ........ Could not allocate a resource. Happens with both ipad and iPhone. Any thoughts on how to resolve this issue?

    Same for me with Iphone 5 and IOS 7 on mac pro. Install ITunes 11.1 and after reboot nothing work. Work only with Mac Pro in safe mode.
    I have uninstalled Wi-fi-sync1.0 app from MacPro and Itunes sync well with iphone.

  • I am just starting out in graphic design and I wanted to know how to get more involved with either adobe and or graphic design? I am really very interested in working with adobe and graphic design more and becoming more involved with both!!

    I am just starting out in graphic design and I wanted to know how to get more involved with either adobe and or graphic design? I am really very interested in working with adobe and graphic design more and becoming more involved with both!!

    I have now recently downloaded 10.0.2 which is confusing in itself, as, as far as I can ascertain that is actually version 11, but I'm not even sure about that.
    Version 10.0.2 is the newest version and the successor to GarageBand '11 (version 6.0.5).
    The '11 is referring to the iLife '11 suit of multimedia application - the older GarageBand was a part of this bundle.
    Have a look at Edgar's graphical enhanced manuals, the explain very detailed how things work and why. You can buy them as iBooks from the iBook store or directly from the page:
    http://DingDingMusic.com/Manuals/

  • How do  create a slide show with both video and photos in elements 12

    how do  create a slide show with both video and photos in elements 12

    Hi Brian
    You can batch process a set of prepared slides from Full Edit (see image) using:
    File >> Process Multiple Files
    In the PMF dialog you can choose filename, date, or description (caption)
    Make sure you choose a separate destination folder to your source folder so as tot to permanently overwrite your originals.
    Click image to view

  • Hello. I need to define a mesure in a picture: I took a picture of an object with a ruler and I want to signify to photoshop "this segment = 1 cm". How to do? Thank you!

    Hello. I need to define a mesure in a picture: I took a picture of an object with a ruler and I want to signify to photoshop "this segment = 1 cm". How to do? Thank you!

    That's a good precaution, norm.  It should be no problem is you have an object on a flat surface next to a ruler. It gets trickier in security camera frames.
    Anyway that is one example. Anne can look further into the measuring tools of  Photoshop Extended to see if it helps.
    A note on the screen resolution thing. When I calculate the screen resolution, I go into Photoshop > Preferences > Units and Rulers
    and enter it here in place of the default 72 ppi.  Then when I use View > Print Size, the on-screen rulers will match a physical ruler.
    That's if you wanted to look at the actual printed document size onscreen.
    Gene

  • MacPro with both Leopard and Tiger drives. Want to switch iTunes How

    I am running a MacPro with both Leopard and Tiger drives. I finally want to switch everything to Leopard and its drive. I have iTunes on the leopard drive but have never used it. How can I transfer my iTunes music, iPhone Apps etc. from the Tiger iTunes to the Leopard with the least amount of fuss?

    Hello hassiman,
    For additional information regarding moving the entire library from the 10.4 partition to the 10.5 partition, see this article:
    http://support.apple.com/kb/HT1449
    If your iTunes Library is substantial, you may want to consider backing it up to an external location as well:
    http://support.apple.com/kb/HT1751
    Hope this helps,
    Charles H.

Maybe you are looking for

  • Problem to export a report (to PDF) after converting my reports to CR13

    I have an old project with reports developped using Crystal Reports for Visual Studio 2003 (.NET 1.1). I want to convert them so I can now use Crystal Reports for Visual Studio 2010 (with .NET 3.5). I installed Crystal Reports for VS2010 and I conver

  • Email setup not working, Help needed!!!!!!

    Hi, I recently got a Blackberry Curve. My Text and Web tarrif was activated yesterday so I got a text telling me I can now set up my email account. Upon trying to set up my hotmail account for my Blackberry,  I got as far as entering email address an

  • Why would my PDF Form print out the tab order on top of my form fields?

    When this user prints out the filled out PDF form we created, it prints the tab order as a little square numbered box right on top of the form field entry.  The tab order prints over all types of fields, text entry fields, check box fields, etc. I am

  • Hd_audio_mux xapp1014

    Hi I am tring to make use of the vhdl code supplied by xilinx in order to embed digital audio into a  hd sdi video stream.  Reference xapp 1014. I have been tring to run this code in a test bench, and have correced a number of problem, also the fifo'

  • Print Tasks and header information only in QN

    Hi All, Is there a way to print Notification Tasks only?  For example the business sometime wants to print only the items in the notification and sometimes only the Tasks as the customers dont need to see all items or all tasks in the notification. S