<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AlmostLogical.com &#187; Rotation</title>
	<atom:link href="http://blog.almostlogical.com/tag/rotation/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.almostlogical.com</link>
	<description>Flash, Unity3D, Papervision3D, New Media and pretty much anything else that is related to the Internet. Blog by Devin Reimer.</description>
	<lastBuildDate>Thu, 08 Jul 2010 16:51:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>JigLibFlash Object Rotation &#8211; Pitch, Yaw and Roll</title>
		<link>http://blog.almostlogical.com/2009/03/27/jiglibflash-object-rotation-pitch-yaw-and-roll/</link>
		<comments>http://blog.almostlogical.com/2009/03/27/jiglibflash-object-rotation-pitch-yaw-and-roll/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 00:48:03 +0000</pubDate>
		<dc:creator>Devin Reimer</dc:creator>
				<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[Physics (JigLibFlash)]]></category>
		<category><![CDATA[Angle]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Degree]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[JigLibFlash]]></category>
		<category><![CDATA[Matrix]]></category>
		<category><![CDATA[Pitch]]></category>
		<category><![CDATA[Roll]]></category>
		<category><![CDATA[Rotation]]></category>
		<category><![CDATA[Yaw]]></category>

		<guid isPermaLink="false">http://blog.almostlogical.com/?p=346</guid>
		<description><![CDATA[

I get asked the following question a lot: "How do I rotate a JigLibFlash object?". I do understand why people have this question as rotating pieces of geometry in JigLibFlash is not very straight forward. It also can end up being kind of challenging if your not familiar with exactly how rotation matrix work. The bottom line is it is not as easy as Papervision3D ( ex: pitch(10) ). So instead of me trying to explain any formulas I decided to add a few functions to the RigidBody class in JigLibFlash to make it easier for people to use.  I have created the following functions.
public static var toDEGREES:Number = 180/Math.PI;
public static var toRADIANS:Number = Math.PI/180;

public function pitch(angleDeg:Number):void
{
	SetOrientation(JMatrix3D.multiply(CurrentState.Orientation, JMatrix3D.rotationX(angleDeg*toRADIANS)));
}

public function yaw(angleDeg:Number):void
{
	SetOrientation(JMatrix3D.multiply(CurrentState.Orientation, ...]]></description>
		<wfw:commentRss>http://blog.almostlogical.com/2009/03/27/jiglibflash-object-rotation-pitch-yaw-and-roll/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
