<?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>Floorplanner Tech Blog &#187; OS X</title>
	<atom:link href="http://techblog.floorplanner.com/category/os-x/feed/" rel="self" type="application/rss+xml" />
	<link>http://techblog.floorplanner.com</link>
	<description>Our latest geek adventures!</description>
	<lastBuildDate>Tue, 16 Mar 2010 18:45:44 +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>Unproject with useProjectionMatrix = true</title>
		<link>http://techblog.floorplanner.com/2009/04/29/unproject-with-useprojectionmatrix-true/</link>
		<comments>http://techblog.floorplanner.com/2009/04/29/unproject-with-useprojectionmatrix-true/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 00:45:40 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Collaboration]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Flash+ActionScript]]></category>
		<category><![CDATA[Floorplanner]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[unproject]]></category>

		<guid isPermaLink="false">http://techblog.floorplanner.com/?p=580</guid>
		<description><![CDATA[I just updated Papervision3D to allow the CameraObject3D#unproject method to work when CameraObject3D#useProjectionMatrix = true.
Papervision3D has two methods of &#8216;projecting&#8217; vectors onto the screen:

useProjectionMatrix = false, this is the default &#8216;fast&#8217; method
useProjectionMatrix = true, this is the method where projection is done by a matrix

Note that Papervision3D switches to method #2 in &#8216;ortho mode&#8217;.
So what [...]]]></description>
			<content:encoded><![CDATA[<p>I just updated <a href="http://blog.papervision3d.org">Papervision3D</a> to allow the CameraObject3D#unproject method to work when CameraObject3D#useProjectionMatrix = true.</p>
<p>Papervision3D has two methods of &#8216;projecting&#8217; vectors onto the screen:</p>
<ol>
<li>useProjectionMatrix = false, this is the default &#8216;fast&#8217; method</li>
<li>useProjectionMatrix = true, this is the method where projection is done by a matrix</li>
</ol>
<p>Note that Papervision3D switches to method #2 in &#8216;ortho mode&#8217;.</p>
<p>So what is the difference exactly between these two kinds of projection? First we need to define what projection is. Projection is what adds &#8216;perspective&#8217; to a scene and makes sure your scene fits to the viewport. Its the last step in the so-called &#8216;render pipeline&#8217;. </p>
<p>We can derive the &#8216;fore shortening&#8217; effect of perspective in several ways. Method #1 is simple, effective and fast. It uses the camera&#8217;s focus and zoom values. Method #2 uses a more classic way of projection : it uses a dedicated matrix. Tech buffs: very much like OpenGL&#8217;s <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluPerspective.xml">gluPerspective</a>.</p>
<p><a href="http://blog.zupko.info/">Andy Zupko</a> has a great <a href="http://blog.zupko.info/?p=143">post</a> on unproject using method #1.</p>
<p>We will discuss unproject using method #2, which works slightly different.</p>
<p>The difference is that when #useProjectionMatrix is set to true, then CameraObject3D#unproject  returns a point in world-space, rather then a ray. Let me explain with some code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="actionscript3" style="font-family: Monaco,monospace;"><span style="color: #009900;">// we want to use a projection matrix</span>
camera.useProjectionMatrix = <span style="color: #0033ff; font-weight: bold;">true</span>;
&nbsp;
<span style="color: #009900;">// '0' indicates we want a point on the near plane</span>
<span style="color: #6699cc; font-weight: bold;">var</span> pointOnNearPlane <span style="color: #000000; font-weight: bold;">:</span> Number3D = camera.unproject<span style="color: #000000;">&#40;</span> screenX, screenY, <span style="color: #000000; font-weight:bold;">0</span> <span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #009900;">// '1' indicates we want a point on the far plane</span>
<span style="color: #6699cc; font-weight: bold;">var</span> pointOnFarPlane <span style="color: #000000; font-weight: bold;">:</span> Number3D = camera.unproject<span style="color: #000000;">&#40;</span> screenX, screenY, <span style="color: #000000; font-weight:bold;">1</span> <span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #009900;">// Construct the ray's direction</span>
<span style="color: #6699cc; font-weight: bold;">var</span> dir <span style="color: #000000; font-weight: bold;">:</span> Number3D = Number3D.sub<span style="color: #000000;">&#40;</span> pointOnFarPlane, pointOnNearPlane <span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #009900;">// Normalize</span>
dir.<span style="color: #004993;">normalize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #009900;">// So, now you have a ray with its origin at 'pointOnNearPlane',</span>
<span style="color: #009900;">// and direction 'dir'</span></pre></td></tr></table></div>

<p>Optimization: could save some cycles by doing (*not* in ortho mode!, see below):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="actionscript3" style="font-family: Monaco,monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> camPosition <span style="color: #000000; font-weight: bold;">:</span> Number3D = <span style="color: #0033ff; font-weight: bold;">new</span> Number3D<span style="color: #000000;">&#40;</span> camera.<span style="color: #004993;">x</span>, camera.<span style="color: #004993;">y</span>, camera.z <span style="color: #000000;">&#41;</span>;
<span style="color: #009900;">// Construct the ray's direction</span>
<span style="color: #6699cc; font-weight: bold;">var</span> dir <span style="color: #000000; font-weight: bold;">:</span> Number3D = Number3D.sub<span style="color: #000000;">&#40;</span> pointOnFarPlane, camPosition <span style="color: #000000;">&#41;</span>;
<span style="color: #009900;">// Normalize</span>
dir.<span style="color: #004993;">normalize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #009900;">// So, now you have a ray with its origin at the camera's position</span>
<span style="color: #009900;">// and direction 'dir'</span></pre></td></tr></table></div>

<p>Why can&#8217;t we use above optimization in ortho mode?<br />
In perspective mode all &#8216;rays&#8217; originate from the camera&#8217;s position: the &#8216;view cone&#8217; has shape of a pyramid. Hence we can assume &#8216;pointOnNearPlane&#8217; to coincide with the camera&#8217;s position.<br />
In ortho mode however the &#8216;view cone&#8217; has the shape of a cube, all rays are parallel. Hence we need to unproject *two* points to construct our ray.</p>
<p>Now simply follow <a href="http://blog.zupko.info/?p=143">Andy Zupko &#8217;s post</a> to drag objects around.<br />
Or perform &#8216;picking&#8217;, or&#8230;</p>
<p>Update:<br />
Created a little demo to visualize what I&#8217;m ranting about, check it out <a href='http://techblog.floorplanner.com/wp-content/uploads/2009/04/unprojecttest1.swf'>here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.floorplanner.com/2009/04/29/unproject-with-useprojectionmatrix-true/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Mousewheel events in Flash on OS X</title>
		<link>http://techblog.floorplanner.com/2008/05/07/using-mousewheel-in-the-flash-player-on-mac-os-x/</link>
		<comments>http://techblog.floorplanner.com/2008/05/07/using-mousewheel-in-the-flash-player-on-mac-os-x/#comments</comments>
		<pubDate>Wed, 07 May 2008 08:05:12 +0000</pubDate>
		<dc:creator>Rinde van Lon</dc:creator>
				<category><![CDATA[Flash+ActionScript]]></category>
		<category><![CDATA[Floorplanner]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.suite75.net/blog/dev/using-mousewheel-in-the-flash-player-on-mac-os-x.html</guid>
		<description><![CDATA[The Flash Player on OS X currently lacks support for mousewheel events. This means that users cannot use their mousewheel on OS X, in the Floorplanner we use the mousewheel to easily zoom in to your Floorplan. After reading this post from pixelbreaker, I was inspired to implement this in the Floorplanner which was, in [...]]]></description>
			<content:encoded><![CDATA[<p>The Flash Player on OS X currently lacks support for mousewheel events. This means that users cannot use their mousewheel on OS X, in the <a href="http://www.floorplanner.com/">Floorplanner</a> we use the mousewheel to easily zoom in to your Floorplan. After reading this post from <a href="http://blog.pixelbreaker.com/flash/as30-mousewheel-on-mac-os-x/">pixelbreaker</a>, I was inspired to implement this in the Floorplanner which was, in fact, very easy. I decided to only use the JavaScript class of pixelbreaker, which sends the mousewheel events to the Flash Player (on the Mac). In the Floorplanner ActionScript this event is handled by our own internal Event management system, which sends the Event to the reponsible part of the code. So thumbs up for <a href="http://blog.pixelbreaker.com/">pixelbreaker</a>, for making this really easy to implement!</p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.floorplanner.com/2008/05/07/using-mousewheel-in-the-flash-player-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Apache2 &amp; PHP5 on OS X</title>
		<link>http://techblog.floorplanner.com/2008/01/16/installing-apache2-and-php5-on-os-x/</link>
		<comments>http://techblog.floorplanner.com/2008/01/16/installing-apache2-and-php5-on-os-x/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 12:58:46 +0000</pubDate>
		<dc:creator>Gert-Jan van der Wel</dc:creator>
				<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.suite75.net/blog/dev/installing-apache2-and-php5-on-os-x.html</guid>
		<description><![CDATA[I found this great tutorial on how to install Apache2 and PHP5 on OSX.
Thanks a lot Maccius!
By the way, if you just want to use the Apache and PHP versions that come with OSX, read this post.
]]></description>
			<content:encoded><![CDATA[<p>I found <a href="http://support.maccius.com/index.php?_m=knowledgebase&#038;_a=viewarticle&#038;kbarticleid=51">this great tutorial</a> on how to install Apache2 and PHP5 on OSX.</p>
<p>Thanks a lot <a href="http://support.maccius.com/index.php">Maccius</a>!</p>
<p>By the way, if you just want to use the Apache and PHP versions that come with OSX, read <a href="http://www.devarticles.com/c/a/Apache/Using-Apache-and-PHP-on-Mac-OS-X/">this post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.floorplanner.com/2008/01/16/installing-apache2-and-php5-on-os-x/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>ASProject 0.1.92</title>
		<link>http://techblog.floorplanner.com/2007/04/13/asproject-0192/</link>
		<comments>http://techblog.floorplanner.com/2007/04/13/asproject-0192/#comments</comments>
		<pubDate>Fri, 13 Apr 2007 00:52:01 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Flash+ActionScript]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.suite75.net/blog/dev/?p=32</guid>
		<description><![CDATA[The issues with ASProject on win32 I reported are fixed with this rev.
Just do:
gem update asproject
]]></description>
			<content:encoded><![CDATA[<p>The issues with <a href="http://code.google.com/p/asproject/">ASProject </a>on win32 I <a href="http://code.google.com/p/asproject/issues/detail?id=16&#038;can=1&#038;q=">reported </a>are fixed with this rev.</p>
<p>Just do:<br />
<code>gem update asproject</code></p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.floorplanner.com/2007/04/13/asproject-0192/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Ruby on Rails on OSX made easy</title>
		<link>http://techblog.floorplanner.com/2007/04/12/installing-ruby-on-rails-on-osx-made-easy/</link>
		<comments>http://techblog.floorplanner.com/2007/04/12/installing-ruby-on-rails-on-osx-made-easy/#comments</comments>
		<pubDate>Thu, 12 Apr 2007 09:34:59 +0000</pubDate>
		<dc:creator>Gert-Jan van der Wel</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.suite75.net/blog/dev/?p=31</guid>
		<description><![CDATA[Thanks to Robby on Rails installing Ruby on Rails on my iMac was a piece of cake!

Download and install Xcode
Download and install DarwinPorts
Start up the Terminal
Modify the default bash profile with TextMate: sudo mate /etc/profile
Add /opt/local/bin to the PATH: PATH="/bin:/sbin:/opt/local/bin:/usr/bin:/usr/sbin"
Install Ruby with DarwinPorts with: sudo port install ruby rb-rubygems
Install Ruby on Rails and all its [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to <a href="http://www.robbyonrails.com/articles/2006/05/29/install-ruby-rails-and-postgresql-on-osx">Robby on Rails</a> installing Ruby on Rails on my iMac was a piece of cake!</p>
<ul>
<li>Download and install <a href="http://developer.apple.com/tools/xcode/">Xcode</a></li>
<li>Download and install <a href="http://darwinports.opendarwin.org/">DarwinPorts</a></li>
<li>Start up the Terminal</li>
<li>Modify the default bash profile with TextMate: <code>sudo mate /etc/profile</code></li>
<li>Add <code>/opt/local/bin</code> to the <code>PATH</code>: <code>PATH="/bin:/sbin:/opt/local/bin:/usr/bin:/usr/sbin"</code></li>
<li>Install Ruby with DarwinPorts with: <code>sudo port install ruby rb-rubygems</code></li>
<li>Install Ruby on Rails and all its dependencies with: <code>sudo gem install -y rails</code></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://techblog.floorplanner.com/2007/04/12/installing-ruby-on-rails-on-osx-made-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASProject</title>
		<link>http://techblog.floorplanner.com/2007/04/10/asproject/</link>
		<comments>http://techblog.floorplanner.com/2007/04/10/asproject/#comments</comments>
		<pubDate>Tue, 10 Apr 2007 13:15:34 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.suite75.net/blog/dev/?p=16</guid>
		<description><![CDATA[Just checked ASProject.
AsProject is a tool set that dramatically simplifies the process of creating, sharing and growing a new ActionScript project
Installing is easy if you have Ruby/Gem installed:

gem install asproject
asproject MyProjectName
cd MyProjectName/project
rake

And presto!
Now run a unit-test:
rake test
Here&#8217;s a video demo.
Update:
found some issues with version 0.1.90 on win32:

Need to change &#8216;mxmlc&#8217; to &#8216;mxmlc.exe&#8217; in mxmlc.rb#36 (located [...]]]></description>
			<content:encoded><![CDATA[<p>Just checked <a href="http://code.google.com/p/asproject/">ASProject</a>.</p>
<blockquote><p>AsProject is a tool set that dramatically simplifies the process of creating, sharing and growing a new ActionScript project</p></blockquote>
<p>Installing is easy if you have Ruby/Gem installed:<br />
<code><br />
gem install asproject<br />
asproject MyProjectName<br />
cd MyProjectName/project<br />
rake<br />
</code><br />
And presto!</p>
<p>Now run a unit-test:<br />
<code>rake test</code></p>
<p>Here&#8217;s a <a href="http://www.asserttrue.com/articles/2007/04/04/introducing-asproject">video demo</a>.</p>
<p>Update:<br />
found some issues with version 0.1.90 on win32:</p>
<ol>
<li>Need to change &#8216;mxmlc&#8217; to &#8216;mxmlc.exe&#8217; in mxmlc.rb#36 (located under /ruby/lib/ruby/gems/asproject/templates/ dir)</li>
<li>Using as3 the default skin (a jpg) is corrupted, need to copy also from /templates to the project&#8217;s asset folder. I bet it&#8217;s some fopen using &#8220;r&#8221; (read) instead of &#8220;rb&#8221; (read binary) switch or something related.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://techblog.floorplanner.com/2007/04/10/asproject/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>AsUnit on OS X</title>
		<link>http://techblog.floorplanner.com/2007/03/23/asunit-on-os-x/</link>
		<comments>http://techblog.floorplanner.com/2007/03/23/asunit-on-os-x/#comments</comments>
		<pubDate>Fri, 23 Mar 2007 10:56:19 +0000</pubDate>
		<dc:creator>Gert-Jan van der Wel</dc:creator>
				<category><![CDATA[Flash+ActionScript]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.suite75.net/blog/dev/?p=15</guid>
		<description><![CDATA[I&#8217;m looking at AsUnit to start unit testing the Floorplanner. Aral Balkan has written a post AsUnit-X: AsUnit XUL UI for OS X on an easy way to get started on OS X. I&#8217;ll keep you posted on the progress!
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m looking at <a href="http://www.asunit.org/" target="_blank">AsUnit</a> to start unit testing the Floorplanner. Aral Balkan has written a post <a href="http://aralbalkan.com/798" target="_blank">AsUnit-X: AsUnit XUL UI for OS X</a> on an easy way to get started on OS X. I&#8217;ll keep you posted on the progress!</p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.floorplanner.com/2007/03/23/asunit-on-os-x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing the Flash Debug Player on a Intel-based Mac</title>
		<link>http://techblog.floorplanner.com/2007/03/16/installing-the-flash-debug-player-on-a-intel-based-mac/</link>
		<comments>http://techblog.floorplanner.com/2007/03/16/installing-the-flash-debug-player-on-a-intel-based-mac/#comments</comments>
		<pubDate>Fri, 16 Mar 2007 13:44:07 +0000</pubDate>
		<dc:creator>Gert-Jan van der Wel</dc:creator>
				<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.suite75.net/blog/dev/?p=8</guid>
		<description><![CDATA[Today i&#8217;ve had some trouble getting the Flash Debug Player working on my new iMac. I downloaded the content debugger for Intel-based Macs from the Adobe Flash Player Support Center and installed it. The problem was, it didn&#8217;t work&#8230;. no mm.cfg, no flashlog.txt
After some surfing i found out that the easiest way to get things [...]]]></description>
			<content:encoded><![CDATA[<p>Today i&#8217;ve had some trouble getting the Flash Debug Player working on my new iMac. I downloaded the content debugger for Intel-based Macs from the <a href="http://www.adobe.com/support/flashplayer/downloads.html" target="_blank">Adobe Flash Player Support Center</a> and installed it. The problem was, it didn&#8217;t work&#8230;. no mm.cfg, no flashlog.txt</p>
<p>After some surfing i found out that the easiest way to get things working is to install the fabulous Firefox Add-on <a href="https://addons.mozilla.org/firefox/3469/" target="_blank">Flash Tracer</a> from <a href="http://www.sephiroth.it/" target="_blank">Alessandro Crugnola</a>. Besides the add-on itself, it creates 2 files: <b>flashlog.txt</b> (HD/Users/<i>username</i>/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt) and <b>mm.cfg</b> (HD/Users/<i>username</i>/Library/Application Support/Macromedia/mm.cfg). This makes all the difference! All the traces of my flash movie are stored in the flashlog.txt file and are shown in the Flash Tracer (when pointing it once to the flashlog.txt file)</p>
<p>If you don&#8217;t want to install Flash Tracer you can create the mm.cfg file manually. It should look something like this:<br />
<code><br />
ErrorReportingEnable=0<br />
TraceOutputFileEnable=1<br />
MaxWarnings=500<br />
</code><br />
I believe you also have to create an empty flashlog.txt file manually, but i&#8217;m not sure. Hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.floorplanner.com/2007/03/16/installing-the-flash-debug-player-on-a-intel-based-mac/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
