<?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>jin_u as blog &#187; PV3D</title>
	<atom:link href="http://jinustudio.com/blog/archives/tag/pv3d/feed" rel="self" type="application/rss+xml" />
	<link>http://jinustudio.com/blog</link>
	<description>This Blog is My Second Life.</description>
	<lastBuildDate>Mon, 19 Jul 2010 15:49:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>FLAR &#8211; How to 6 : 타이포 효과 &#8211; Typo Effect</title>
		<link>http://jinustudio.com/blog/archives/3018</link>
		<comments>http://jinustudio.com/blog/archives/3018#comments</comments>
		<pubDate>Tue, 02 Mar 2010 08:33:08 +0000</pubDate>
		<dc:creator>jin_u</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Adobe_Flash]]></category>
		<category><![CDATA[FLARToolKit]]></category>
		<category><![CDATA[3DMax]]></category>
		<category><![CDATA[AR]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[DAE]]></category>
		<category><![CDATA[FLAR]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[marker]]></category>
		<category><![CDATA[PV3D]]></category>

		<guid isPermaLink="false">http://jinustudio.com/blog/?p=3018</guid>
		<description><![CDATA[Typo Effects Using Augmented Reality. 요번 튜토리얼은 뻔한 것만 했더니 식상해서 텍스트 효과를 만들어 보았다. PV3D에서 제공하고 있는 것을 이용한 것이니 쉽게 접근할 수 있을 듯 하다. 여기서 체크해야 할 것이 있다면, Camara에 대한 부분이 FLAR과 PV3D는 다르다는 것이다. 음.. 어떻게 설명을 해야 할지는 잘 모르겠다. 같은 공간이지만 트렉킹이 존재하기 때문에 이 부분에 대해서는 나중에 [...]]]></description>
			<content:encoded><![CDATA[<h2 style="text-align: center;"><span style="color: #333399;">Typo Effects Using Augmented Reality.</span></h2>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/To_SaMQYahI&amp;hl=ko_KR&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/To_SaMQYahI&amp;hl=ko_KR&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>요번 튜토리얼은 뻔한 것만 했더니 식상해서 텍스트 효과를 만들어 보았다. PV3D에서 제공하고 있는 것을 이용한 것이니 쉽게 접근할 수 있을 듯 하다. 여기서 체크해야 할 것이 있다면, Camara에 대한 부분이 FLAR과 PV3D는 다르다는 것이다. </p>
<p>음.. 어떻게 설명을 해야 할지는 잘 모르겠다. 같은 공간이지만 트렉킹이 존재하기 때문에 이 부분에 대해서는 나중에 정리가 좀 되면 따로 설명을 하겠다. 실은 아직 나도 잘 모르겠다. -_-;  </p>
<p>효과는 위에서 보듯이 마커의 x 좌표를 사용해서 rotationX 축을 변경시켜주는 단순한 효과로 움직임을 표현하고 마커가 사라지게 되면 텍스트가 문맥을 맞춰서 배치가 되는 것을 확인 할 수 있을 것이다.  </p>
<p><strong><span style="color: #993366;">필요한 소스를 먼저 다운로드 하자.</span></strong> : 마커 변경 됨.<br />
<a href="http://jinustudio.com/flash/tutorial/flar/FLAR_FontEffect/FLAR_FontEffect.zip">Flash Source</a>, <a href="http://jinustudio.com/flash/tutorial/flar/FLAR_Classes_20100118.zip">Classes</a>, <a href="http://jinustudio.com/flash/tutorial/flar/jinu_markers.jpg">Marker Image</a> </p>
<p>아래 클래스는 PV3D에서 지원해주는 그래픽 폰트 클래스로 효과를 줄 것이다.<br />
<a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/src/org/papervision3d/materials/special/Letter3DMaterial.as">Letter3DMaterial</a><br />
<a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/src/org/papervision3d/typography/Text3D.as">Text3D</a><br />
<a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/src/org/papervision3d/typography/fonts/HelveticaBold.as">HelveticaBold</a> </p>
<p>그럼 기본적인 코드를 살펴보자.<br />
도큐멘트 클래스 확장 클래스인 &#8220;<a href="/flash/tutorial/flar/FLAR_FontEffect/PV3DARApp.as">PV3DARApp.as</a>&#8221; 이다.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _onEnterFrame<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event = <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	_capture.<span style="color: #006600;">bitmapData</span>.<span style="color: #006600;">draw</span><span style="color: #66cc66;">&#40;</span>_video<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> detected:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
	<span style="color: #0066CC;">try</span> <span style="color: #66cc66;">&#123;</span>
		detected = _detector.<span style="color: #006600;">detectMarkerLite</span><span style="color: #66cc66;">&#40;</span>_raster, <span style="color: #cc66cc;">80</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&amp;&amp;</span> _detector.<span style="color: #006600;">getConfidence</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0.5</span>;
	<span style="color: #66cc66;">&#125;</span> <span style="color: #0066CC;">catch</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:<span style="color: #0066CC;">Error</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>detected<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		_detector.<span style="color: #006600;">getTransformMatrix</span><span style="color: #66cc66;">&#40;</span>_resultMat<span style="color: #66cc66;">&#41;</span>;
		_markerNode.<span style="color: #006600;">setTransformMatrix</span><span style="color: #66cc66;">&#40;</span>_resultMat<span style="color: #66cc66;">&#41;</span>;
		updateMarkerNode<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
		updateMarkerNode<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	_renderer.<span style="color: #006600;">render</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
protected <span style="color: #000000; font-weight: bold;">function</span> updateMarkerNode<span style="color: #66cc66;">&#40;</span>flag:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #808080; font-style: italic;">/** 하위 클래스에서 처리하도록 함 */</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>위 코드를 살펴보면 detected 멤버를 확인 할 수 있는데, 이 멤버가 좌표와 마커 인식을 처리에 대한 Boolean 리턴값을 갖는 것으로서 이것을 통하여 하위 객체인 &#8220;<a href="/flash/tutorial/flar/FLAR_FontEffect/PV3D_FontEffect.as">PV3D_FontEffect.as</a>&#8221; 의 updateMarkerNode(flag:Boolean)를 호출하여 아래와 같이 제어하게 되는 것이다.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/** 상위 클래스에서 Boolean 값으로 처리를 하도록 설정이 되어있다. */</span>
protected override <span style="color: #000000; font-weight: bold;">function</span> updateMarkerNode<span style="color: #66cc66;">&#40;</span>flag:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>flag<span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span>isVisibleMarker<span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">/** 분산 효과 처리 */</span>
			dispersionWords<span style="color: #66cc66;">&#40;</span>words1<span style="color: #66cc66;">&#41;</span>;
			dispersionWords<span style="color: #66cc66;">&#40;</span>words2<span style="color: #66cc66;">&#41;</span>;
			dispersionWords<span style="color: #66cc66;">&#40;</span>words3<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			isVisibleMarker = <span style="color: #000000; font-weight: bold;">true</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #b1b100;">else</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>isVisibleMarker<span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">/** 초기화 효과 처리 */</span>
			writeWords<span style="color: #66cc66;">&#40;</span>words1<span style="color: #66cc66;">&#41;</span>;
			writeWords<span style="color: #66cc66;">&#40;</span>words2<span style="color: #66cc66;">&#41;</span>;
			writeWords<span style="color: #66cc66;">&#40;</span>words3<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			isVisibleMarker = <span style="color: #000000; font-weight: bold;">false</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_markerNode.<span style="color: #006600;">x</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
		dispObj3D.<span style="color: #006600;">rotationZ</span> += <span style="color: #cc66cc;">2</span>;
	<span style="color: #b1b100;">else</span>
		dispObj3D.<span style="color: #006600;">rotationZ</span> -= <span style="color: #cc66cc;">2</span>;
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>위와 같이 작성이 되면, 마커가 보이고, 안 보이고를 체크하여 효과가 이루어지는 것이다.<br />
타이포의 분산 또는 쓰기 효과를 처리할 수 있게 된다. </p>
<p>요번 포스트도 단순한 효과지만 같은 것만 계속하니 지루해서 만들어 보았다. ^^</p>
<p><strong>작성 후기:</strong><br />
이 코드는 내가 어디에서 본 것을 토대로 작성한 것이다. <a href="http://wonderfl.net/">wonderfl</a>에서 초기 코드를 본 것 같다. 그것으로 FLAR 형태로 변경을 하여 효과를 만들어 본 것이다. 좀 더 생각하면 PV3D에서 효과 낸 것을 자유자재로 FLAR로 가져와 컨트롤 할 수 있을 듯 싶다. 실험적인 것들을 더 만들어 봐야 겠다.</p>
]]></content:encoded>
			<wfw:commentRss>http://jinustudio.com/blog/archives/3018/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FLAR &#8211; How to 5 : 애니메이션 .DAE 파일 생성 및 재생.</title>
		<link>http://jinustudio.com/blog/archives/2958</link>
		<comments>http://jinustudio.com/blog/archives/2958#comments</comments>
		<pubDate>Fri, 26 Feb 2010 09:44:03 +0000</pubDate>
		<dc:creator>jin_u</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Adobe_Flash]]></category>
		<category><![CDATA[FLARToolKit]]></category>
		<category><![CDATA[3DMax]]></category>
		<category><![CDATA[AR]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[DAE]]></category>
		<category><![CDATA[FLAR]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[marker]]></category>
		<category><![CDATA[PV3D]]></category>

		<guid isPermaLink="false">http://jinustudio.com/blog/?p=2958</guid>
		<description><![CDATA[The 3DMax to create and apply to the animated a .DAE file. 요번에는 애니메이션이 되는 .dae 파일을 생성해서 아래와 같은 효과를 낼 것이다. (3DMax와 Collada에 대한 튜토리얼은 이전 포스트를 참조하기 바란다.) 요번에 보여줄 성난 몬스터 애니메이션 소스인 &#8220;monster_angry.max&#8221; 파일을 제공을 해주신 브리짓닷텀의 한광재 실장님에게 감사를 전한다. 이것은 맵핑을 하지 않은 상태이다. 2009 LG 모바일 월드컵에 [...]]]></description>
			<content:encoded><![CDATA[<h2><span style="color: #333399;">The 3DMax to create and apply to the animated a .DAE file.</span></h2>
<p>요번에는 애니메이션이 되는 .dae 파일을 생성해서 아래와 같은 효과를 낼 것이다.<br />
(3DMax와 Collada에 대한 튜토리얼은 <a href="http://jinustudio.com/blog/archives/2828">이전 포스트</a>를 참조하기 바란다.)</p>
<p style="text-align: center;"><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/qIEJxbJZtMA&#038;hl=en_GB&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/qIEJxbJZtMA&#038;hl=en_GB&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>요번에 보여줄 성난 몬스터 애니메이션 소스인 &#8220;monster_angry.max&#8221; 파일을 제공을 해주신 <a href="http://www.breezedot.com">브리짓닷텀</a>의 <strong>한광재 실장</strong>님에게 감사를 전한다. 이것은 맵핑을 하지 않은 상태이다. 2009 LG 모바일 월드컵에 사용된 게임 캐릭터로 맵핑한 자료를 올리기에는 저작권에 문제가 생길지도 모르기 때문에 힘들것 같다.</p>
<p><strong><span style="color: #993366;">필요한 소스를 먼저 다운로드 하자.</span></strong><br />
<a href="http://jinustudio.com/flash/tutorial/flar/FLAR_3DMax_Ani_DAE/FLAR_3DMax_Ani_DAE.zip">Flash Source</a>, <a href="http://jinustudio.com/flash/tutorial/flar/FLAR_Classes_20100118.zip">Classes</a>, <a href="http://jinustudio.com/flash/tutorial/flar/GhostCorps_FLARMarker.jpg">Marker Image</a></p>
<p>이전의 튜토리얼에서와 같이 Collada export를 사용하여 애니메이션을 체크하여 .DAE 파일을 생성하면 된다.<br />
중요한건 각 프레임별로 모션이 적용되어 있어야 한다. 이 .DAE 파일은 64 프레임으로 애니메이션이 되어있다.</p>

<a href='http://jinustudio.com/blog/archives/2958/flar_ss_003_001' title='FLAR_SS_003_001'><img width="150" height="150" src="http://jinustudio.com/blog/wp-content/uploads/2010/02/FLAR_SS_003_001-150x150.jpg" class="attachment-thumbnail" alt="FLAR_SS_003_001" title="FLAR_SS_003_001" /></a>
<a href='http://jinustudio.com/blog/archives/2958/flar_ss_003_002' title='FLAR_SS_003_002'><img width="150" height="150" src="http://jinustudio.com/blog/wp-content/uploads/2010/02/FLAR_SS_003_002-150x150.jpg" class="attachment-thumbnail" alt="FLAR_SS_003_002" title="FLAR_SS_003_002" /></a>
<a href='http://jinustudio.com/blog/archives/2958/flar_ss_003_003' title='FLAR_SS_003_003'><img width="150" height="150" src="http://jinustudio.com/blog/wp-content/uploads/2010/02/FLAR_SS_003_003-150x150.jpg" class="attachment-thumbnail" alt="FLAR_SS_003_003" title="FLAR_SS_003_003" /></a>

<p>위 그림 처럼 Collada .DAE로 저장을 하면&#8230;<br />
이전에 보았던 Animation checkbox를 선택하고 Export를 하면 아래와 같은 코드가 생성이 된다.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;library_animations<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;animation<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;source</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;node-ChamferBox358_rotationX.ANGLE-input&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;float_array</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;node-ChamferBox358_rotationX.ANGLE-input-array&quot;</span> <span style="color: #000066;">count</span>=<span style="color: #ff0000;">&quot;65&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>0.03333333 0.06666667 0.1 0.1333333 0.1666667 0.2 0.2333333 0.2666667 0.3 0.3333333 0.3666667 0.4 0.4333333 0.4666667 0.5 0.5333333 0.5666667 0.6 0.6333333 0.6666667 0.7 0.7333333 0.7666667 0.8 0.8333333 0.8666667 0.9 0.9333333 0.9666667 1 1.033333 1.066667 1.1 1.133333 1.166667 1.2 1.233333 1.266667 1.3 1.333333 1.366667 1.4 1.433333 1.466667 1.5 1.533333 1.566667 1.6 1.633333 1.666667 1.7 1.733333 1.766667 1.8 1.833333 1.866667 1.9 1.933333 1.966667 2 2.033333 2.066667 2.1 2.133333 2.166667<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/float_array<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;technique_common<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;accessor</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;#node-ChamferBox358_rotationX.ANGLE-input-array&quot;</span> <span style="color: #000066;">count</span>=<span style="color: #ff0000;">&quot;65&quot;</span> <span style="color: #000066;">stride</span>=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;TIME&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;float&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/accessor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/technique_common<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/source<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;source</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;node-ChamferBox358_rotationX.ANGLE-output&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;float_array</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;node-ChamferBox358_rotationX.ANGLE-output-array&quot;</span> <span style="color: #000066;">count</span>=<span style="color: #ff0000;">&quot;65&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>0 0 0 0 0 0 0 0 0 0 0 0 0 0.9858586 3.336753 6.142659 8.493553 9.479412 8.493554 6.14266 3.336753 0.9858589 0 1.212546 3.464417 4.676962 4.417889 3.749751 2.836175 1.840787 0.9272113 0.2590737 0 1.212546 3.464417 4.676962 4.417889 3.749751 2.836175 1.840787 0.9272113 0.2590737 0 1.212546 3.464417 4.676962 4.516572 4.086728 3.464416 2.726624 1.950338 1.212546 0.5902338 0.1603896 0 0 0 0 0 0 0 0 0 0 0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/float_array<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;technique_common<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;accessor</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;#node-ChamferBox358_rotationX.ANGLE-output-array&quot;</span> <span style="color: #000066;">count</span>=<span style="color: #ff0000;">&quot;65&quot;</span> <span style="color: #000066;">stride</span>=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;ANGLE&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;float&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/accessor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/technique_common<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/source<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  ...
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;sampler</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;node-ChamferBox358_rotationX.ANGLE-sampler&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;input</span> <span style="color: #000066;">semantic</span>=<span style="color: #ff0000;">&quot;INPUT&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;#node-ChamferBox358_rotationX.ANGLE-input&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;input</span> <span style="color: #000066;">semantic</span>=<span style="color: #ff0000;">&quot;OUTPUT&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;#node-ChamferBox358_rotationX.ANGLE-output&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;input</span> <span style="color: #000066;">semantic</span>=<span style="color: #ff0000;">&quot;INTERPOLATION&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;#node-ChamferBox358_rotationX.ANGLE-interpolation&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/sampler<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;sampler</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;node-Dummy21_rotationX.ANGLE-sampler&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;input</span> <span style="color: #000066;">semantic</span>=<span style="color: #ff0000;">&quot;INPUT&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;#node-Dummy21_rotationX.ANGLE-input&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;input</span> <span style="color: #000066;">semantic</span>=<span style="color: #ff0000;">&quot;OUTPUT&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;#node-Dummy21_rotationX.ANGLE-output&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;input</span> <span style="color: #000066;">semantic</span>=<span style="color: #ff0000;">&quot;INTERPOLATION&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;#node-Dummy21_rotationX.ANGLE-interpolation&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/sampler<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  ...
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;channel</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;#node-ChamferBox358_rotationX.ANGLE-sampler&quot;</span> <span style="color: #000066;">target</span>=<span style="color: #ff0000;">&quot;node-ChamferBox358/rotationX.ANGLE&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;channel</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;#node-Dummy21_rotationX.ANGLE-sampler&quot;</span> <span style="color: #000066;">target</span>=<span style="color: #ff0000;">&quot;node-Dummy21/rotationX.ANGLE&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  ...
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/animation<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/library_animations<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>코드를 잘 보면 프레임 수 만큼의 해당 되는 태그들이 뽑힌것을 알 수 있다.<br />
그럼, 여기까지 되었다면 플래시 액션스크립트로 아주 간단하게 효과를 주면 된다.</p>
<p>코드는 아래와 같다.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package 
<span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">/**
	 * @author jin_u EUM (jin_u@jinustudio.com)
	 * @since 26/02/2010
	 * @version 1.0.0
	 */</span>
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">objects</span>.<span style="color: #006600;">parsers</span>.<span style="color: #006600;">DAE</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> FLAR_3DMax_Ani_DAE <span style="color: #0066CC;">extends</span> PV3DARApp 
	<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _monster:DAE;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> FLAR_3DMax_Ani_DAE<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">INIT</span>, _onInit<span style="color: #66cc66;">&#41;</span>;
			init<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Data/camera_para.dat'</span>, <span style="color: #ff0000;">'Data/ghost_corps_marker.pat'</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _onInit<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			_monster = <span style="color: #000000; font-weight: bold;">new</span> DAE<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			_monster.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'model/monster.dae'</span><span style="color: #66cc66;">&#41;</span>;
			_monster.<span style="color: #006600;">scale</span> = <span style="color: #cc66cc;">7</span>;
			_monster.<span style="color: #006600;">z</span> = <span style="color: #cc66cc;">30</span>;
			_monster.<span style="color: #006600;">rotationX</span> = <span style="color: #cc66cc;">90</span>;
			_markerNode.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>_monster<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, _update<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			mirror = <span style="color: #66cc66;">!</span>mirror;
			<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, _onClick<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _onClick<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			mirror = <span style="color: #66cc66;">!</span>mirror;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _update<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_markerNode.<span style="color: #0066CC;">visible</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span>_monster.<span style="color: #006600;">playing</span><span style="color: #66cc66;">&#41;</span>
				<span style="color: #66cc66;">&#123;</span>
					_monster.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span>
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #b1b100;">else</span>
			<span style="color: #66cc66;">&#123;</span>
				_monster.<span style="color: #0066CC;">pause</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>부연 설명을 하자면, 마커가 보일때 애니메이션이 진행중임를 체크한 후 진행중이 아니면 진행시키고, 마커가 안보인다면 애니메이션을 중단 시킨다. 이렇게 하면 스크린에서 마커를 놓쳤다고해도 모션이 중간에 사라지는 것을 막을 수있다.</p>
<p>이것 말고도 마커를 인식 실패해서 껌뻑 거림을 막기 위해 처리하는 방법도 있는데, 이것은 다음 포스팅에서 간단하게 알아보자.</p>
<p><strong>작성 후기</strong> :<br />
요즘 FLARToolKit 2.5.0이 지속적으로 업뎃이 되서 살펴보고 있다. FlashPlayer 10.0 버전이라 접근을 할까 말까 고민하고 있다. 대중적인 컨텐츠를 개발하게 된다면 아무래도 FlashPlayer 9.0 버전을 사용해야 할 듯 하다. 시연을 하면서 이곳 저곳을 돌아다녀 보았는데&#8230; FlashPlayer 버전에 대해서 언급을 하는 것을 보았기 때문에 내가 이런 생각을 하고있는지 모르겠다.</p>
]]></content:encoded>
			<wfw:commentRss>http://jinustudio.com/blog/archives/2958/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>FLAR &#8211; How to 4 : DAE 파일 생성 및 적용하기.</title>
		<link>http://jinustudio.com/blog/archives/2828</link>
		<comments>http://jinustudio.com/blog/archives/2828#comments</comments>
		<pubDate>Mon, 08 Feb 2010 14:33:57 +0000</pubDate>
		<dc:creator>jin_u</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[FLARToolKit]]></category>
		<category><![CDATA[3DMax]]></category>
		<category><![CDATA[AR]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[DAE]]></category>
		<category><![CDATA[FLAR]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[marker]]></category>
		<category><![CDATA[PV3D]]></category>

		<guid isPermaLink="false">http://jinustudio.com/blog/?p=2828</guid>
		<description><![CDATA[The 3DMax to create and apply a DAE file. 요번에도 알고리즘은 이전 FLAR Tutorial 1 포스트에서 사용한 것을 토대로 설명할 것이다. FLARToolKit 2.5.0 버전은 아직 분석중이고 마커 인식이 이전 버전보다 늦었는데, 엊그제 업뎃을 받고 테스트 해본 결과 마커 인식이 상당히 좋아졌다. 하지만 Flash CS4에선 작동 안 필요한 소스를 먼저 다운로드 하자. Flash Source, Classes, Marker [...]]]></description>
			<content:encoded><![CDATA[<h2><span style="color: #333399;">The 3DMax to create and apply a DAE file.</span></h2>
<p>요번에도 알고리즘은 이전 <a href="http://jinustudio.com/blog/wp-admin/post.php?action=edit&amp;post=2441">FLAR Tutorial 1</a> 포스트에서 사용한 것을 토대로 설명할 것이다.</p>
<p style="text-align:center;"><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/vXNurtxqIr4&#038;hl=en_GB&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/vXNurtxqIr4&#038;hl=en_GB&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>FLARToolKit 2.5.0 버전은 아직 분석중이고 마커 인식이 이전 버전보다 늦었는데,<br />
엊그제 업뎃을 받고 테스트 해본 결과 마커 인식이 상당히 좋아졌다. 하지만 Flash CS4에선 작동 안</p>
<p><strong><span style="color: #993366;">필요한 소스를 먼저 다운로드 하자.</span></strong><br />
<a href="/flash/tutorial/flar/FLAR_3DMax_DAE/FLAR_3DMax_DAE.zip">Flash Source</a>, <a href="/flash/tutorial/flar/FLAR_Classes_20100118.zip">Classes</a>, <a href="/flash/tutorial/flar/GhostCorps_FLARMarker.jpg">Marker Image</a></p>
<p>준비가 완료되었다. 시작해보자. 부딪혀보자.<br />
(이 글을 쓰기 위해서 7일간 FLARToolKit, 3DMax, DAE와 사투를&#8230; -_-)</p>
<p>자자&#8230; 먼저, exporter를 설치해야 한다. 아래의 사이트에서 다운을 받아 설치를 하자.</p>
<p><strong>Collada site</strong> : <a href="https://collada.org/mediawiki/index.php/COLLADA_-_Digital_Asset_and_FX_Exchange_Schema">https://collada.org</a><br />
<strong>Download</strong> : <a href="http://www.opencollada.org/download.html">OpenCOLLADA </a>for 3ds Max and Maya. Version 1.2.5</p>
<p>설치하면 &#8220;COLLADA based Google Warehouse Importer&#8221;와 &#8220;export&#8221;시 COLLADA로 DAE가 가능해 진다.</p>
<p>우선 <a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/papervision3d/objects/parsers/DAE.html">DAE</a> 파일이란 것은 간단하게 말하면,<br />
PV3D의 <a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/papervision3d/objects/parsers/DAE.html">DAE</a> 클래스에서 Import 하며 3D를 구현하게 해주는 파일 포멧이다.</p>
<p>여기서 중요한 것은 3D로 작업한 것이 깔끔하게 보여지지 않는다. 그리하여 빛 처리나 객체 컨트롤을 하기 위해서는 이미지 맵핑 및 객체 이름을 명시하여 컨트롤 할 수 있도록 만들어두어야 한다.</p>
<p>애니메이션도 가능하다. <a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/papervision3d/objects/parsers/DAE.html">DAE</a> 메서드들 중에 play(), pause(), playing &#8230;등등 조금만 보면 알 것이라고 생각한다.</p>
<p><a href="http://www.opencollada.org/download.html">OpenCOLLADA</a>를 설치하고 아래의 이미지 순서대로 작업을 하면 된다. &#8220;robot&#8221;을 검색하여 스케일을 줄이고 OpenCOLLADA <a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/papervision3d/objects/parsers/DAE.html">DAE</a>로 이미지까지 추출할 수 있다. Animation도 있다면 제일 하단에 체크를 하면 된다.<br />

<a href='http://jinustudio.com/blog/archives/2828/flar_ss_002_000' title='FLAR_SS_002_000'><img width="150" height="150" src="http://jinustudio.com/blog/wp-content/uploads/2010/02/FLAR_SS_002_000-150x150.jpg" class="attachment-thumbnail" alt="FLAR_SS_002_000" title="FLAR_SS_002_000" /></a>
<a href='http://jinustudio.com/blog/archives/2828/flar_ss_002_001' title='FLAR_SS_002_001'><img width="150" height="150" src="http://jinustudio.com/blog/wp-content/uploads/2010/02/FLAR_SS_002_001-150x150.jpg" class="attachment-thumbnail" alt="FLAR_SS_002_001" title="FLAR_SS_002_001" /></a>
<a href='http://jinustudio.com/blog/archives/2828/flar_ss_002_002' title='FLAR_SS_002_002'><img width="150" height="150" src="http://jinustudio.com/blog/wp-content/uploads/2010/02/FLAR_SS_002_002-150x150.jpg" class="attachment-thumbnail" alt="FLAR_SS_002_002" title="FLAR_SS_002_002" /></a>
<a href='http://jinustudio.com/blog/archives/2828/flar_ss_002_003' title='FLAR_SS_002_003'><img width="150" height="150" src="http://jinustudio.com/blog/wp-content/uploads/2010/02/FLAR_SS_002_003-150x150.jpg" class="attachment-thumbnail" alt="FLAR_SS_002_003" title="FLAR_SS_002_003" /></a>
<a href='http://jinustudio.com/blog/archives/2828/flar_ss_002_004' title='FLAR_SS_002_004'><img width="150" height="150" src="http://jinustudio.com/blog/wp-content/uploads/2010/02/FLAR_SS_002_004-150x150.jpg" class="attachment-thumbnail" alt="FLAR_SS_002_004" title="FLAR_SS_002_004" /></a>
<a href='http://jinustudio.com/blog/archives/2828/flar_ss_002_005' title='FLAR_SS_002_005'><img width="150" height="150" src="http://jinustudio.com/blog/wp-content/uploads/2010/02/FLAR_SS_002_005-150x150.jpg" class="attachment-thumbnail" alt="FLAR_SS_002_005" title="FLAR_SS_002_005" /></a>
<br />
OpenCOLLADA를 사용하는 건 내가 작업하기 위해서 찾다가 1순위로 검색과 설치 및 테스트가 가능했기 때문이다. -_-;</p>
<p>코드는 아래와 같다.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">/**
	 * @author jin_u EUM (jin_u@jinustudio.com)
	 * @since 08/02/2010
	 * @version 1.0.0
	 */</span>
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">objects</span>.<span style="color: #006600;">parsers</span>.<span style="color: #006600;">DAE</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> FLAR_3DMax_DAE <span style="color: #0066CC;">extends</span> PV3DARApp
	<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _robot:DAE;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> FLAR_3DMax_DAE<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">INIT</span>, _onInit<span style="color: #66cc66;">&#41;</span>;
			init<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Data/camera_para.dat'</span>, <span style="color: #ff0000;">'Data/ghost_corps_marker.pat'</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _onInit<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			_robot = <span style="color: #000000; font-weight: bold;">new</span> DAE<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			_robot.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'model/robot.DAE'</span><span style="color: #66cc66;">&#41;</span>;
			_robot.<span style="color: #006600;">rotationX</span> = <span style="color: #cc66cc;">90</span>;
			_markerNode.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>_robot<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, _update<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			mirror = <span style="color: #66cc66;">!</span>mirror;
			<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, _onClick<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _onClick<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			mirror = <span style="color: #66cc66;">!</span>mirror;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _update<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">//_robot.rotationZ -= 1</span>
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>DAE와 관련되서는 아래의 클래스들을 참조하면 된다. 상당히 많기 때문에 전부 사용해 보진 않았다. -_-<br />
나 역시 작업할때 마다 필요에 의해서 찾아서 봐야겠다. 우선 한번 눈으로 익혀두는 센스~</p>
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/papervision3d/objects/parsers/DAE.html">DAE</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeAccessor.html">DaeAccessor</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/types/DaeAddressSyntax.html">DaeAddressSyntax</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeAnimation.html">DaeAnimation</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeAnimationClip.html">DaeAnimationClip</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeAnimationCurve.html">DaeAnimationCurve</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/types/DaeArray.html">DaeArray</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeAsset.html">DaeAsset</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/fx/DaeBindVertexInput.html">DaeBindVertexInput</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeBlendWeight.html">DaeBlendWeight</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/fx/DaeBlinn.html">DaeBlinn</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaeBox.html">DaeBox</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeCamera.html">DaeCamera</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaeCapsule.html">DaeCapsule</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeChannel.html">DaeChannel</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/types/DaeColorOrTexture.html">DaeColorOrTexture</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/fx/DaeConstant.html">DaeConstant</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeContributor.html">DaeContributor</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeController.html">DaeController</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaeConvexMesh.html">DaeConvexMesh</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaeCylinder.html">DaeCylinder</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeDocument.html">DaeDocument</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/fx/DaeEffect.html">DaeEffect</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeEntity.html">DaeEntity</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaeForceField.html">DaeForceField</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeGeometry.html">DaeGeometry</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeImage.html">DaeImage</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeInput.html">DaeInput</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeInstanceController.html">DaeInstanceController</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaeInstanceForceField.html">DaeInstanceForceField</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeInstanceGeometry.html">DaeInstanceGeometry</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/fx/DaeInstanceMaterial.html">DaeInstanceMaterial</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeInstanceNode.html">DaeInstanceNode</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaeInstancePhysicsMaterial.html">DaeInstancePhysicsMaterial</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaeInstancePhysicsModel.html">DaeInstancePhysicsModel</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaeInstanceRigidBody.html">DaeInstanceRigidBody</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/fx/DaeLambert.html">DaeLambert</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/fx/DaeMaterial.html">DaeMaterial</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeMesh.html">DaeMesh</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeMorph.html">DaeMorph</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/fx/DaeNewParam.html">DaeNewParam</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeNode.html">DaeNode</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/fx/DaePhong.html">DaePhong</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaePhysicsMaterial.html">DaePhysicsMaterial</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaePhysicsModel.html">DaePhysicsModel</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaePhysicsScene.html">DaePhysicsScene</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaePlane.html">DaePlane</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaePrimitive.html">DaePrimitive</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/io/DaeReader.html">DaeReader</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaeRigidBody.html">DaeRigidBody</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaeRigidConstraint.html">DaeRigidConstraint</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeSampler.html">DaeSampler</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/fx/DaeSampler2D.html">DaeSampler2D</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaeShape.html">DaeShape</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeSkin.html">DaeSkin</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeSource.html">DaeSource</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaeSphere.html">DaeSphere</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeSpline.html">DaeSpline</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/fx/DaeSurface.html">DaeSurface</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaeTaperedCapsule.html">DaeTaperedCapsule</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/physics/DaeTaperedCylinder.html">DaeTaperedCylinder</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/fx/DaeTexture.html">DaeTexture</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/types/DaeTransform.html">DaeTransform</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeVertexWeights.html">DaeVertexWeights</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeVertices.html">DaeVertices</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/core/DaeVisualScene.html">DaeVisualScene</a></td>
</tr>
<tr>
<td><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/org/ascollada/io/DaeWriter.html">DaeWriter</a></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://jinustudio.com/blog/archives/2828/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FLAR &#8211; How to 3-1 : 멀티 마커 반사(mirror) 코드 추가</title>
		<link>http://jinustudio.com/blog/archives/2685</link>
		<comments>http://jinustudio.com/blog/archives/2685#comments</comments>
		<pubDate>Mon, 25 Jan 2010 18:54:22 +0000</pubDate>
		<dc:creator>jin_u</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Adobe_Flash]]></category>
		<category><![CDATA[FLARToolKit]]></category>
		<category><![CDATA[AR]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[FLAR]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[marker]]></category>
		<category><![CDATA[mirror]]></category>
		<category><![CDATA[multi]]></category>
		<category><![CDATA[multiple]]></category>
		<category><![CDATA[PV3D]]></category>

		<guid isPermaLink="false">http://jinustudio.com/blog/?p=2685</guid>
		<description><![CDATA[원문 포스트 : FLAR how-to: Multiple instances of multiple markers. 다운로드 : Download Source Code (좌표가 안보이면 조금더 선명한 이곳에서 확인) 원문 포스트에 보면 댓글 중 Stijn Debacker가 작성한 글을 살펴보면, 아래와 같이 코드 변경을하여 mirror 효과를 주었을때도 x, y, z의 좌표값이 디스플레이 좌표계로 출력되는 것을 확인 할 수 있었다. 이때, 객체 역시 같은 좌표값으로 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>원문 포스트 </strong>:<br />
<a href="http://www.squidder.com/2009/03/06/flar-how-to-multiple-instances-of-multiple-markers/">FLAR how-to: Multiple instances of multiple markers.</a><br />
<strong>다운로드 </strong>:<br />
<a href="http://www.squidder.com/wp-content/uploads/2009/03/flarsquidderkit.zip">Download Source Code</a></p>
<p style="text-align:center;"><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/IcdPEBFjv8Y&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/IcdPEBFjv8Y&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></pre>
<p>(좌표가 안보이면 조금더 선명한 <a href="http://www.youtube.com/watch?v=IcdPEBFjv8Y">이곳</a>에서 확인)</p>
<p>원문 포스트에 보면 댓글 중 <strong>Stijn Debacker</strong>가 작성한 글을 살펴보면,<br />
아래와 같이 코드 변경을하여 mirror 효과를 주었을때도 x, y, z의 좌표값이 디스플레이 좌표계로<br />
출력되는 것을 확인 할 수 있었다. 이때, 객체 역시 같은 좌표값으로 이동하는 것을 확인할 수 있다.</p>
<p>I found my solution!<br />
for mirroring the image of the webcam:<br />
in <strong>FlarBaseApplication.as</strong> change the following</p>

<div class="wp_syntax"><div class="code"><pre class="actoinscript" style="font-family:monospace;">_flarBitmap.scaleX = (_flarBitmap.scaleY = 2)*-1;
_flarBitmap.x = 640;</pre></div></div>

<p>Put some ()’s arround the scaleY thingy and mirror it using *-1. To see the image move the image, in this case 640 pixels on the x-axe!</p>
<p>Test the movie, you will see that you will be looking at a normal mirror but that, when if you move your marker it moves in the opposite direction!<br />
Solution:<br />
In the file <strong>PVFLARBaseApplication.as</strong></p>
<p>at the bottom of the file you will find a roster of variables! it looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="actoinscript" style="font-family:monospace;">m.n11 = r.m01; m.n12 = r.m00; m.n13 = r.m02; m.n14 = r.m03;
m.n21 = -r.m11; m.n22 = -r.m10; m.n23 = -r.m12; m.n24 = -r.m13;
m.n31 = r.m21; m.n32 = r.m20; m.n33 = r.m22; m.n34 = r.m23;</pre></div></div>

<p>Change it into:</p>

<div class="wp_syntax"><div class="code"><pre class="actoinscript" style="font-family:monospace;">m.n11 = -r.m00; m.n12 = -r.m01; m.n13 = -r.m02; m.n14 = -r.m03;
m.n21 = -r.m10; m.n22 = -r.m11; m.n23 = -r.m12; m.n24 = -r.m13;
m.n31 = r.m20; m.n32 = r.m21; m.n33 = r.m22; m.n34 = r.m23;</pre></div></div>

<p>And everything will work</p>
<p><strong>작성 후기</strong>:<br />
다음 포스트는 Collada DAE에 관련된 글을 작성할지 이 예제를 갖고 트렌지션을 작성할지 고민중이다. 흠~</p>
]]></content:encoded>
			<wfw:commentRss>http://jinustudio.com/blog/archives/2685/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FLAR &#8211; How to 3 : 멀티 마커들의 멀티 객체 표현.</title>
		<link>http://jinustudio.com/blog/archives/2624</link>
		<comments>http://jinustudio.com/blog/archives/2624#comments</comments>
		<pubDate>Wed, 20 Jan 2010 12:17:26 +0000</pubDate>
		<dc:creator>jin_u</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Adobe_Flash]]></category>
		<category><![CDATA[Creativity]]></category>
		<category><![CDATA[FLARToolKit]]></category>
		<category><![CDATA[AR]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[FLAR]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[marker]]></category>
		<category><![CDATA[multi]]></category>
		<category><![CDATA[multiple]]></category>
		<category><![CDATA[PV3D]]></category>

		<guid isPermaLink="false">http://jinustudio.com/blog/?p=2624</guid>
		<description><![CDATA[FLARToolKit : How to &#8211; Multiple Instances of Multiple Markers. 요번에는 지난번에 말했던 다중(이하 &#8216;멀티&#8217;로 표기) 마커들에 대한 부분들을 다뤄볼까 한다. 요번 알고리즘으로 멀티 마커에 의한 멀티 객체 표현을 다룬 squidder.com의 소스를 사용할 것이다. 아래 관련 문서와 소스를 다운 받자. 원문 포스트 : FLAR how-to: Multiple instances of multiple markers. 다운로드 : Download Source Code [...]]]></description>
			<content:encoded><![CDATA[<h3><span style="color: #333399;">FLARToolKit : How to &#8211; Multiple Instances of Multiple Markers.</span></h3>
<p>요번에는 지난번에 말했던 다중(이하 &#8216;멀티&#8217;로 표기) 마커들에 대한 부분들을 다뤄볼까 한다.</p>
<p>요번 알고리즘으로 멀티 마커에 의한 멀티 객체 표현을 다룬 <a href="http://www.squidder.com/">squidder.com</a>의 소스를 사용할 것이다. 아래 관련 문서와 소스를 다운 받자.</p>
<p><strong>원문 포스트 </strong>:<br />
<a href="http://www.squidder.com/2009/03/06/flar-how-to-multiple-instances-of-multiple-markers/">FLAR how-to: Multiple instances of multiple markers.</a><br />
<strong>다운로드 </strong>:<br />
<a href="http://www.squidder.com/wp-content/uploads/2009/03/flarsquidderkit.zip">Download Source Code</a></p>
<p>우선 어떻게 작동이 되는지와 좌표계가 어떻게 출력이 되는지 아래 영상으로 우선 확인해 보자.</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/kMc4K__0JCw&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/kMc4K__0JCw&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">하단의 trace 결과를 보면 x, y, z축의 값을 알 수 있다.
일반 웹캠으로는 퀄리티와 속도가 안나온다. 하나 사야하나... 흠</pre></div></div>

<p>패키지 구조는 다음과 같다.</p>
<p><strong>Package</strong><br />
<strong>Class</strong> public class MultiFLARExample<br />
<strong>Inheritance</strong> <a href="http://jinustudio.com/flash/tutorial/flar/FLARSquidderKit/MultiFLARExample.as">MultiFLARExample</a> → <a href="http://jinustudio.com/flash/tutorial/flar/FLARSquidderKit/src/com/squidder/flar/PVFLARBaseApplication.as"> PVFLARBaseApplication </a> → <a href="http://jinustudio.com/flash/tutorial/flar/FLARSquidderKit/src/com/squidder/flar/FLARBaseApplication.as">FLARBaseApplication</a></p>
<p>요번에도 다이어그램 문서와 다이어그램을 확인해 봐야 한다.<br />
(분석하는데 반나절이란 시간을 소요했다.)</p>
<p>아래와 같은 API 문서와 다이어그램을 살펴본 후에 중요한 작동 포인트를 살펴보겠다.</p>
<p><strong>API Documentation</strong> :<br />
<a href="http://jinustudio.com/flash/tutorial/flar/FLARSquidderKit/docs/index.htm" target="_blank"> FLARSquidderKit/docs/index.htm</a></p>
<p><strong>Basic Diagram</strong> :<br />
<a href="http://jinustudio.com/blog/wp-content/uploads/2010/01/EA21.png"><img class="alignnone size-medium wp-image-2630" title="EA2" src="http://jinustudio.com/blog/wp-content/uploads/2010/01/EA21-300x240.png" alt="" width="300" height="240" /></a></p>
<p>분석하기 위해서 다이어그램을 만들었는데, 이거 주인에게 말하고 해야 하는게 아닌가 싶다.<br />
하지만 많은 사람들이 한눈에 구조를 파악할 수 있게 만들어준 것을 고마워 할지도 모르겠다는 생각도 해본다. ㅡㅡ;</p>
<p>소스와 api 문서와 다이어그램을 자세히 보았다면 어떤 구조인지 알 것이다.<br />
실행 순서를 파악하는 것도 중요하다. 아래는 작동되는 순서를 출력한 결과이다.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">## MultiFLARExample : constructor
## PVFLARBaseApplication : constructor
## FLARBaseApplication : constructor
## FLARBaseApplication : _loadMarkersAndCamera()
## MultiFLARExample : _init( [Event type=&quot;complete&quot; bubbles=false cancelable=false eventPhase=2] )
## PVFLARBaseApplication : _init( [Event type=&quot;complete&quot; bubbles=false cancelable=false eventPhase=2] )
## FLARBaseApplication : _init( [Event type=&quot;complete&quot; bubbles=false cancelable=false eventPhase=2] )
## FLARBaseApplication : _setUpMarkers()
## FLARBaseApplication : _attachWebCam()
INFO: Papervision3D 2.1 rev920 (August 11th, 2009)
&nbsp;
## PVFLARBaseApplication : startRendering()
## PVFLARBaseApplication : _onRenderTick(event)
## MultiFLARExample : _detectMarkers()
## PVFLARBaseApplication : _onRenderTick(event)
## MultiFLARExample : _detectMarkers()</pre></div></div>

<p>기본 셋팅이 완료되면 <a href="http://jinustudio.com/flash/tutorial/flar/FLARSquidderKit/src/com/squidder/flar/PVFLARBaseApplication.as">PVFLARBaseApplication</a>.startRendering() 메서드가 작동이 되면서 반복문(Event.EnterFrame)이 시작된다.</p>
<p>반복에서 사용되는 메서드 호출은 <a href="http://jinustudio.com/flash/tutorial/flar/FLARSquidderKit/src/com/squidder/flar/PVFLARBaseApplication.as">PVFLARBaseApplication</a>._onRenderTick(), <a href="http://jinustudio.com/flash/tutorial/flar/FLARSquidderKit/MultiFLARExample.as">MultiFLARExample</a>._detectMarkers() 두 곳이다. 여기에서 멀티 객체와 멀티 마커 인식을 체크하는 것이다.</p>
<p>코드 중에 <a href="http://jinustudio.com/flash/tutorial/flar/FLARSquidderKit/src/com/squidder/flar/PVFLARBaseApplication.as">PVFLARBaseApplication</a>.transformMatrix( target : DisplayObject3D , r:FLARTransMatResult) 메서드가 있다. 이 부분에서 좌표값을 확인 할 수 있다.</p>
<p>화면 표시 방식을 mirror(역 방향 처리) 시키면 x 축의 +, -가 반대로 출력이 되는 현상이 있어서 우선은 헛갈리겠지만 반대로 제스처(행동, 행위)를 해줘야 했다. 반대로 계산하도록 만들려다가 좌표계가 복잡한 관계로 그냥 두었다. ㅡㅡ;</p>
<p>잘 짜여진 구조이긴 한데, 이걸 간단히 설명을 하자니 힘들고,<br />
자세히 설명하자니 깊이 파고 들어가야 하는데&#8230; 우선 시작해 보자.</p>
<p>우선 아래의 구조를 좀 더 자세히 살펴봐야 한다.<br />
<a href="http://jinustudio.com/flash/tutorial/flar/FLARSquidderKit/MultiFLARExample.as">MultiFLARExample</a> → <a href="http://jinustudio.com/flash/tutorial/flar/FLARSquidderKit/src/com/squidder/flar/PVFLARBaseApplication.as"> PVFLARBaseApplication </a> → <a href="http://jinustudio.com/flash/tutorial/flar/FLARSquidderKit/src/com/squidder/flar/FLARBaseApplication.as">FLARBaseApplication</a></p>
<p>위 상속 구조에서 핵심적으로 작동하는 것은 <a href="http://jinustudio.com/flash/tutorial/flar/FLARSquidderKit/src/com/squidder/flar/FLARBaseApplication.as">FLARBaseApplication</a> 이라고 할 수 있다. 이곳에서 카메라 인식 및 멀티 마커 등록과 작동이 행해진다.<br />
내부 구조에서 다음과 같은 객체 속성 멤버를 확인해야 한다.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/** flar::FLARBaseApplication */</span>
protected <span style="color: #000000; font-weight: bold;">var</span> _flarDetector : FLARSquidderMarkerDetector;
protected <span style="color: #000000; font-weight: bold;">var</span> _baseLoader : BaseLoader;
protected <span style="color: #000000; font-weight: bold;">var</span> _markers : <span style="color: #0066CC;">Array</span>;</pre></div></div>

<p>&#8216;<strong>protected</strong>&#8216;로 되어있다는 것은 상속 구조에서 접근 허용을 뜻한다. 그리고 메서드일 경우,<br />
상위에서 호출이 되면 최초 클래스의 동일 &#8216;<strong>override</strong>&#8216;된 메서드도 같이 호출이 된다.<br />
아래 코드에서 선언된 이벤트 같은 경우를 말한다. 이곳에서는 아래 코드 부분의 이벤트가 중요한 역할을 한다.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/** flar::FLARBaseApplication */</span>
protected <span style="color: #000000; font-weight: bold;">function</span> _init<span style="color: #66cc66;">&#40;</span> event : Event <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #808080; font-style: italic;">// ...</span>
	_flarDetector = <span style="color: #000000; font-weight: bold;">new</span> FLARSquidderMarkerDetector<span style="color: #66cc66;">&#40;</span> _flarParam , _flarCodes , _sizes , _sizes.<span style="color: #0066CC;">length</span> <span style="color: #66cc66;">&#41;</span>;
	_flarDetector.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> FLARDetectorEvent.<span style="color: #006600;">MARKER_ADDED</span> , _handleMarkerAdded <span style="color: #66cc66;">&#41;</span>;
	_flarDetector.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> FLARDetectorEvent.<span style="color: #006600;">MARKER_REMOVED</span> , _handleMarkerRemove <span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
protected <span style="color: #000000; font-weight: bold;">function</span> _handleMarkerAdded<span style="color: #66cc66;">&#40;</span> event : FLARDetectorEvent <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #66cc66;">&#125;</span>
protected <span style="color: #000000; font-weight: bold;">function</span> _handleMarkerRemove<span style="color: #66cc66;">&#40;</span> event : FLARDetectorEvent <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// 최상위 클래스에서 이벤트가 발생하면 MultiFLARExample  클래스의 메서드가 호출이 일어난다.</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/** MultiFLARExample */</span>
override protected <span style="color: #000000; font-weight: bold;">function</span> _handleMarkerAdded<span style="color: #66cc66;">&#40;</span> event : FLARDetectorEvent <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #808080; font-style: italic;">// 큐브 생성 이벤트 핸들러</span>
	_addCube<span style="color: #66cc66;">&#40;</span> event.<span style="color: #006600;">codeId</span> , event.<span style="color: #006600;">codeIndex</span> <span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
override protected <span style="color: #000000; font-weight: bold;">function</span> _handleMarkerRemove<span style="color: #66cc66;">&#40;</span> event : FLARDetectorEvent <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #808080; font-style: italic;">// 큐브 삭제 이벤트 핸들러</span>
	_removeCube<span style="color: #66cc66;">&#40;</span> event.<span style="color: #006600;">codeId</span> , event.<span style="color: #006600;">codeIndex</span> <span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">핵심 포인트 : 복잡한 마커들을 사용할 경우 알고 넘어가기...
&nbsp;
위 코드에서 사용된 flar:detector:FLARSquidderMarkerDetector 클래스는 FLARToolKit API를 변경한 것으로써
마커가 단순한 패턴인 경우에 퍼포먼스를 향상 시킨는 코드이다.
&nbsp;
만약, 다른 복잡한 마커를 사용하게 된다면 아래 코드를 원래 계산으로 변경해야 한다.
&nbsp;
var borderWidth:Number = (100 - i_code[0].markerPercentWidth) / 20;
//マーカの枠高を算出
var borderHeight:Number = (100 - i_code[0].markerPercentHeight) / 20;
↓
var borderWidth:Number = i_code[0].markerPercentWidth / 10;
//マーカの枠高を算出
var borderHeight:Number = i_code[0].markerPercentHeight / 10;</pre></div></div>

<p>이제 하나씩 살펴보고 작동 원리를 이해해 보자.</p>
<p>최초에 <a href="http://jinustudio.com/flash/tutorial/flar/FLARSquidderKit/src/com/squidder/flar/FLARBaseApplication.as">FLARBaseApplication</a> Constructor에서 _loadMarkersAndCamera( ) 메서드가 호출이 된다.<br />
이곳에서 <a href="http://jinustudio.com/flash/tutorial/flar/FLARSquidderKit/MultiFLARExample.as">MultiFLARExample</a> Constructor에서 등록된 _markers Array 객체에 있는 패턴들이 <a href="/flash/tutorial/flar/FLARSquidderKit/src/com/squidder/flar/FLARMarkerObj.as">FLARMarkerObj </a>클래스에 등록을 시키고 <a href="/flash/tutorial/flar/FLARSquidderKit/src/com/squidder/base/baseLoader/BaseLoader.as">_baseLoader </a>객체에 등록이 되고, load가 이루어 진 후 완료 시 <strong>_init </strong>메서드가 호출이 되며, 최초  <a href="http://jinustudio.com/flash/tutorial/flar/FLARSquidderKit/MultiFLARExample.as">MultiFLARExample</a> 클래스에서 super를 사용하여 &#8217;<strong>override</strong>&#8216;된 메서들이 호출이 되며 셋팅이 완료 된다.</p>
<p>아래 코드들을 확인해 보면 한 눈에 알 수 있을 것이다.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/** flar::FLARBaseApplication */</span>
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> FLARBaseApplication<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
	_loadMarkersAndCamera<span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
protected <span style="color: #000000; font-weight: bold;">function</span> _loadMarkersAndCamera<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	_baseLoader = <span style="color: #000000; font-weight: bold;">new</span> BaseLoader<span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#41;</span>;
	_baseLoader.<span style="color: #006600;">addAsset</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;assets/flar/camera_para.dat&quot;</span> , <span style="color: #66cc66;">&#123;</span> id:<span style="color: #ff0000;">&quot;FLARCamera&quot;</span> , <span style="color: #0066CC;">type</span>:<span style="color: #ff0000;">&quot;Binary&quot;</span> <span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i : <span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span> ; i <span style="color: #66cc66;">&amp;</span>lt; _markers.<span style="color: #0066CC;">length</span> ; i++ <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">var</span> markerObj : FLARMarkerObj = FLARMarkerObj<span style="color: #66cc66;">&#40;</span> _markers<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#41;</span>;
		_baseLoader.<span style="color: #006600;">addAsset</span><span style="color: #66cc66;">&#40;</span> markerObj.<span style="color: #006600;">markerSrc</span> , <span style="color: #66cc66;">&#123;</span> id:<span style="color: #ff0000;">&quot;FLARPattern&quot;</span> + i <span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	_baseLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">COMPLETE</span> , _init <span style="color: #66cc66;">&#41;</span>;
	_baseLoader.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// 여기서 알아야 할 것은 _init 메서드가 일어날 경우 추상 클래스의 메서드가 작동하는 것이 아니다.</span>
<span style="color: #808080; font-style: italic;">// 최초 클래스인 MultiFLARExampled의 _init(event)가 실행이 되면서 </span>
<span style="color: #808080; font-style: italic;">// super._init(event);를 사용하여 추상(구상) 클래스 초기 셋팅을 실행한다.</span>
<span style="color: #808080; font-style: italic;">// 아래 코드는 실행 우선 순위로 _init 메서드의 표시하였고, 작동에 대한 설명을 달았다.</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/** MultiFLARExample */</span>
protected <span style="color: #000000; font-weight: bold;">function</span> _init<span style="color: #66cc66;">&#40;</span> event : Event <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">super</span>._init<span style="color: #66cc66;">&#40;</span> event <span style="color: #66cc66;">&#41;</span>;
	<span style="color: #808080; font-style: italic;">// PointLight3D 객체를 생성하여 큐브 생성시 사용된다.</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/** flar::PVFLARBaseApplication*/</span>
override protected <span style="color: #000000; font-weight: bold;">function</span> _init<span style="color: #66cc66;">&#40;</span> event : Event <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">super</span>._init<span style="color: #66cc66;">&#40;</span> event <span style="color: #66cc66;">&#41;</span>;
	<span style="color: #808080; font-style: italic;">// FLAR과 PV3D가 셋팅이 된다.</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/** flar::FLARBaseApplication*/</span>
protected <span style="color: #000000; font-weight: bold;">function</span> _init<span style="color: #66cc66;">&#40;</span> event : Event <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #808080; font-style: italic;">// camera_para.dat 및 *.pat 파일들을 셋팅한다.</span>
<span style="color: #66cc66;">&#125;</span>
protected <span style="color: #000000; font-weight: bold;">function</span> _setUpMarkers<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #808080; font-style: italic;">// 마커를 셋업시킨다.</span>
<span style="color: #66cc66;">&#125;</span>
protected <span style="color: #000000; font-weight: bold;">function</span> _attachWebCam<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #808080; font-style: italic;">// 카메라와 비디오를 셋팅한다.</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/** flar::PVFLARBaseApplication - _init(event) 메서드에서 실행이 된다. */</span>
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> startRendering<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #808080; font-style: italic;">// 반복 이벤트 등록.</span>
	addEventListener<span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">ENTER_FRAME</span> , _onRenderTick <span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
protected <span style="color: #000000; font-weight: bold;">function</span> _onRenderTick<span style="color: #66cc66;">&#40;</span> event : Event = <span style="color: #000000; font-weight: bold;">null</span> <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #808080; font-style: italic;">// 반복하며 비디오를 그리고 마커를 찾고, 화면을 렌더링한다.</span>
	_flarBitmap.<span style="color: #006600;">bitmapData</span>.<span style="color: #006600;">draw</span><span style="color: #66cc66;">&#40;</span> _video <span style="color: #66cc66;">&#41;</span>;
	_detectMarkers<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	renderer.<span style="color: #006600;">renderScene</span><span style="color: #66cc66;">&#40;</span> scene , _camera , viewport <span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/** MultiFLARExample */</span>
override protected <span style="color: #000000; font-weight: bold;">function</span> _detectMarkers<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #808080; font-style: italic;">// 마커를 찾고, 좌표를 업데이트 한다.</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>이제 어떻게 작동이 되는지 파악이 될 듯 싶다.<br />
이해를 돕기 위해 코드 대신 간략한 코멘트를 작성을 하였다. 코드는 해당 클래스를 클릭하여 보길 바란다.<br />
만약, 파악이 안된다면 API 문서와 다이어그램을 다시 한번 살펴보길 바란다.</p>
<p>이렇게 하여 반복문이 실행이 되면서 마커들을 찾고 마커에 의해 반응 처리가 이루어지는 것이다.</p>
<p><strong>작성 후기</strong> :<br />
마커가 너무 단순하면 카메라와 비디오 처리에서 비슷한 표면을 찾아 마커로 잘못 인식하는 경우가 발생한다.<br />
좀 더 명확한 심볼을 갖고 작업을 해야 오작동을 막을 수 있다.<br />
웹캠으로 녹화시 현재의 심볼 때문에 촬영하기 힘들었다.</p>
]]></content:encoded>
			<wfw:commentRss>http://jinustudio.com/blog/archives/2624/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FLAR &#8211; How to 2 : PV3D 이미지 회전</title>
		<link>http://jinustudio.com/blog/archives/2570</link>
		<comments>http://jinustudio.com/blog/archives/2570#comments</comments>
		<pubDate>Mon, 18 Jan 2010 08:39:30 +0000</pubDate>
		<dc:creator>jin_u</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Adobe_Flash]]></category>
		<category><![CDATA[Creativity]]></category>
		<category><![CDATA[FLARToolKit]]></category>
		<category><![CDATA[AR]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[FLAR]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[marker]]></category>
		<category><![CDATA[PV3D]]></category>

		<guid isPermaLink="false">http://jinustudio.com/blog/?p=2570</guid>
		<description><![CDATA[FLARToolKit : PV3D Images Rotation 기본 알고리즘은 saqoosha.net, start-up-guide로 계속 이여진다. 요번실험은 이미지 회전(Images Rotation)이다. Download : 소스(Source), 클래스(All APIs), 마커(Marker) 결과물로 만든 것을 보면 아래와 같이 작동을 하는데, 이것은 방향을 체크하여 회전 변화를 적용한 것이다. 패키지 구조는 다음과 같다. Package Class public class PV3D_ImagesRotation Inheritance PV3D_ImagesRotation → PV3DARApp → ARAppBase PV3D_ImagesRotation 클래스를 확인해 보면, [...]]]></description>
			<content:encoded><![CDATA[<h3><span style="color: #333399;">FLARToolKit : PV3D Images Rotation</span></h3>
<p>기본 알고리즘은 <a href="http://saqoosha.net/en/flartoolkit/start-up-guide/">saqoosha.net, start-up-guide</a>로 계속 이여진다.</p>
<p>요번실험은 이미지 회전(Images Rotation)이다.<br />
<strong>Download </strong>: <a href="/flash/tutorial/flar/PV3D_ImagesRotation/PV3D_ImagesRotation.zip">소스(Source)</a>, <a href="/flash/tutorial/flar/PV3D_ImagesRotation/FLAR_Classes_20100118.zip">클래스(All APIs)</a>, <a href="/flash/tutorial/flar/GhostCorps_FLARMarker.jpg">마커(Marker)</a></p>
<p>결과물로 만든 것을 보면 아래와 같이 작동을 하는데, 이것은 방향을 체크하여 회전 변화를 적용한 것이다.</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/MuVKQXhL0Uc&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/MuVKQXhL0Uc&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>패키지 구조는 다음과 같다.</p>
<p><strong>Package</strong><br />
<strong>Class</strong> public class PV3D_ImagesRotation<br />
<strong>Inheritance</strong> <a href="http://jinustudio.com/flash/tutorial/flar/PV3D_ImagesRotation/PV3D_ImagesRotation.as">PV3D_ImagesRotation</a> → <a href="http://jinustudio.com/flash/tutorial/flar/PV3D_ImagesRotation/PV3DARApp.as">PV3DARApp</a> → <a href="http://jinustudio.com/flash/tutorial/flar/PV3D_ImagesRotation/ARAppBase.as">ARAppBase</a></p>
<p><a href="http://jinustudio.com/flash/tutorial/flar/PV3D_ImagesRotation/PV3D_ImagesRotation.as">PV3D_ImagesRotation</a> 클래스를 확인해 보면,<br />
최초에 이미지 콘텐츠를 생성하고 이미지 회전 공식을 적용시킨다.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createContent<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
	<span style="color: #000000; font-weight: bold;">var</span> src:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;&quot;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> bam:BitmapFileMaterial;
&nbsp;
	<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>; i<span style="color: #66cc66;">&lt;</span>numOfItems; i++<span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		src = <span style="color: #0066CC;">this</span>.<span style="color: #006600;">imgPath</span> + <span style="color: #0066CC;">this</span>.<span style="color: #006600;">imgs</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;
&nbsp;
		bam = <span style="color: #000000; font-weight: bold;">new</span> BitmapFileMaterial<span style="color: #66cc66;">&#40;</span>src<span style="color: #66cc66;">&#41;</span>;
		bam.<span style="color: #006600;">oneSide</span> = <span style="color: #000000; font-weight: bold;">false</span>;
&nbsp;
		bam.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FileLoadEvent.<span style="color: #006600;">LOAD_COMPLETE</span>, <span style="color: #0066CC;">this</span>.<span style="color: #006600;">onComplete</span><span style="color: #66cc66;">&#41;</span>;
		bam.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FileLoadEvent.<span style="color: #006600;">LOAD_ERROR</span>, <span style="color: #0066CC;">this</span>.<span style="color: #006600;">onError</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #000000; font-weight: bold;">var</span> p:Plane = <span style="color: #000000; font-weight: bold;">new</span> Plane<span style="color: #66cc66;">&#40;</span>bam, <span style="color: #cc66cc;">80</span>, <span style="color: #cc66cc;">80</span>, <span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
		p.<span style="color: #006600;">x</span> = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">cos</span><span style="color: #66cc66;">&#40;</span>i <span style="color: #66cc66;">*</span> angleRate<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> radius;
		p.<span style="color: #006600;">z</span> = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">sin</span><span style="color: #66cc66;">&#40;</span>i <span style="color: #66cc66;">*</span> angleRate<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> radius;
		p.<span style="color: #006600;">rotationY</span> = -<span style="color: #66cc66;">&#40;</span> i <span style="color: #66cc66;">*</span> angleRate<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">180</span> <span style="color: #66cc66;">/</span> <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">PI</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #cc66cc;">270</span>;
&nbsp;
		<span style="color: #0066CC;">this</span>.<span style="color: #006600;">primitives</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> = p;
&nbsp;
		_markerNode.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>p<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>p 객체의 x축과 z축을 사용하여 아이템들의 총 갯수(numOfItems = 10) 만큼 생성하는 것을 볼 수 있다. 그리고 추후에 모션을 적용시키기 위하여 this.primitives Array 멤버에 객체를 잘 모셔둔다.</p>
<p>마지막으로 <a href="http://jinustudio.com/blog/archives/2441">지난번 포스트</a>에서 보았던 _markerNode에 추가를 하면 끝이다.</p>
<p>자, 이제 방향에 대한 것을 체크하여 회전을 시켜야 하는데,<br />
FLARToolKit API에서 제공하는 <a href="http://www.libspark.org/browser/as3/FLARToolKit/trunk/src/org/libspark/flartoolkit/detector/FLARSingleMarkerDetector.as">FLARSingleMarkerDetector</a>.getDirection() 메서드를 이용하면 된다.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>105
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> direct:<span style="color: #0066CC;">int</span> = _detector.<span style="color: #006600;">getDirection</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> as <span style="color: #0066CC;">int</span>;</pre></td></tr></table></div>

<p>값의 리턴 구조는 아래와 같다.</p>
<p>var direct:int = _detector.getDirection() ← <a href="http://www.libspark.org/browser/as3/FLARToolKit/trunk/src/org/libspark/flartoolkit/detector/FLARSingleMarkerDetector.as">FLARSingleMarkerDetector</a>.getDirection() ← <a href="http://www.libspark.org/browser/as3/FLARToolKit/trunk/src/org/libspark/flartoolkit/core/match/FLARMatchPatt_Color_WITHOUT_PCA.as?rev=3285">FLARMatchPatt_Color_WITHOUT_PCA</a>.getDirection()</p>
<p>mirror 코드는 코멘트 처리를 해두었는데, 아래와 같이 어떻게 인식을 하는지를 체크하기 위해서이다.<br />
마커가 어느 방향을 향하고 있느냐에 따라 리턴 값이 변하기 때문이다.<br />
(순서대로 0, 1, 2, 3 int 값을 리턴한다.)</p>
<table style="height: 100%;" width="100%">
<tbody>
<tr>
<td>return 0.<a href="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_002_001_Direct0.jpg"><img src="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_002_001_Direct0-150x150.jpg" alt="" title="FLAR_SS_002_001_Direct0" width="150" height="150" class="aligncenter size-thumbnail wp-image-2578" /></a></td>
<td>return 1.<a href="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_002_001_Direct1.jpg"><img src="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_002_001_Direct1-150x150.jpg" alt="" title="FLAR_SS_002_001_Direct1" width="150" height="150" class="aligncenter size-thumbnail wp-image-2579" /></a></td>
</tr>
<tr>
<td>return 2.<a href="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_002_001_Direct2.jpg"><img src="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_002_001_Direct2-150x150.jpg" alt="" title="FLAR_SS_002_001_Direct2" width="150" height="150" class="aligncenter size-thumbnail wp-image-2580" /></a></td>
<td>return 3.<a href="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_002_001_Direct3.jpg"><img src="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_002_001_Direct3-150x150.jpg" alt="" title="FLAR_SS_002_001_Direct3" width="150" height="150" class="aligncenter size-thumbnail wp-image-2581" /></a></td>
</tr>
</tbody>
</table>
<p>개념은 좌,우(0, 3) 기울기 방향을 사용하여 아래 코드 처럼 회전 방향을 변경 시키는 코드를 만들었다.<br />
이때 0, 3이 아닐 경우는 기존의 값을 유지하여 움직임을 멈추게 한 것이다.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>103
104
105
106
107
108
109
110
111
112
113
114
115
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> repeatRender<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> direct:<span style="color: #0066CC;">int</span> = _detector.<span style="color: #006600;">getDirection</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> as <span style="color: #0066CC;">int</span>;
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>direct == <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>				rotateCnt++;
	<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>direct == <span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span>		rotateCnt--;
	<span style="color: #b1b100;">else</span>	rotateCnt = 		rotateCnt;
&nbsp;
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;## repeatRender() - direct =&quot;</span>, direct, <span style="color: #ff0000;">&quot; / rotateCnt =&quot;</span>, rotateCnt<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	JTween.<span style="color: #006600;">tween</span><span style="color: #66cc66;">&#40;</span>JProperty, <span style="color: #0066CC;">this</span>, <span style="color: #66cc66;">&#123;</span> angleX:rotateCnt <span style="color: #66cc66;">*</span> angleRate, <span style="color: #0066CC;">time</span>:<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">time</span>, onChange:<span style="color: #0066CC;">this</span>.<span style="color: #006600;">imageRender</span> <span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>;
	JTween.<span style="color: #006600;">tween</span><span style="color: #66cc66;">&#40;</span>JProperty, <span style="color: #0066CC;">this</span>, <span style="color: #66cc66;">&#123;</span> delay:<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">time</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">2</span>, onFinish:<span style="color: #0066CC;">this</span>.<span style="color: #006600;">repeatRender</span> <span style="color: #66cc66;">&#125;</span>, <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>여기서 JTween은 오래전에 직접 만든 것인데, 사용법은 <a href="http://blog.greensock.com/tweenlite/">TweenLite</a>를 참고하여 만들었기 때문에 약간 비슷하다. 이 코드를 사용하지 않을 경우, 작업자가 자주 사용하는 트윈 코드를 사용하면 될 듯 싶다.</p>
<p>자.. 이번 포스트는 여기까지로 하자. 다음에는 몇개의 샘플들을 만들어 적용시켜 보고, 3DMax의 DAE를 사용하는 것에 대해서 포스트를 작성하려 한다.</p>
<p><strong>작성 후기 :</strong><br />
코드를 보다가 방향에 대한 메서드를 보게 되었다. 그래서 그 방향의 값을 출력해 보니 0~3까지의 값을 갖는 것을 알게 되었고, 거기에서 &#8220;<strong>방향에 따라 이미지를 회전하는 것은 어떨까?</strong>&#8221; 라는 생각이 떠올랐다. 그래서 이런 콘텐츠를 실험적으로 만들어보게 되었고 FLARToolKit Tutorial을 하게 된 것이다.</p>
<p>좀 전에 아는 친구에게서 전화가 왔는데, 테두리가 없는 마커를 사용할 수 없냐는 내용이였다.<br />
호기심이 생긴다. 관련된 &#8220;camera_para.dat&#8221; 파일이 있는지 서치를 해봐야 겠다.<br />
자.. </p>
]]></content:encoded>
			<wfw:commentRss>http://jinustudio.com/blog/archives/2570/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FLAR &#8211; How to 1 : 플래시로 기본 AR 만들기.</title>
		<link>http://jinustudio.com/blog/archives/2441</link>
		<comments>http://jinustudio.com/blog/archives/2441#comments</comments>
		<pubDate>Sun, 17 Jan 2010 07:48:18 +0000</pubDate>
		<dc:creator>jin_u</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Adobe_Flash]]></category>
		<category><![CDATA[Creativity]]></category>
		<category><![CDATA[FLARToolKit]]></category>
		<category><![CDATA[AR]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[FLAR]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[marker]]></category>
		<category><![CDATA[PV3D]]></category>

		<guid isPermaLink="false">http://jinustudio.com/blog/?p=2441</guid>
		<description><![CDATA[How to Get Started with FLARToolKit. 우선, FLARToolKit과 PV3D의 기본 배경 지식을 갖추어야 한다. 나 역시 완벽하게 구현하는 것은 아니기 때문에 내가 아는 한도 내에서 이야기를 할 것이고, 포스트 작성을 통하여 개념 및 사용법을 익혀나갈 것이다. 정리도 할겸&#8230; 코드의 설명 중 PV3D의 코드는 간단한 주석만 작성 할 것이다. 좀 더 자세히 알고 싶다면 이전에 작성한 포스트를 [...]]]></description>
			<content:encoded><![CDATA[<h2><span style="color: #333399;">How to Get Started with FLARToolKit.</span></h2>
<p>우선, <a href="http://www.libspark.org/wiki/saqoosha/FLARToolKit/en">FLARToolKit</a>과 <a href="http://pv3d.org">PV3D</a>의 기본 배경 지식을 갖추어야 한다.</p>
<p>나 역시 완벽하게 구현하는 것은 아니기 때문에 내가 아는 한도 내에서 이야기를 할 것이고,<br />
포스트 작성을 통하여 개념 및 사용법을 익혀나갈 것이다. 정리도 할겸&#8230;</p>
<p>코드의 설명 중 <a href="http://pv3d.org/">PV3D</a>의 코드는 간단한 주석만 작성 할 것이다.<br />
좀 더 자세히 알고 싶다면 이전에 작성한 <a href="http://jinustudio.com/blog/archives/2422">포스트</a>를 참고하여 같이 공부해 나가길 바란다.</p>
<p>우선, 기본적으로 익히기 위해서는 간단한 샘플이 좋을 듯 싶다.<br />
&#8220;Hello World&#8221;와 같은 시작은 싫어서 이미지 한장을 준비했다. 타이포에서 그래픽으로&#8230;</p>
<p><a href="http://www.libspark.org/wiki/saqoosha/FLARToolKit/en">FLARToolKit</a>의 기본적인 구조를 이해하고,<br />
<a href="http://pv3d.org/">PV3D</a>를 사용하여 일반적인 면(PV3D의 <a href="http://www.paultondeur.com/files/papervision3d/documentation/Public_Alpha_2.0/org/papervision3d/objects/primitives/Plane.html">Plane Class</a>)을 생성하여 <a href="http://ko.wikipedia.org/wiki/%EC%A6%9D%EA%B0%95%ED%98%84%EC%8B%A4">AR</a>을 구현할 것이다.</p>
<p>이해를 돕기위해 기본 알고리즘은 <a href="http://saqoosha.net/en/flartoolkit/start-up-guide/">saqoosha.net start-up-guide</a>를 사용할 것이다.</p>
<p>시작은 기본 구조를 익힌 후, 마커를 생성하는 방법과 실습을 해보고,<br />
최종 결과물인 마커와 웹캡 간의 공간에 이미지가 생성되어있는 것을 목표로 할 예정이다.</p>
<p>이미지 한장과 마커로는 &#8220;GC&#8221; 텍스트를 이미지 마커로 만들어 패턴으로 변환하여 적용시킬 것이다.</p>
<p><strong><span style="color: #993366;">필요한 소스를 먼저 다운로드 하자.</span></strong><br />
<a href="/flash/tutorial/flar/PV3D_BitmapFileMaterial/PV3D_BitmapFileMaterial.zip">Flash Source</a>, <a href="/flash/tutorial/flar/FLAR_Classes_20100118.zip">Classes</a>, <a href="/flash/tutorial/flar/GhostCorps_FLARMarker.jpg">Marker Image</a></p>
<p><strong><span style="color: #993366;">앞으로 작업을 하기 위하여 알아야할 요소들이다.</span></strong></p>
<ol>
<li><span style="color: #993366;">카메라 파라메터 파일.</span></li>
<li><span style="color: #993366;">패턴 파일을 생성.</span></li>
<li><span style="color: #993366;">패턴 파일을 추적하는 코드 작성.</span></li>
<li><span style="color: #993366;">FLAR 기본 노드에 PaperVision3D 효과 추가.</span></li>
</ol>
<h3><span style="color: #333399;">1. 카메라 파라메터 파일.</span></h3>
<p>FLAR 콘텐츠를 생성하기 위해서는 &#8220;camera_para.dat&#8221; 파일이 필요하다. 이 파일은 바이너리 데이터 파일로서 웹캠의 렌즈 왜곡을 해결하는 정보를 포함하고 있다. 결과적으로, 생성한 마커가 웹캠에 비춰지면 분석하여 화면에 구현해주는 핵심 파일인 것이다.</p>
<h3><span style="color: #333399;">2. 패턴 파일을 생성.</span></h3>
<p>saqoosha.net 에서 <a href="http://saqoosha.net/lab/FLARToolKit/MarkerGenerator/MakerGenerator.air">MakerGenerator</a>를 Air로 만들어 두었다.<br />
내 생각이 맞다면 FLARCode는 16 x 16일 듯 하다.<br />
현재 여기서 다루는 알고리즘이 16 x 16의 코드 패턴을 갖기 때문이다.</p>
<p>어쨌든, 감사한 마음으로 우리는 사용하면 된다. 마커를 디자인하고 MakerGenerator로 패턴을 만들면 된다.</p>
<p>여러개의 패턴을 동시에 만들어주는 <a href="http://flash.tarotaro.org/blog/2009/07/12/mgo2/">이곳</a>(MGO2 : Marker”s” Generator Online Released!)도 있다.<br />
내가 주로 사용하는 곳이다.</p>
<p>MakerGenerator를 사용하여 아래 그림과 같이 패턴 파일을 생성한다.</p>
<table style="height: 100%;" width="100%">
<tbody>
<tr>
<td><a href="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_001_001.jpg"><img class="aligncenter size-thumbnail wp-image-2490" title="FLAR_SS_001_001" src="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_001_001-150x150.jpg" alt="" width="150" height="150" /></a></td>
<td><a href="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_001_002.jpg"><img class="aligncenter size-thumbnail wp-image-2491" title="FLAR_SS_001_002" src="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_001_002-150x150.jpg" alt="" width="150" height="150" /></a></td>
<td><a href="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_001_003.gif"><img class="aligncenter size-thumbnail wp-image-2489" title="FLAR_SS_001_003" src="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_001_003-150x150.gif" alt="" width="150" height="150" /></a></td>
</tr>
</tbody>
</table>
<h3><span style="color: #333399;">3. 패턴 파일을 추적하는 코드 작성.</span></h3>
<p>우선 아래와 같은 문서와 다이어그램을 살펴본 후에 코드를 살펴보자.</p>
<p><strong>API Documentation</strong> :<br />
<a href="/flash/tutorial/flar/PV3D_BitmapFileMaterial/docs/index.htm" target="_blank">PV3D_BitmapFileMaterial/docs/index.htm</a></p>
<p><strong>Basic Diagram</strong> :<br />
<a href="http://jinustudio.com/blog/wp-content/uploads/2010/01/EA2.png"><img class="alignnone size-medium wp-image-2522" title="EA2" src="http://jinustudio.com/blog/wp-content/uploads/2010/01/EA2-300x97.png" alt="" width="300" height="97" /></a></p>
<p>위 다이어그램과 같이 아래의 상속 구조로 되어있다.</p>
<p><strong>Package</strong><br />
<strong>Class</strong> public class PV3D_BitmapFileMaterial<br />
<strong>Inheritance</strong> <a href="/flash/tutorial/flar/PV3D_BitmapFileMaterial/PV3D_BitmapFileMaterial.as">PV3D_BitmapFileMaterial</a> → <a href="/flash/tutorial/flar/PV3D_BitmapFileMaterial/PV3DARApp.as">PV3DARApp</a> → <a href="/flash/tutorial/flar/PV3D_BitmapFileMaterial/ARAppBase.as">ARAppBase</a></p>
<p>여기서 주목해야 할 부분은 <a href="/flash/tutorial/flar/PV3D_BitmapFileMaterial/PV3D_BitmapFileMaterial.as">PV3D_BitmapFileMaterial</a> 클래스의 아래 코드이다.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Initalize application with the path of camera calibration file and patter definition file.</span>
<span style="color: #808080; font-style: italic;">// カメラ補正ファイルとパターン定義ファイルのファイル名を渡して初期化。</span>
addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">INIT</span>, _onInit<span style="color: #66cc66;">&#41;</span>;
init<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Data/camera_para.dat'</span>, <span style="color: #ff0000;">'Data/ghost_corps_marker.pat'</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>init(&#8230;) 메서드는 상위 PV3DARApp.as 파일에서 카메라와 마커(패턴) 파일을 분석하여 FLARToolKit에 의해 작동되게 되는 것이다. (자세한 것은 API Documentationd와 이나 다운로드 소스 파일을 열어서 확인하길 바란다.)</p>
<h3><span style="color: #333399;">4. FLAR 기본 노드에 PaperVision3D 효과 추가.</span></h3>
<p>아래 이미지를 스샷을 보면 아래와 같은 코드로 비트맵이 적용되어있다.<br />
1. z=50;<br />
2. z=50; rotationZ=90;<br />
3. z=50; rotationZ=90; rotationY=90;</p>
<table style="height: 100%;" width="100%">
<tbody>
<tr>
<td>1.<a href="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_001_004.jpg"><img class="aligncenter size-thumbnail wp-image-2495" title="FLAR_SS_001_004" src="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_001_004-150x150.jpg" alt="" width="150" height="150" /></a></td>
<td>2.<a href="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_001_005.jpg"><img class="aligncenter size-thumbnail wp-image-2496" title="FLAR_SS_001_005" src="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_001_005-150x150.jpg" alt="" width="150" height="150" /></a></td>
<td>3.<a href="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_001_006.jpg"><img class="aligncenter size-thumbnail wp-image-2494" title="FLAR_SS_001_006" src="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_SS_001_006-150x150.jpg" alt="" width="150" height="150" /></a></td>
</tr>
</tbody>
</table>
<p>소스를 먼저 확인해 보면 매우 쉽게 적용이 되는 것을 볼 수 있다.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">/**
	 * @author jin_u EUM (jin_u@jinustudio.com)
	 * @since 16/01/2010
	 * @version 1.0.0
	 */</span>
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">materials</span>.<span style="color: #006600;">BitmapFileMaterial</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">objects</span>.<span style="color: #006600;">primitives</span>.<span style="color: #006600;">Plane</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> PV3D_BitmapFileMaterial <span style="color: #0066CC;">extends</span> PV3DARApp
	<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> PV3D_BitmapFileMaterial<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;## PV3D_BitmapFileMaterial : Constructor&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Initalize application with the path of camera calibration file and patter definition file.</span>
			<span style="color: #808080; font-style: italic;">// カメラ補正ファイルとパターン定義ファイルのファイル名を渡して初期化。</span>
			addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">INIT</span>, _onInit<span style="color: #66cc66;">&#41;</span>;
			init<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Data/camera_para.dat'</span>, <span style="color: #ff0000;">'Data/ghost_corps_marker.pat'</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _onInit<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;## PV3D_ImagesRotationDirection : _onInit&quot;</span><span style="color: #66cc66;">&#41;</span>;
			removeEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">INIT</span>, _onInit<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">/** 외부 이미지 파일을 로드하여 매트리얼을 생성한다. */</span>
			<span style="color: #000000; font-weight: bold;">var</span> bam:BitmapFileMaterial = <span style="color: #000000; font-weight: bold;">new</span> BitmapFileMaterial<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;./images/image.jpg&quot;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">/** 양면을 사용 설정. */</span>
			bam.<span style="color: #006600;">oneSide</span> = <span style="color: #000000; font-weight: bold;">false</span>;
			<span style="color: #808080; font-style: italic;">/** Plane 객체에 이미지 사이즈 80 x 80, 2 x 2 세그먼트로 생성한다. */</span>
			<span style="color: #000000; font-weight: bold;">var</span> p:Plane = <span style="color: #000000; font-weight: bold;">new</span> Plane<span style="color: #66cc66;">&#40;</span>bam, <span style="color: #cc66cc;">120</span>, <span style="color: #cc66cc;">120</span>, <span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;
			p.<span style="color: #006600;">z</span> = <span style="color: #cc66cc;">50</span>;
			p.<span style="color: #006600;">rotationX</span> = <span style="color: #cc66cc;">90</span>;
			p.<span style="color: #006600;">rotationZ</span> = <span style="color: #cc66cc;">90</span>;
			<span style="color: #808080; font-style: italic;">/** 마커 패턴이 체크가 되면 추가한 객체가 보여지게 된다. */</span>
			_markerNode.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>p<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">/** 캠의 보는 시점을 반대로 설정한다. */</span>
			mirror = <span style="color: #66cc66;">!</span>mirror;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>핵심적인 부분은 _onIniit 핸들러가 시작이 될때 PV3D로 원하는 효과를 만들어 _markerNode 객체에 addChild를 시키면 끝이다.</p>
<p>보다 깊이있게 알고 싶다면, 우리가 사용한 알고리즘에서 <a href="/flash/tutorial/flar/PV3D_BitmapFileMaterial/PV3D_BitmapFileMaterial.as">PV3D_BitmapFileMaterial</a>의 상위 클래스인 <a href="/flash/tutorial/flar/PV3D_BitmapFileMaterial/PV3DARApp.as">PV3DARApp</a> → <a href="/flash/tutorial/flar/PV3D_BitmapFileMaterial/ARAppBase.as">ARAppBase</a>을 분석하여야 한다. PV3D를 사용할 줄 아는 플래셔라면 쉽게 이해를 할 수 있을 듯 싶다.</p>
<p><strong>작성 후기 :</strong><br />
이번 포스트는 정말로 알고리즘을 분석하지 않아도 원리만 이해하면,<br />
FLARToolKit을 쉽게 사용할 수 있는 것을 보여주기 위해서 작성하였다.</p>
<p>아무리 어려운 원리라도 그 원리를 전부 분석하지 않고도 이해 할 수 있다면,<br />
자신이 원하는 효과를 표현할 수 있는 것이라고 나는 생각한다.</p>
]]></content:encoded>
			<wfw:commentRss>http://jinustudio.com/blog/archives/2441/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FLARToolKit : PV3D Checking Direction</title>
		<link>http://jinustudio.com/blog/archives/2416</link>
		<comments>http://jinustudio.com/blog/archives/2416#comments</comments>
		<pubDate>Tue, 12 Jan 2010 08:46:07 +0000</pubDate>
		<dc:creator>jin_u</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Adobe_Flash]]></category>
		<category><![CDATA[Creativity]]></category>
		<category><![CDATA[FLARToolKit]]></category>
		<category><![CDATA[U.U.U.HCI]]></category>
		<category><![CDATA[AR]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[PV3D]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[userbility]]></category>
		<category><![CDATA[ux]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://jinustudio.com/blog/?p=2416</guid>
		<description><![CDATA[요번 실험은 마커의 기울기를 체크하여 회전 방향에 영향주는 콘텐츠이다. 요번 작업으로 GC(Ghost Corps)마커 생성부터 효과 적용까지 강좌(튜토리얼??)를&#8230; 그냥 나름대로 정리를 하여 글을 작성해 볼까 한다. 싱글 마커를 우선 정리하고, 멀티 마커를 정리해봐야겠다. 유투브에 올리는 것도 은근 재미있네&#8230; -_-]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/MuVKQXhL0Uc&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/MuVKQXhL0Uc&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>요번 실험은 마커의 기울기를 체크하여 회전 방향에 영향주는 콘텐츠이다.</p>
<p>요번 작업으로 GC(<a href="http://www.ghost-corps.com">Ghost Corps</a>)마커 생성부터 효과 적용까지 강좌(튜토리얼??)를&#8230; 그냥 나름대로 정리를 하여 글을 작성해 볼까 한다.</p>
<p>싱글 마커를 우선 정리하고, 멀티 마커를 정리해봐야겠다.</p>
<p><a href="http://www.youtube.com/?gl=KR&#038;hl=ko">유투브</a>에 올리는 것도 은근 재미있네&#8230; -_-</p>
]]></content:encoded>
			<wfw:commentRss>http://jinustudio.com/blog/archives/2416/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FLARToolKit : PV3D Rotation Images Movie</title>
		<link>http://jinustudio.com/blog/archives/2412</link>
		<comments>http://jinustudio.com/blog/archives/2412#comments</comments>
		<pubDate>Mon, 11 Jan 2010 15:47:34 +0000</pubDate>
		<dc:creator>jin_u</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Adobe_Flash]]></category>
		<category><![CDATA[Creativity]]></category>
		<category><![CDATA[FLARToolKit]]></category>
		<category><![CDATA[U.U.U.HCI]]></category>
		<category><![CDATA[AR]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[PV3D]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[userbility]]></category>
		<category><![CDATA[ux]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://jinustudio.com/blog/?p=2412</guid>
		<description><![CDATA[영상 퀄리티가 너무 떨어지는 듯 하여, 새로운 캠과 저번부터 연구를 목적으로 구입하려고 했던 적외선 캠을 사야 할 듯 하다. 스샷을 찍었었지만 스네그잇을 사용하여 영상으로 만들어 유투브에 올려 보았다. 조금 더 사용하다 보면 어렴풋이 알듯하다. 조금 더 준비해서 FLARToolKit 튜토리얼에 대한 글을 준비해 볼까 한다.]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/Q9LDXkuGPDY&#038;hl=ko_KR&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Q9LDXkuGPDY&#038;hl=ko_KR&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>영상 퀄리티가 너무 떨어지는 듯 하여,<br />
새로운 캠과 저번부터 연구를 목적으로 구입하려고 했던 적외선 캠을 사야 할 듯 하다.</p>
<p><a href="http://jinustudio.com/blog/archives/2395">스샷</a>을 찍었었지만 스네그잇을 사용하여 영상으로 만들어 유투브에 올려 보았다. 조금 더 사용하다 보면 어렴풋이 알듯하다.</p>
<p>조금 더 준비해서 <a href="http://www.libspark.org/wiki/saqoosha/FLARToolKit/en">FLARToolKit</a> 튜토리얼에 대한 글을 준비해 볼까 한다.</p>
]]></content:encoded>
			<wfw:commentRss>http://jinustudio.com/blog/archives/2412/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FLAR 공간 이미지 회전 : 3D Rotation Images</title>
		<link>http://jinustudio.com/blog/archives/2395</link>
		<comments>http://jinustudio.com/blog/archives/2395#comments</comments>
		<pubDate>Sun, 10 Jan 2010 12:39:53 +0000</pubDate>
		<dc:creator>jin_u</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Adobe_Flash]]></category>
		<category><![CDATA[Creativity]]></category>
		<category><![CDATA[FLARToolKit]]></category>
		<category><![CDATA[U.U.U.HCI]]></category>
		<category><![CDATA[AR]]></category>
		<category><![CDATA[asctionscript]]></category>
		<category><![CDATA[FLAR]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[PV3D]]></category>

		<guid isPermaLink="false">http://jinustudio.com/blog/?p=2395</guid>
		<description><![CDATA[공간 이미지 회전 AR 만들기. 이미지 마커는 기존에 돌고 있는 마커를 하나 사용하였다. BitmapFileMaterial로 이미지를 로딩한다. Plane이라는 primitives에 BitmapFileMaterial를 addChild 시킨다. Cube와 MaterialsList({all: PlaneArray})을 사용하여 addChild 시킨다. _markerNode에 Cube를 addChild 시켜 마커가 인식이 되면 효과를 볼 수 있다도록 처리한다. 이미지 회전을 0.7초에 한번씩 Angle X축으로 회전을 시켜 공간 느낌 비주얼을 살린다. 원래 아이디어는 FLARToolKit을 사용하여 [...]]]></description>
			<content:encoded><![CDATA[
<a href='http://jinustudio.com/blog/archives/2395/flar_rotationimages_001' title='FLAR_RotationImages_001'><img width="150" height="150" src="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_RotationImages_001-150x150.jpg" class="attachment-thumbnail" alt="FLAR_RotationImages_001" title="FLAR_RotationImages_001" /></a>
<a href='http://jinustudio.com/blog/archives/2395/flar_rotationimages_002' title='FLAR_RotationImages_002'><img width="150" height="150" src="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_RotationImages_002-150x150.jpg" class="attachment-thumbnail" alt="FLAR_RotationImages_002" title="FLAR_RotationImages_002" /></a>
<a href='http://jinustudio.com/blog/archives/2395/flar_rotationimages_003' title='FLAR_RotationImages_003'><img width="150" height="150" src="http://jinustudio.com/blog/wp-content/uploads/2010/01/FLAR_RotationImages_003-150x150.jpg" class="attachment-thumbnail" alt="FLAR_RotationImages_003" title="FLAR_RotationImages_003" /></a>

<p><strong>공간 이미지 회전 AR 만들기.</strong></p>
<ol>
<li>이미지 마커는 기존에 돌고 있는 마커를 하나 사용하였다.</li>
<li>BitmapFileMaterial로 이미지를 로딩한다.</li>
<li>Plane이라는 primitives에 BitmapFileMaterial를 addChild 시킨다.</li>
<li>Cube와 MaterialsList({all: PlaneArray})을 사용하여 addChild 시킨다.</li>
<li>_markerNode에 Cube를 addChild 시켜 마커가 인식이 되면 효과를 볼 수 있다도록 처리한다.</li>
<li>이미지 회전을 0.7초에 한번씩 Angle X축으로 회전을 시켜 공간 느낌 비주얼을 살린다.</li>
</ol>
<p>원래 아이디어는 <a href="http://www.libspark.org/wiki/saqoosha/FLARToolKit/en"> FLARToolKit</a>을 사용하여 마커(Marker)의 기울기를 계산하여 그 방향으로 회전하게 만들려고 하였으나, 사용법에 대한 분석과 이해도가 명확하지 않아서 우선은 실험적으로 자동 회전으로 만들었다.</p>
<p>좀 더 분석하여 기존에 만들었다. <a href="http://www.pv3d.org/">PV3D</a> 콘텐츠들을 적용해 볼 생각이다.<br />
여러가지 사용방법으로 접근 시도가 가능하기 때문에, 하나씩 분석하면서 아이디어 구상을 해봐야 겠다는 생각으로 머리속이 가득찼다.</p>
<p>아래는 코드는 싱글 마커 <a href="http://www.libspark.org/wiki/saqoosha/FLARToolKit/en"> FLARToolKit</a> 공개 소스를 분석하여 재구성하였다.<br />
<em>(메서드만 기재하여 전체 틀만 파악 될 수 있도록 하였다.)</em></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> PV3_RotationImages<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #808080; font-style: italic;">// Initalize application with the path of camera calibration file and patter definition file.</span>
	<span style="color: #808080; font-style: italic;">// カメラ補正ファイルとパターン定義ファイルのファイル名を渡して初期化。</span>
	addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">INIT</span>, _onInit<span style="color: #66cc66;">&#41;</span>;
	init<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Data/camera_para.dat'</span>, <span style="color: #ff0000;">'Data/flarlogo.pat'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _onInit<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> 
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">this</span>.<span style="color: #006600;">primitives</span>	= <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
	<span style="color: #0066CC;">this</span>.<span style="color: #006600;">imgPath</span>	= <span style="color: #ff0000;">&quot;./images/&quot;</span>;
	<span style="color: #0066CC;">this</span>.<span style="color: #006600;">imgs</span>		= <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;01.jpg&quot;</span>,<span style="color: #ff0000;">&quot;02.jpg&quot;</span>,<span style="color: #ff0000;">&quot;03.jpg&quot;</span>,<span style="color: #ff0000;">&quot;04.jpg&quot;</span>,<span style="color: #ff0000;">&quot;05.jpg&quot;</span>,<span style="color: #ff0000;">&quot;06.jpg&quot;</span>,<span style="color: #ff0000;">&quot;07.jpg&quot;</span>,<span style="color: #ff0000;">&quot;08.jpg&quot;</span>,<span style="color: #ff0000;">&quot;09.jpg&quot;</span>,<span style="color: #ff0000;">&quot;10.jpg&quot;</span><span style="color: #66cc66;">&#93;</span>;
	<span style="color: #0066CC;">this</span>.<span style="color: #006600;">imgLeng</span>	= <span style="color: #0066CC;">this</span>.<span style="color: #006600;">imgs</span>.<span style="color: #0066CC;">length</span>;
	<span style="color: #0066CC;">this</span>.<span style="color: #006600;">loadCount</span>	= <span style="color: #cc66cc;">0</span>;
	<span style="color: #0066CC;">this</span>.<span style="color: #006600;">isLeave</span>	= <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
	<span style="color: #0066CC;">this</span>.<span style="color: #006600;">setContent</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> setContent<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
	<span style="color: #000000; font-weight: bold;">var</span> src:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;&quot;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> bam:BitmapFileMaterial;
&nbsp;
	<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>; i<span style="color: #66cc66;">&lt;</span>numOfItems; i++<span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		src = <span style="color: #0066CC;">this</span>.<span style="color: #006600;">imgPath</span> + <span style="color: #0066CC;">this</span>.<span style="color: #006600;">imgs</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;
&nbsp;
		bam = <span style="color: #000000; font-weight: bold;">new</span> BitmapFileMaterial<span style="color: #66cc66;">&#40;</span>src<span style="color: #66cc66;">&#41;</span>;
		bam.<span style="color: #006600;">oneSide</span> = <span style="color: #000000; font-weight: bold;">false</span>;
&nbsp;
		bam.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FileLoadEvent.<span style="color: #006600;">LOAD_COMPLETE</span>, <span style="color: #0066CC;">this</span>.<span style="color: #006600;">onComplete</span><span style="color: #66cc66;">&#41;</span>;
		bam.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FileLoadEvent.<span style="color: #006600;">LOAD_ERROR</span>, <span style="color: #0066CC;">this</span>.<span style="color: #006600;">onError</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #000000; font-weight: bold;">var</span> p:Plane = <span style="color: #000000; font-weight: bold;">new</span> Plane<span style="color: #66cc66;">&#40;</span>bam, <span style="color: #cc66cc;">80</span>, <span style="color: #cc66cc;">80</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
		p.<span style="color: #006600;">x</span> = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">cos</span><span style="color: #66cc66;">&#40;</span>i <span style="color: #66cc66;">*</span> anglePer<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> radius;
		p.<span style="color: #006600;">z</span> = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">sin</span><span style="color: #66cc66;">&#40;</span>i <span style="color: #66cc66;">*</span> anglePer<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> radius;
		p.<span style="color: #006600;">rotationY</span> = -<span style="color: #66cc66;">&#40;</span> i <span style="color: #66cc66;">*</span> anglePer<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">180</span> <span style="color: #66cc66;">/</span> <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">PI</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #cc66cc;">270</span>;
		<span style="color: #0066CC;">this</span>.<span style="color: #006600;">primitives</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> = p;
&nbsp;
		_markerNode.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>p<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #0066CC;">this</span>.<span style="color: #006600;">currentCnt</span> = dest <span style="color: #66cc66;">%</span> <span style="color: #0066CC;">this</span>.<span style="color: #006600;">numOfItems</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> render<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> p:Plane;
	<span style="color: #000000; font-weight: bold;">var</span> leng:<span style="color: #0066CC;">int</span> = <span style="color: #0066CC;">this</span>.<span style="color: #006600;">primitives</span>.<span style="color: #0066CC;">length</span>;
	<span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
	<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>; i <span style="color: #66cc66;">&amp;</span>lt; leng; i++<span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		p = <span style="color: #0066CC;">this</span>.<span style="color: #006600;">primitives</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> as Plane;
&nbsp;
		p.<span style="color: #006600;">x</span> = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">cos</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>i <span style="color: #66cc66;">*</span> anglePer<span style="color: #66cc66;">&#41;</span> + angleX<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> radius;
		p.<span style="color: #006600;">z</span> = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">sin</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>i <span style="color: #66cc66;">*</span> anglePer<span style="color: #66cc66;">&#41;</span> + angleX<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> radius;
		p.<span style="color: #006600;">rotationY</span> = -<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>i <span style="color: #66cc66;">*</span> anglePer<span style="color: #66cc66;">&#41;</span> + angleX<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">180</span> <span style="color: #66cc66;">/</span> <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">PI</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #cc66cc;">270</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://jinustudio.com/blog/archives/2395/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PV3D MouseEvent Tutorial [MOUSE_LEAVE]</title>
		<link>http://jinustudio.com/blog/archives/504</link>
		<comments>http://jinustudio.com/blog/archives/504#comments</comments>
		<pubDate>Sun, 30 Nov 2008 08:42:54 +0000</pubDate>
		<dc:creator>jin_u</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[InteractiveScene3DEvent]]></category>
		<category><![CDATA[MouseEvent]]></category>
		<category><![CDATA[mouseLeave]]></category>
		<category><![CDATA[PV3D]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[VirtualMouse]]></category>

		<guid isPermaLink="false">http://jinustudio.com/blog/?p=504</guid>
		<description><![CDATA[추가 작성 [2010.07.02] 2.0 GreatWhite 버전에서만 사용된 코드이며, 이후 버전에서는 사용되지 않는 소스이다. 버전 2.1 rev920 에서 확인한 상태이며, org.papervision3d.core.utils.virtualmouse.VirtualMouse 클래스 내부의 handleUpdate 핸들러 메서드 네임으로 작동되고 있는 것을 확인하였다. 공부도 할겸 겸사겸사 분석하면서 PV3D의 기본적인 사용법에 대한 튜토리얼을 해볼까 한다. 많이 찾아보았지만 PV3D가 인기가 별로 없고, 코드가 상당히 유동적이여서 사람들에게 반감을 사는 내용을 많이 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>추가 작성 [2010.07.02]</strong></p>
<blockquote><p>2.0 GreatWhite 버전에서만 사용된 코드이며, 이후 버전에서는 사용되지 않는 소스이다.<br />
버전 2.1 rev920 에서 확인한 상태이며,<br />
org.papervision3d.core.utils.virtualmouse.VirtualMouse<br />
클래스 내부의 handleUpdate 핸들러 메서드 네임으로 작동되고 있는 것을 확인하였다.</p></blockquote>
<p>공부도 할겸 겸사겸사 분석하면서 <a href="http://pv3d.org/">PV3D</a>의 기본적인 사용법에 대한 튜토리얼을 해볼까 한다. 많이 찾아보았지만 <a href="http://pv3d.org/">PV3D</a>가 인기가 별로 없고, 코드가 상당히 유동적이여서 사람들에게 반감을 사는 내용을 많이 보았다. 그래서 <a href="http://away3d.com/">Away3D</a>를 사용하는 사람이 많은것으로 보인다. 퍼포먼스에 대해서는 <a href="http://pv3d.org/">PV3D</a>가 타 3D 엔진보다는 좀 떨어진다고 생각한다. 하지만 구조는 그래도 AS3.0에 가장 가깝지 않을까 조심스럽게 주장해 본다. 좀 더 파헤쳐 보고 경우에 따라 엔진을 사용하면 된다고 생각하기 때문에 우선 <a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk">PV3D 2.0 Great White</a>를 선택하였다.</p>
<p>현존하는 상당히 많은 오픈 소스들이 존재한다. 그 소스들을 갖고 어떻게 익히고, 응용하고, 창조해 내느냐는 개인의 역량에 달려있다고 본다. 내가 알고 싶은 것들에 대해서 튜토리얼을 하는 것이니 필요한 사람에게만 도움이 될 것이라고 생각이 든다. 어쨌든, 기존의 소스를 변경까지도 하기 때문에 업데이트를 받을때 백업을 해두어야 할 지도 모른다. ㅡㅡ;</p>
<p>요번 튜토리얼트는 기본적인 마우스 이벤트 처리에 대해서 알아 볼 것이고, <strong>최종 목표는 마우스가 플래시 플레이어를 벗어났을때 PV3D 이벤트와 연동시키는 것이 목표다.</strong> 현재 마우스가 객체에 오버한 상태에서 플래시 컨텐츠 벗어 났을때 체크를 할 수가 없다. 이 부분에 대해서 기존 코드에 추가 및 수정을 좀 할 것이다.</p>
<p>우선, 시작에 앞서 기본적인 셋팅(<strong>viewport</strong>, <strong>scene</strong>, <strong>camera</strong>, <strong>renderer</strong>)에 대한 지식은 있어야 한다. 솔직히 아직 나도 정확히 알고 있지 않다. 내부 구조를 보았지만 상당한 구조를 갖고 있어 완벽하게 알지 못한다. 완벽하게 알지 못해도 사용하는데는 전혀 문제가 되지 않으니 염려하지 않아도 된다. 자 일단 시작해 보자.</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
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> 
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.view.Viewport3D;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.<span style="color: #004993;">scenes</span>.Scene3D;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.cameras.Camera3D;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.<span style="color: #004993;">render</span>.BasicRenderEngine;
	...
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> ModifyVirtualMouse extends <span style="color: #004993;">Sprite</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> viewport<span style="color: #000000; font-weight: bold;">:</span>Viewport3D;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> scene<span style="color: #000000; font-weight: bold;">:</span>Scene3D;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> camera<span style="color: #000000; font-weight: bold;">:</span>Camera3D;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> renderer<span style="color: #000000; font-weight: bold;">:</span>BasicRenderEngine;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> ModifyVirtualMouse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.<span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">// 화면 렌더링 영역 생성.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.viewport = <span style="color: #0033ff; font-weight: bold;">new</span> Viewport3D<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">600</span>, <span style="color: #000000; font-weight:bold;">400</span>, <span style="color: #0033ff; font-weight: bold;">false</span>, <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span>.viewport<span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// 기본적으로 필요한 인스턴스로 각각의 파트를 담당한다. </span>
			<span style="color: #009900;">// 순서대로 화면, 카메라, 화면 랜더링 임.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.scene = <span style="color: #0033ff; font-weight: bold;">new</span> Scene3D<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.camera = <span style="color: #0033ff; font-weight: bold;">new</span> Camera3D<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.renderer = <span style="color: #0033ff; font-weight: bold;">new</span> BasicRenderEngine<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// 컨텐츠 셋팅.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.setContent<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		...
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onEnterFrame<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			...
&nbsp;
			<span style="color: #009900;">// 화면 랜더링</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.renderer.renderScene<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span>.scene, <span style="color: #0033ff; font-weight: bold;">this</span>.camera, <span style="color: #0033ff; font-weight: bold;">this</span>.viewport<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>이것이 기본 골격이다. 많이 보았을 것이라 예상된다. 이제 본격적으로 마우스 이벤트에 대해서 알아보자.</p>
<p><strong>org.papervision3d.events</strong> 패키지에 있는 <strong>InteractiveScene3DEvent.as</strong> 이벤트들을 사용할 수 있다. 이벤트는 아래와 같이 정의되어 있다.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> static const OBJECT_CLICK<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;mouseClick&quot;</span>;
<span style="color: #0033ff; font-weight: bold;">public</span> static const OBJECT_DOUBLE_CLICK<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;mouseDoubleClick&quot;</span>;
<span style="color: #0033ff; font-weight: bold;">public</span> static const OBJECT_OVER<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;mouseOver&quot;</span>;
<span style="color: #0033ff; font-weight: bold;">public</span> static const OBJECT_OUT<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;mouseOut&quot;</span>;
<span style="color: #0033ff; font-weight: bold;">public</span> static const OBJECT_MOVE<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;mouseMove&quot;</span>;
<span style="color: #0033ff; font-weight: bold;">public</span> static const OBJECT_PRESS<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;mousePress&quot;</span>;
<span style="color: #0033ff; font-weight: bold;">public</span> static const OBJECT_RELEASE<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;mouseRelease&quot;</span>;
<span style="color: #0033ff; font-weight: bold;">public</span> static const OBJECT_RELEASE_OUTSIDE<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;mouseReleaseOutside&quot;</span>;
<span style="color: #0033ff; font-weight: bold;">public</span> static const OBJECT_ADDED<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;objectAdded&quot;</span>;</pre></td></tr></table></div>

<p>많인 본듯한? 문자들이 보인다. 맞다 바로 AS1.0에서 사용하였던 이벤트 문자를 사용하였다. 액션스크립트의 기본적인 지식은 가추고 있다고 판단하고 설명은 넘어가겠다. AS3.0에서는 &#8220;<strong>MouseEvent.MOUSE_OVER</strong>&#8221; 라고 사용한다면 PV3D에서는 &#8220;<strong>InteractiveScene3DEvent.OBJECT_OVER</strong>&#8221; 라고 사용해야 한다. 그럼 간단하게 아래와 같이 코드를 작성해 보자. 필요한 부분에 한해서 주석을 달아두었다.</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
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> 
<span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #3f5fbf;">/**
	 * @author jin_u EUM (jin_u@jinustudio.com)
	 * @since 28/11/2008
	 */</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span>.<span style="color: #004993;">MovieClip</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span>.<span style="color: #004993;">Sprite</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">Event</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">MouseEvent</span>;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.events.InteractiveScene3DEvent;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.materials.ColorMaterial;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.view.Viewport3D;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.<span style="color: #004993;">scenes</span>.Scene3D;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.cameras.Camera3D;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.materials.ColorMaterial;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.objects.primitives.Plane;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.<span style="color: #004993;">render</span>.BasicRenderEngine;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> ModifyVirtualMouse extends <span style="color: #004993;">Sprite</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> viewport<span style="color: #000000; font-weight: bold;">:</span>Viewport3D;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> scene<span style="color: #000000; font-weight: bold;">:</span>Scene3D;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> camera<span style="color: #000000; font-weight: bold;">:</span>Camera3D;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> renderer<span style="color: #000000; font-weight: bold;">:</span>BasicRenderEngine;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> colorMaterial<span style="color: #000000; font-weight: bold;">:</span>ColorMaterial;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> primitive<span style="color: #000000; font-weight: bold;">:</span>Plane;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> ModifyVirtualMouse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.<span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">// 화면 렌더링 영역 생성.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.viewport = <span style="color: #0033ff; font-weight: bold;">new</span> Viewport3D<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">600</span>, <span style="color: #000000; font-weight:bold;">400</span>, <span style="color: #0033ff; font-weight: bold;">false</span>, <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span>.viewport<span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// 기본적으로 필요한 인스턴스로 각각의 파트를 담당한다. </span>
			<span style="color: #009900;">// 순서대로 화면, 카메라, 화면 랜더링 임.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.scene = <span style="color: #0033ff; font-weight: bold;">new</span> Scene3D<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.camera = <span style="color: #0033ff; font-weight: bold;">new</span> Camera3D<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.renderer = <span style="color: #0033ff; font-weight: bold;">new</span> BasicRenderEngine<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// 컨텐츠 셋팅.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.setContent<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> setContent<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">// 컬러 메티어리얼 크기</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">value</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">100</span>
&nbsp;
			<span style="color: #009900;">// 컬러 메티어리얼을 생성한 후 인터랙티브를 사용할 것을 선언한다.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.colorMaterial = <span style="color: #0033ff; font-weight: bold;">new</span> ColorMaterial <span style="color: #000000;">&#40;</span>0xFFFFFF<span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.colorMaterial.interactive = <span style="color: #0033ff; font-weight: bold;">true</span>;
&nbsp;
			<span style="color: #009900;">// Plane 객체를 생성하여 화면에 붙여 넣는다.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.primitive = <span style="color: #0033ff; font-weight: bold;">new</span> Plane<span style="color: #000000;">&#40;</span>colorMaterial, <span style="color: #004993;">value</span>, <span style="color: #004993;">value</span>, <span style="color: #000000; font-weight:bold;">2</span>, <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.scene.<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span>.primitive<span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// Plane 객체에 인터랙티브 마우스 오버, 아웃 이벤트를 선언한다.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.primitive.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>InteractiveScene3DEvent.OBJECT_OVER, <span style="color: #0033ff; font-weight: bold;">this</span>.onOverObject, <span style="color: #0033ff; font-weight: bold;">false</span>, <span style="color: #000000; font-weight:bold;">0</span>, <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.primitive.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>InteractiveScene3DEvent.OBJECT_OUT, <span style="color: #0033ff; font-weight: bold;">this</span>.onOutObject, <span style="color: #0033ff; font-weight: bold;">false</span>, <span style="color: #000000; font-weight:bold;">0</span>, <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// 카메라를 앞으로 -250 당긴다. 기본값은 -1000 임.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.camera.z = <span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">250</span>;
&nbsp;
			<span style="color: #009900;">// 기본적으로 사용할 이벤트를 생성한다.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.setListener<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> setListener<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">// 반복 이벤트 설정.</span>
			<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">ENTER_FRAME</span>, <span style="color: #0033ff; font-weight: bold;">this</span>.onEnterFrame, <span style="color: #0033ff; font-weight: bold;">false</span>, <span style="color: #000000; font-weight:bold;">0</span>, <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onEnterFrame<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">// 카메라 이동을 위한 설정.</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> freeX<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #004993;">mouseX</span> <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #004993;">stage</span>.<span style="color: #004993;">stageWidth</span> <span style="color: #000000; font-weight: bold;">*</span> .5;
			<span style="color: #6699cc; font-weight: bold;">var</span> freeY<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #004993;">mouseY</span> <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #004993;">stage</span>.<span style="color: #004993;">stageHeight</span> <span style="color: #000000; font-weight: bold;">*</span> .5;
			<span style="color: #6699cc; font-weight: bold;">var</span> sp<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = .05
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">this</span>.camera.<span style="color: #004993;">x</span> <span style="color: #000000; font-weight: bold;">+</span>= <span style="color: #000000;">&#40;</span>freeX <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #0033ff; font-weight: bold;">this</span>.camera.<span style="color: #004993;">x</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">*</span> sp;
			<span style="color: #0033ff; font-weight: bold;">this</span>.camera.<span style="color: #004993;">y</span> <span style="color: #000000; font-weight: bold;">+</span>= <span style="color: #000000;">&#40;</span>freeY <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #0033ff; font-weight: bold;">this</span>.camera.<span style="color: #004993;">y</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">*</span> sp;
&nbsp;
			<span style="color: #009900;">// 화면 랜더링</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.renderer.renderScene<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span>.scene, <span style="color: #0033ff; font-weight: bold;">this</span>.camera, <span style="color: #0033ff; font-weight: bold;">this</span>.viewport<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
&nbsp;
&nbsp;
		<span style="color: #3f5fbf;">/** 인터랙티브 오브젝트 오버, 아웃 이벤트 정의. */</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onOverObject<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span>InteractiveScene3DEvent = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.viewport.containerSprite.<span style="color: #004993;">buttonMode</span> = <span style="color: #0033ff; font-weight: bold;">true</span>;
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">this</span>.colorMaterial.fillColor = 0x6D4201
		<span style="color: #000000;">&#125;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onOutObject<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span>InteractiveScene3DEvent = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.viewport.containerSprite.<span style="color: #004993;">buttonMode</span> = <span style="color: #0033ff; font-weight: bold;">false</span>;
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">this</span>.colorMaterial.fillColor = 0xFFFFFF;
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p><strong>샘플 1</strong> :</p>
<p align="center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="window" /><param name="src" value="http://www.jinustudio.com/flash/tutorial/pv3d/MouseEvent/ModifyVirtualMouse_00.swf" /><embed type="application/x-shockwave-flash" width="600" height="400" src="http://www.jinustudio.com/flash/tutorial/pv3d/MouseEvent/ModifyVirtualMouse_00.swf" wmode="window"></embed></object></p>
<p>위와 같이 마우스 반응에 따라 버튼 이벤트가 발생하는 것을 볼 수 있다. 여기서 하나 집고 넘어가자. PV3D의 마우스 이벤트는 결점?이라고 해야 할지 모르겠지만 마우스 손모양에 대한 처리가 조금 난해한 점이 있다. </p>
<p>아래와 같은 코딩을 했을 경우</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>109
110
111
112
113
114
115
116
117
118
119
120
121
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #3f5fbf;">/** 인터랙티브 오브젝트 오버, 아웃 이벤트 정의. */</span>
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onOverObject<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span>InteractiveScene3DEvent = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">this</span>.viewport.containerSprite.<span style="color: #004993;">buttonMode</span> = <span style="color: #0033ff; font-weight: bold;">true</span>;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">this</span>.colorMaterial.fillColor = 0x6D4201
<span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onOutObject<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span>InteractiveScene3DEvent = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">this</span>.viewport.containerSprite.<span style="color: #004993;">buttonMode</span> = <span style="color: #0033ff; font-weight: bold;">false</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">this</span>.colorMaterial.fillColor = 0xFFFFFF;
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p><strong>샘플 1</strong>에서 마우스를 움직여 보면 알겠지만 객체에 마우스로 올때 마우스를 움직이지 않고 있으면 손모양으로 변하지 않을 것이다. <strong>샘플 1</strong>은 마우스가 객체에 오버 했을 경우 마우스가 이동해야 손모양이 나오게 설정이 되어있기 때문이다. 인터랙티브 이벤트가 오버시에 &#8220;<strong>this.viewport.containerSprite.buttonMode = true, false</strong>&#8220;를 하였기 때문이다. 만약 손 모양을 무조건 보이게 할려고 한다면 핸들러에서 &#8220;<strong>this.viewport.containerSprite.buttonMode = true, false</strong>&#8220;를 삭제한 후에 &#8220;<strong>init()</strong>&#8221; 메소드에 &#8220;<strong>buttonMode</strong>&#8221; 를 추가 하면 된다. 아래 코드는 변경된 부분만을 보여주고 있다.</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
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> 
<span style="color: #000000;">&#123;</span>
&nbsp;
	...
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> ModifyVirtualMouse extends <span style="color: #004993;">Sprite</span>
	<span style="color: #000000;">&#123;</span>
		...
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> ModifyVirtualMouse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.<span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			...
&nbsp;
			<span style="color: #009900;">// 버튼 모드 활성.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.viewport.containerSprite.<span style="color: #004993;">buttonMode</span> = <span style="color: #0033ff; font-weight: bold;">true</span>;
&nbsp;
			...
		<span style="color: #000000;">&#125;</span>
&nbsp;
		...
&nbsp;
		<span style="color: #3f5fbf;">/** 인터랙티브 오브젝트 오버, 아웃 이벤트 정의. */</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onOverObject<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span>InteractiveScene3DEvent = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.colorMaterial.fillColor = 0x6D4201
		<span style="color: #000000;">&#125;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onOutObject<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span>InteractiveScene3DEvent = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.colorMaterial.fillColor = 0xFFFFFF;
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p><strong>샘플 2</strong> :</p>
<p align="center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="window" /><param name="src" value="http://www.jinustudio.com/flash/tutorial/pv3d/MouseEvent/ModifyVirtualMouse_01.swf" /><embed type="application/x-shockwave-flash" width="600" height="400" src="http://www.jinustudio.com/flash/tutorial/pv3d/MouseEvent/ModifyVirtualMouse_01.swf" wmode="window"></embed></object></p>
<p><strong>샘플 2</strong>에서 보는 것과 같이 마우스를 이동하고 객체가 마우스에 오버되자마자 바로 손모양이 나오게 될 것이다. 자, 이와 같이 두가지의 경우를 사용하는데 이것은 작업자가 결정해야 할 문제인 것이다. 만약 <strong>샘플 2</strong>와 같이 한다면, 내가 원하지 않는 곳까지 마우스 오버가 되는 경우가 발생 할 수도 있다는 점을 인지하여야 한다. </p>
<p>마지막으로, 최종 목표인 마우스가 플래시 플레이어 밖으로 나갔을 때 PV3D 이벤트와 연동하는 것을 만들어 보겠다. 우선 위 <strong>샘플 2</strong>에서 중심점에서 아래로 마우스를 내려보길 바란다. 어떤가? 마우스가 플레이어 밖으로 나갔는데도 비활성화인 흰색으로 컨텐츠가 변하지 않는 것을 확인 할 수 있을 것이다. 이것은 PV3D의 마우스 이벤트의 오류라고 할 수는 없다. 그 기능이 없기 때문이다. 그래서 이 튜토리얼을 만든 것이다. 그럼 이제 코드를 변경 하겠다. </p>
<p>우선 추가 및 수정을 해야 하는 부분이 있다. 아래 파일을 열어 &#8220;<strong>mouseLeave</strong>&#8221; 라는 public 프로퍼티를 하나 추가하고 &#8220;<strong>handleEnterFrame(e:Event)</strong>&#8221; 메소드에 &#8220;<strong>mouseLeave</strong>&#8221; 에 대해서 추가 및 변경을 한다.</p>
<p>open file : org.papervision3d.core.utils.<strong>InteractiveSceneManager</strong></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
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> org.papervision3d.core.utils
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> ...
&nbsp;
	<span style="color: #3f5fbf;">/**
	* @author John Grden
	*/</span>
&nbsp;
	<span style="color: #3f5fbf;">/** 
	* @modifier jin_u EUM : jinustudio.com : 30/11/2008
	* 
	* @added property
	* 		- mouseLeave:Boolean
	* 
	* @modify method
	* 		- handleEnterFrame(e:Event):void
	*/</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> InteractiveSceneManager extends <span style="color: #004993;">EventDispatcher</span>
	<span style="color: #000000;">&#123;</span>
&nbsp;
		...
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">mouseLeave</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span> = <span style="color: #0033ff; font-weight: bold;">false</span>;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> InteractiveSceneManager<span style="color: #000000;">&#40;</span>viewport<span style="color: #000000; font-weight: bold;">:</span>Viewport3D<span style="color: #000000;">&#41;</span> 
		<span style="color: #000000;">&#123;</span>
			...
		<span style="color: #000000;">&#125;</span>
&nbsp;
		...
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> handleEnterFrame<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">mouseLeave</span><span style="color: #000000;">&#41;</span> 
			<span style="color: #000000;">&#123;</span>
				handleMouseOut<span style="color: #000000;">&#40;</span>currentMouseDO3D<span style="color: #000000;">&#41;</span>;
&nbsp;
				<span style="color: #0033ff; font-weight: bold;">return</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
			...
		<span style="color: #000000;">&#125;</span>
&nbsp;
		...
&nbsp;
	<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>위 코드에서 변경 된 부분만을 보여준것이다. 자 이제 준비는 되었다. 위의 &#8220;<strong>InteractiveSceneManager.as</strong>&#8221; 클래스의 역할은 네이밍으로도 충분히 알 수 있듯이 인터랙티브를 담당하는 클래스이다. &#8220;<strong>handleEnterFrame(e:Event)</strong>&#8221; 메소드는 반복 수행을 하면서 가상 마우스와 컨텐츠들간의 인터렉션을 적용시키는데 그 부분을 마우스 이벤트에서 아웃 이벤트만을 따로 제어하게 한 것이다. 이러므로써 마우스가 컨텐츠에 플래시 컨텐츠 마지막 부분에 걸여있는 상태에서 아웃을 하여도 이벤트를 전달하여 처리하게 된다. 또는 컨텐츠가 영역 밖에 있을 경우 플레이어를 나가게 되면 가상 마우스가 그 위치에 존재해서 다른 객체들에게 영향을 끼치게 되는데 그 부분도 해결을 해주게 된다.</p>
<p>그럼 이제 마무리 코드를 보자.</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
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> 
<span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #3f5fbf;">/**
	 * @author jin_u EUM (jin_u@jinustudio.com)
	 * @since 30/11/2008
	 */</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span>.<span style="color: #004993;">MovieClip</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span>.<span style="color: #004993;">Sprite</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">Event</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">MouseEvent</span>;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.events.InteractiveScene3DEvent;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.materials.ColorMaterial;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.view.Viewport3D;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.<span style="color: #004993;">scenes</span>.Scene3D;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.cameras.Camera3D;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.materials.ColorMaterial;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.objects.primitives.Plane;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.<span style="color: #004993;">render</span>.BasicRenderEngine;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> ModifyVirtualMouse extends <span style="color: #004993;">Sprite</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> viewport<span style="color: #000000; font-weight: bold;">:</span>Viewport3D;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> scene<span style="color: #000000; font-weight: bold;">:</span>Scene3D;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> camera<span style="color: #000000; font-weight: bold;">:</span>Camera3D;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> renderer<span style="color: #000000; font-weight: bold;">:</span>BasicRenderEngine;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> colorMaterial<span style="color: #000000; font-weight: bold;">:</span>ColorMaterial;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> primitive<span style="color: #000000; font-weight: bold;">:</span>Plane;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> isLeave<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span>;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> ModifyVirtualMouse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.<span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">// 마우스가 플레이어를 벗어났는지를 살핀다. ( true = 벗어남 )</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.isLeave = <span style="color: #0033ff; font-weight: bold;">true</span>;			
&nbsp;
			<span style="color: #009900;">// 화면 렌더링 영역 생성.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.viewport = <span style="color: #0033ff; font-weight: bold;">new</span> Viewport3D<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">600</span>, <span style="color: #000000; font-weight:bold;">400</span>, <span style="color: #0033ff; font-weight: bold;">false</span>, <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span>.viewport<span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// 기본적으로 필요한 인스턴스로 각각의 파트를 담당한다. </span>
			<span style="color: #009900;">// 순서대로 화면, 카메라, 화면 랜더링 임.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.scene = <span style="color: #0033ff; font-weight: bold;">new</span> Scene3D<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.camera = <span style="color: #0033ff; font-weight: bold;">new</span> Camera3D<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.renderer = <span style="color: #0033ff; font-weight: bold;">new</span> BasicRenderEngine<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// 버튼 모드 활성.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.viewport.containerSprite.<span style="color: #004993;">buttonMode</span> = <span style="color: #0033ff; font-weight: bold;">true</span>;
&nbsp;
			<span style="color: #009900;">// 컨텐츠 셋팅.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.setContent<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> setContent<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">// 컬러 메티어리얼 크기</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">value</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">100</span>
&nbsp;
			<span style="color: #009900;">// 컬러 메티어리얼을 생성한 후 인터랙티브를 사용할 것을 선언한다.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.colorMaterial = <span style="color: #0033ff; font-weight: bold;">new</span> ColorMaterial <span style="color: #000000;">&#40;</span>0xFFFFFF<span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.colorMaterial.interactive = <span style="color: #0033ff; font-weight: bold;">true</span>;
&nbsp;
			<span style="color: #009900;">// Plane 객체를 생성하여 화면에 붙여 넣는다.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.primitive = <span style="color: #0033ff; font-weight: bold;">new</span> Plane<span style="color: #000000;">&#40;</span>colorMaterial, <span style="color: #004993;">value</span>, <span style="color: #004993;">value</span>, <span style="color: #000000; font-weight:bold;">2</span>, <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.scene.<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span>.primitive<span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// Plane 객체에 인터랙티브 마우스 오버, 아웃 이벤트를 선언한다.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.primitive.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>InteractiveScene3DEvent.OBJECT_OVER, <span style="color: #0033ff; font-weight: bold;">this</span>.onOverObject, <span style="color: #0033ff; font-weight: bold;">false</span>, <span style="color: #000000; font-weight:bold;">0</span>, <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.primitive.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>InteractiveScene3DEvent.OBJECT_OUT, <span style="color: #0033ff; font-weight: bold;">this</span>.onOutObject, <span style="color: #0033ff; font-weight: bold;">false</span>, <span style="color: #000000; font-weight:bold;">0</span>, <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// 카메라를 앞으로 -200 당긴다. 기본값은 -1000 임.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.camera.z = <span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">200</span>;
&nbsp;
			<span style="color: #009900;">// 기본적으로 사용할 이벤트를 생성한다.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.setListener<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> setListener<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">// 반복 이벤트 설정.</span>
			<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">ENTER_FRAME</span>, <span style="color: #0033ff; font-weight: bold;">this</span>.onEnterFrame, <span style="color: #0033ff; font-weight: bold;">false</span>, <span style="color: #000000; font-weight:bold;">0</span>, <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #009900;">// 플레이어를 벗어나면 발생하는 이벤트 설정.</span>
			<span style="color: #004993;">stage</span>.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">MOUSE_LEAVE</span>, <span style="color: #0033ff; font-weight: bold;">this</span>.onLeaveStage, <span style="color: #0033ff; font-weight: bold;">false</span>, <span style="color: #000000; font-weight:bold;">0</span>, <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #009900;">// 마우스 이동 이벤트 설정.</span>
			<span style="color: #004993;">stage</span>.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">MouseEvent</span>.<span style="color: #004993;">MOUSE_MOVE</span>, <span style="color: #0033ff; font-weight: bold;">this</span>.onMoveStage, <span style="color: #0033ff; font-weight: bold;">false</span>, <span style="color: #000000; font-weight:bold;">0</span>, <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onEnterFrame<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">// 카메라 이동을 위한 설정.</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> freeX<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #004993;">mouseX</span> <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #004993;">stage</span>.<span style="color: #004993;">stageWidth</span> <span style="color: #000000; font-weight: bold;">*</span> .5;
			<span style="color: #6699cc; font-weight: bold;">var</span> freeY<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #004993;">mouseY</span> <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #004993;">stage</span>.<span style="color: #004993;">stageHeight</span> <span style="color: #000000; font-weight: bold;">*</span> .5;
			<span style="color: #6699cc; font-weight: bold;">var</span> centerValue<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000;">&#40;</span><span style="color: #004993;">stage</span>.<span style="color: #004993;">stageWidth</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span> <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #004993;">stage</span>.<span style="color: #004993;">stageWidth</span> <span style="color: #000000; font-weight: bold;">*</span> .5 <span style="color: #000000;">&#41;</span>;
			<span style="color: #6699cc; font-weight: bold;">var</span> sp<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = .05
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight: bold;">!</span><span style="color: #0033ff; font-weight: bold;">this</span>.isLeave<span style="color: #000000;">&#41;</span>
			<span style="color: #000000;">&#123;</span>
				<span style="color: #009900;">// 마우스가 플레이어를 벗어나지 않았다면 카메라 이동.</span>
				<span style="color: #0033ff; font-weight: bold;">this</span>.camera.<span style="color: #004993;">x</span> <span style="color: #000000; font-weight: bold;">+</span>= <span style="color: #000000;">&#40;</span>freeX <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #0033ff; font-weight: bold;">this</span>.camera.<span style="color: #004993;">x</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">*</span> sp;
				<span style="color: #0033ff; font-weight: bold;">this</span>.camera.<span style="color: #004993;">y</span> <span style="color: #000000; font-weight: bold;">+</span>= <span style="color: #000000;">&#40;</span>freeY <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #0033ff; font-weight: bold;">this</span>.camera.<span style="color: #004993;">y</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">*</span> sp;
			<span style="color: #000000;">&#125;</span>
			<span style="color: #0033ff; font-weight: bold;">else</span>
			<span style="color: #000000;">&#123;</span>
				<span style="color: #009900;">// 마우스가 벗어나면 카메라를 가운데로 이동.</span>
				<span style="color: #0033ff; font-weight: bold;">this</span>.camera.<span style="color: #004993;">x</span> <span style="color: #000000; font-weight: bold;">+</span>= <span style="color: #000000;">&#40;</span>centerValue <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #0033ff; font-weight: bold;">this</span>.camera.<span style="color: #004993;">x</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">*</span> sp;
				<span style="color: #0033ff; font-weight: bold;">this</span>.camera.<span style="color: #004993;">y</span> <span style="color: #000000; font-weight: bold;">+</span>= <span style="color: #000000;">&#40;</span>centerValue <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #0033ff; font-weight: bold;">this</span>.camera.<span style="color: #004993;">y</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">*</span> sp;
			<span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #009900;">// 화면 랜더링</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.renderer.renderScene<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span>.scene, <span style="color: #0033ff; font-weight: bold;">this</span>.camera, <span style="color: #0033ff; font-weight: bold;">this</span>.viewport<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
&nbsp;
&nbsp;
		<span style="color: #3f5fbf;">/** 인터랙티브 오브젝트 오버, 아웃 이벤트 정의. */</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onOverObject<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span>InteractiveScene3DEvent = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.colorMaterial.fillColor = 0x6D4201;
		<span style="color: #000000;">&#125;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onOutObject<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span>InteractiveScene3DEvent = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.colorMaterial.fillColor = 0xFFFFFF;
		<span style="color: #000000;">&#125;</span>
&nbsp;
&nbsp;
&nbsp;
		<span style="color: #3f5fbf;">/** 마우스가 플레이어를 벗어나면 발생하는 이벤트. */</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onLeaveStage<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">// 마우스가 벗어남을 입력.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.isLeave = <span style="color: #0033ff; font-weight: bold;">true</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.viewport.interactiveSceneManager.<span style="color: #004993;">mouseLeave</span> = <span style="color: #0033ff; font-weight: bold;">true</span>;
&nbsp;
			<span style="color: #009900;">// 마우스 이동 이벤트 설정.</span>
			<span style="color: #004993;">stage</span>.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">MouseEvent</span>.<span style="color: #004993;">MOUSE_MOVE</span>, <span style="color: #0033ff; font-weight: bold;">this</span>.onMoveStage, <span style="color: #0033ff; font-weight: bold;">false</span>, <span style="color: #000000; font-weight:bold;">0</span>, <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
		<span style="color: #3f5fbf;">/** 마우스가 이동하면 발생하는 이벤트. */</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onMoveStage<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">MouseEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">// 마우스가 벗어나지 않음을 입력.</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.isLeave = <span style="color: #0033ff; font-weight: bold;">false</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.viewport.interactiveSceneManager.<span style="color: #004993;">mouseLeave</span> = <span style="color: #0033ff; font-weight: bold;">false</span>;
&nbsp;
			<span style="color: #009900;">// 마우스 이동 이벤트 제거.</span>
			<span style="color: #004993;">stage</span>.<span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">MouseEvent</span>.<span style="color: #004993;">MOUSE_MOVE</span>, <span style="color: #0033ff; font-weight: bold;">this</span>.onMoveStage<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p><strong>샘플 3</strong> :</p>
<p align="center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="window" /><param name="src" value="http://www.jinustudio.com/flash/tutorial/pv3d/MouseEvent/ModifyVirtualMouse.swf" /><embed type="application/x-shockwave-flash" width="600" height="400" src="http://www.jinustudio.com/flash/tutorial/pv3d/MouseEvent/ModifyVirtualMouse.swf" wmode="window"></embed></object></p>
<p>위 소스에서 추가된 것들을 살펴 보길 바란다. <strong>샘플 3</strong>에서 마우스를 가운데 아래쪽으로 이동을 한 후에 객체에 마우스 오버시에 컨텐츠 밖으로 빠져나가 보고, 마우스를 가운데 하단 마지막 아슬아슬하게 둔 상태에 두면 객체가 하단으로 사라지는데 그때, 마우스를 밖으로 나가면 가상 마우스의 위치가 기존 같았으면 거기에 존재해서 오버 이벤트를 발생하였으나 그 부분까지 처리가 된 것을 확인 할 수 있을 것이다.</p>
<p>정리를 해보면, PV3D는 인터랙티브를 설정했을 경우 가상마우스(VirtualMouse)가 마우스를 따라 다니면서 Hit 영역을 찾아서 처리를 한다. 그래서 마우스를 확~ 움직여서 컨텐츠 밖으로 벗어났을 경우 이 부분에 대해서 처리가 안되는 것이다. 플래시 역시 마우스 작동이 그와 비슷한 경우를 발생 시킬 수 있는데, 이것은 작업자가 처리를 해줘야 하는 이벤트인것이다.</p>
<p>이 튜토리얼로 이벤트 처리에 도움이 되길 바란다. 마지막으로 이미지를 적용한 샘플을 보자.</p>
<p align="center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="window" /><param name="src" value="http://www.jinustudio.com/flash/tutorial/pv3d/MouseEvent/ImageCamera.swf" /><embed type="application/x-shockwave-flash" width="600" height="400" src="http://www.jinustudio.com/flash/tutorial/pv3d/MouseEvent/ImageCamera.swf" wmode="window"></embed></object></p>
<p><a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk">PV3D 2.0 Great White</a> 업데이트가 되었다.</p>
]]></content:encoded>
			<wfw:commentRss>http://jinustudio.com/blog/archives/504/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>3D Wall PRO example</title>
		<link>http://jinustudio.com/blog/archives/484</link>
		<comments>http://jinustudio.com/blog/archives/484#comments</comments>
		<pubDate>Fri, 28 Nov 2008 23:19:39 +0000</pubDate>
		<dc:creator>jin_u</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[U.U.U.HCI]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[PV3D]]></category>
		<category><![CDATA[wall]]></category>

		<guid isPermaLink="false">http://jinustudio.com/blog/?p=484</guid>
		<description><![CDATA[3D Wall Prop 샘플 기능은 양면의 이미지와 비디오 컨텐츠를 중앙에서 360도 회전되면서 보게 만든 벽모양의 효과다. 아래 샘플 역시 이와 같은 기능으로 형태들만 다를뿐이다.   예전에도 글을 작성하려고 했었는데 잊어버렸었다가 PV3D 효과들에 대한 리서치 중에 다시 보게 되어서 글을 작성하였다. 좀 더 훑어 보면 위의 효과들도 어렵지 않게 구현이 가능할꺼 같다. 카메라 회전과 줌의 효과로 [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.flashloaded.com/flashcomponents/3dwall/images/3dwallpro.jpg" border="0" alt="Papervision3D" width="680" height="150" /></p>
<p><a href="http://www.flashloaded.com/flashcomponents/3dwall/">3D Wall Prop</a> 샘플 기능은 양면의 이미지와 비디오 컨텐츠를 중앙에서 360도 회전되면서 보게 만든 벽모양의 효과다. 아래 샘플 역시 이와 같은 기능으로 형태들만 다를뿐이다.</p>
<p> </p>
<p><a href="http://www.flashloaded.com/flashcomponents/3dwall/example1.html"><img class="alignleft" style="border: 0px initial initial;" title="360° INSIDE CURVATURE" src="http://www.flashloaded.com/flashcomponents/3dwall/images/1.jpg" border="0" alt="Papervision3D" width="190" height="150" /></a><a href="http://www.flashloaded.com/flashcomponents/3dwall/example2.html"><img class="alignleft" style="border: 0px initial initial;" title="FLAT WALL" src="http://www.flashloaded.com/flashcomponents/3dwall/images/2.jpg" border="0" alt="Flash gallery" width="190" height="150" /></a><a href="http://www.flashloaded.com/flashcomponents/3dwall/example3.html"><img title="CAROUSEL LAYOUT WITH TILT" src="http://www.flashloaded.com/flashcomponents/3dwall/images/3.jpg" border="0" alt="Photo gallery" width="190" height="150" /></a></p>
<p><a href="http://www.flashloaded.com/flashcomponents/3dwall/example4.html"><img class="alignleft" style="border: 0px initial initial;" title="CYLINDER LAYOUT WITH TILT" src="http://www.flashloaded.com/flashcomponents/3dwall/images/4.jpg" border="0" alt="Image gallery" width="190" height="150" /></a><a href="http://www.flashloaded.com/flashcomponents/3dwall/example5.html"><img class="alignleft" style="border: 0px initial initial;" title="120° OUTSIDE CURVATURE" src="http://www.flashloaded.com/flashcomponents/3dwall/images/5.jpg" border="0" alt="3D Flash" width="190" height="150" /></a><a href="http://www.flashloaded.com/flashcomponents/3dwall/example6.html"><img title="180° INSIDE CURVATURE" src="http://www.flashloaded.com/flashcomponents/3dwall/images/6.jpg" border="0" alt="Flash 3D Wall" width="190" height="150" /></a></p>
<p>예전에도 글을 작성하려고 했었는데 잊어버렸었다가 <a href="http://pv3d.org/">PV3D</a> 효과들에 대한 리서치 중에 다시 보게 되어서 글을 작성하였다. 좀 더 훑어 보면 위의 효과들도 어렵지 않게 구현이 가능할꺼 같다. 카메라 회전과 줌의 효과로 &#8220;360° INSIDE CURVATURE : 360도 안쪽 뒤틀림&#8221; 효과를 적용해 봐야 겠다.</p>
]]></content:encoded>
			<wfw:commentRss>http://jinustudio.com/blog/archives/484/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Papervision3D Simplified</title>
		<link>http://jinustudio.com/blog/archives/256</link>
		<comments>http://jinustudio.com/blog/archives/256#comments</comments>
		<pubDate>Fri, 14 Nov 2008 15:52:04 +0000</pubDate>
		<dc:creator>jin_u</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Creativity]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[exciting]]></category>
		<category><![CDATA[Interactive]]></category>
		<category><![CDATA[PV3D]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://jinustudio.com/blog/?p=256</guid>
		<description><![CDATA[Papervision3D Simplified : 간략하게 보는 페이퍼비전 3D Seb Lee-Delisle &#8211; Papervision3D Simplified from Peter Elst on Vimeo. 환상적이라는 말로도 표현이 안된다. 예전에 내가 했던것들은 이제 잊어먹고 새로운 아이디어 및 효과에 좀 더 압박을 가해줘야 겠다는 생각뿐이다. 더 열심히 해야 겠다는 생각뿐이다.]]></description>
			<content:encoded><![CDATA[<p>Papervision3D Simplified : 간략하게 보는 페이퍼비전 3D</p>
<p align="center"><object width="400" height="302"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=1872932&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=1872932&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="302"></embed></object><br /><a href="http://vimeo.com/1872932">Seb Lee-Delisle &#8211; Papervision3D Simplified</a> from <a href="http://vimeo.com/user433078">Peter Elst</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>환상적이라는 말로도 표현이 안된다. 예전에 내가 했던것들은 이제 잊어먹고 새로운 아이디어 및 효과에 좀 더 압박을 가해줘야 겠다는 생각뿐이다. 더 열심히 해야 겠다는 생각뿐이다.</p>
]]></content:encoded>
			<wfw:commentRss>http://jinustudio.com/blog/archives/256/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PV3D 사용하기 위한 기본 셋팅법</title>
		<link>http://jinustudio.com/blog/archives/125</link>
		<comments>http://jinustudio.com/blog/archives/125#comments</comments>
		<pubDate>Sun, 09 Nov 2008 03:32:15 +0000</pubDate>
		<dc:creator>jin_u</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[PV3D]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://jinustudio.com/blog/?p=125</guid>
		<description><![CDATA[이 포스트는 &#8220;PV3D&#8220;를 사용해 본 적이 없는 유저를 위한 것이고, 국외에서 많이 진행되고 있는 것들을 보여주기 위한 것이다. 내 블러그를 찾는 분들은 알겠지만 요즘 &#8220;PV3D&#8220;을 사용해서 상당히 많은 작업을 하고 있는 것을 알고 있을 것이다. CS4에서 지원되는 &#8220;PV3D&#8221; 엔진은 쓸만하지만 개인적인 생각으로는 많은 기능을 제공하고 있지 않고 일부 간단한 기능 정도로 넣어 둔 것이라는 판단이다. 대단한 발전이라는 [...]]]></description>
			<content:encoded><![CDATA[<p>이 포스트는 &#8220;<a href="http://blog.papervision3d.org/">PV3D</a>&#8220;를 사용해 본 적이 없는 유저를 위한 것이고, 국외에서 많이 진행되고 있는 것들을 보여주기 위한 것이다.</p>
<p>내 블러그를 찾는 분들은 알겠지만 요즘 &#8220;<a href="http://blog.papervision3d.org/">PV3D</a>&#8220;을 사용해서 상당히 많은 작업을 하고 있는 것을 알고 있을 것이다. CS4에서 지원되는 &#8220;<a href="http://blog.papervision3d.org/">PV3D</a>&#8221; 엔진은 쓸만하지만 개인적인 생각으로는 많은 기능을 제공하고 있지 않고 일부 간단한 기능 정도로 넣어 둔 것이라는 판단이다. 대단한 발전이라는 것은 사실이다.</p>
<p>CS4의 3D 효과를 잘만 사용하면 훌륭한 연출은 가능하지만 더 많은 효과를 원한다면 한계를 느낄 것이다. 그래서 &#8220;<a href="http://blog.papervision3d.org/">PV3D</a>&#8220;의 기초적인 사용법에 대한 부분을 약간 정리를 해볼까 한다.</p>
<p>우선, PV3D 소스에 접근을 해서 공유를 해야 하는데 공유를 하기 위해서는 SVN을 사용해야 한다.<br />
SVN을 사용해서 연결하는 법에 대해서 배워보자. 지금 우리는 PV3D 2.0 (codename &#8211; Great White)에 대한 부분을 공유하여 소스를 내 폴더에 갖고 올 것이다.</p>
<blockquote><p>PV3D 소스를 내 컴퓨터와 동기화 시키기<br />
1. PV3D와 동기화를 하기 위해 TortoiseSVN을 설치를 한다.<br />
(<a href="http://tortoisesvn.net/downloads">http://tortoisesvn.net/downloads</a> :: 다운로드 및 인스톨)<br />
2. 설치를 하면 내가 동기화 시키고자 하는 폴더에서 우측 버튼을 눌러 새로 생긴 &#8220;SVN Checkout&#8230;&#8221;을 선택하고, 새로 열린 &#8220;CheckOut&#8221;창에서 &#8220;URL of repository:&#8221;에 아래의 주소를 입력하고 &#8220;OK&#8221;를 클릭한다.<br />
(<a href="http://papervision3d.googlecode.com/svn/trunk/">http://papervision3d.googlecode.com/svn/trunk/</a>)<br />
3. 아래와 같은 창이 열리면서 모든 파일을 내가 지정한 폴더로 옮겨온다.</p></blockquote>
<p><a href="http://jinustudio.com/blog/wp-content/uploads/2008/11/pv3_checkout_finish.png"><img class="size-full wp-image-126 aligncenter" title="pv3_checkout_finish" src="http://jinustudio.com/blog/wp-content/uploads/2008/11/pv3_checkout_finish.png" alt="" width="500" height="223" /></a><br />
마지막으로, 다운받은 폴더를 플래시 글로벌 패스에 연결을 하여 사용하면 된다. 샘플은 &#8220;examples&#8221; 폴더에 있고 그 곳에서 코드를 보면서 따라해보면 된다.</p>
<p>이 글은 한글로 약간의 도움을 주기 위한 글이다. 아래로 가서 보다 자세히 살펴보면 좋을 것이다.<br />
<a href="http://content.madvertices.com/articles/PV3DTraining/default.htm">http://content.madvertices.com/articles/PV3DTraining/default.htm</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jinustudio.com/blog/archives/125/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PV3D를 사용한 배너 효과</title>
		<link>http://jinustudio.com/blog/archives/117</link>
		<comments>http://jinustudio.com/blog/archives/117#comments</comments>
		<pubDate>Fri, 07 Nov 2008 14:52:41 +0000</pubDate>
		<dc:creator>jin_u</dc:creator>
				<category><![CDATA[Project]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Interactive]]></category>
		<category><![CDATA[mallshinsegae]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[PV3D]]></category>
		<category><![CDATA[shinsegae]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://jinustudio.com/blog/?p=117</guid>
		<description><![CDATA[&#8220;효과 보기&#8221; 요번에 메인 프로젝트 들어가기 전에 짬을 내서 작업한 것으로 &#8220;신세계몰&#8221; 하단에 위치한 플래시 컨텐츠 이다. 쇼핑몰 하단에 위치 한다는 것은 비중이 적다는 의미를 갖는다. 수익이 많은 것이 상단에 있는게 당연한 것이다. 하지만 난 하단에 있다고 해서 단순하게 작업하지는 않았다. 나만의 작업 스타일 이기도 하다. 간단한 거지만 열정을 갖고 작업하는건 &#8220;내가 만든것이니깐!&#8221; 아주 단순한 [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><img class="aligncenter" src="http://jinustudio.com/blog/wp-content/uploads/2008/11/mainspecialshop.jpg" alt="" width="615" height="89" /></p>
<p>&#8220;<a href="http://www.jinustudio.com/portfolio/ShinsegaeMall/MainSpecialShop/MainSpecialShop.html">효과 보기</a>&#8221;</p>
<p>요번에 메인 프로젝트 들어가기 전에 짬을 내서 작업한 것으로 &#8220;<a href="http://mall.shinsegae.com/main/mallmain.do?method=initMallMain">신세계몰</a>&#8221; 하단에 위치한 플래시 컨텐츠 이다. 쇼핑몰 하단에 위치 한다는 것은 비중이 적다는 의미를 갖는다. 수익이 많은 것이 상단에 있는게 당연한 것이다. 하지만 난 하단에 있다고 해서 단순하게 작업하지는 않았다. </p>
<p>나만의 작업 스타일 이기도 하다. 간단한 거지만 열정을 갖고 작업하는건 &#8220;<strong>내가 만든것이니깐!</strong>&#8221; 아주 단순한 동기다. 메인 상단에 있는 GNB나 &#8220;<a href="http://mall.shinsegae.com/main/departmentmain.do?method=departmentMain&#038;area=global^11033^">백화점 메인</a>&#8220;과도 같은 시간을 투자하여 작업했다. 시간이 남아 돌아서? 절대 아니다 내가 잠 잘 시간을 아껴가면서 작업을 하여 3가지의 프로토타입을 만들었고 그 중에 제일 마음에 드는 것을 올린 것이다.</p>
<p>나에겐 플래시 작업이란 중요하지 않은게 없다. 비중이 없다고 판단하고 있는 것도 시간을 투자하여 비중 있게 만드는 것이 내가 중요하게 여기는 것 중에 하나이다. &#8220;<strong>더 비중이 높은 것에 시간을 더 투자해야지?</strong>&#8220;라는 말하는 사람도 있지만 나한테는 모든 것이 비중이 높다. </p>
<p>이 작업을 하면서 더 좋았던 것은 비중이 적다고 사람들이 생각하기 때문에 내가 원하는데로 작업을 할 수가 있었다. 나한테 기대하는 것이 부담스럽기도 했지만&#8230; 어쨌든, 한마디로 표현 한다면 내 멋대로 만들면 된다는 것이였다. 어쨌든, 이것이야 말로 내겐 개인 작업이 된 것이다. </p>
<p>PV3를 사용한 3D 컨텐츠들을 신세계에 지속적으로 도입할 수 있어서 재미있다. 요번에 프로젝트 하고 있는 것도 PV3를 사용하여 컨텐츠를 개발 하는 중이다. 상당히 재미있는 프로젝트다. 11월 중순이나 하순 쯤에 1차 개발이 완료 되고, 내가 작업하고 있는 것은 12월 중순에 2차 개발 완료 예정이다. 프로젝트를 관리하면서 작업하는 것은 역시 힘들지만 어떻게 프로젝트를 진행 하느냐에 따라 재미 있는 작업이 될 수 있다는 것을 아는 사람은 알 것이다.</p>
<p>나는 &#8220;<a href="http://mall.shinsegae.com/main/mallmain.do?method=initMallMain">신세계몰</a>&#8220;을 변화시키고자 열심히 하고 있다. 아니 우리 고스트 멤버 &#8220;이현정, <a href="http://bookun.pe.kr/">부용운 대리</a>&#8220;와 같이 말이다. 아직까지는 성공적이라 생각한다. 우선 내부적으로 반응이 좋고, 개발쪽에서도 변화가 있다고 통계가 나왔다. 앞으로 내가 있는 동안에 지속적으로 변화를 주어 내가 &#8220;<a href="http://mall.shinsegae.com/main/mallmain.do?method=initMallMain">신세계몰</a>&#8220;에 들어온 목표를 이룰 것이다. 우리 멤버들도 자기 계발을 할 수 있도록 방향을 잡아 진행 할 것이다.</p>
]]></content:encoded>
			<wfw:commentRss>http://jinustudio.com/blog/archives/117/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
