<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Maratis forum - Showroom and viewer mesh !!]]></title>
		<link>http://forum.maratis3d.com/viewtopic.php?id=91</link>
		<description><![CDATA[The most recent posts in Showroom and viewer mesh !!.]]></description>
		<lastBuildDate>Wed, 04 May 2011 16:03:28 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Showroom and viewer mesh !!]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=332#p332</link>
			<description><![CDATA[<p>Ok , je te remercie je vais essayer ce soir. Il faut que je cherche un peu.<br />Merci encore.<br />Ce projet c&#039;est pour faire une sorte de présentation à la wirefusion. Et présenter mes créations 3D aux gens.<br />a+</p>]]></description>
			<author><![CDATA[dummy@example.com (eric007)]]></author>
			<pubDate>Wed, 04 May 2011 16:03:28 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=332#p332</guid>
		</item>
		<item>
			<title><![CDATA[Re: Showroom and viewer mesh !!]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=331#p331</link>
			<description><![CDATA[<p>Ok, si j&#039;ai bien compris le code devrait fonctionner pour ce que tu veux faire,<br />commence par importer ton objet dans la scene et place une camera orientée vers Y,<br />l&#039;idée est de déplacer l&#039;objet et pas la camera (plus simple).</p><p>Ensuite utilise ce script, modifie-le si besoin,<br />il permet de faire tourner l&#039;objet sur l&#039;axe Z lorsque la souris bouge et que le bouton droit est enfoncé.<br />L&#039;objet est déplacé (similaire au pan) lorsque la souris bouge et que le bouton gauche est enfoncé :</p><p>-- get objects<br />Object = getObject(&quot;Object&quot;)</p><p>dx = 0.0<br />dy = 0.0</p><p>centerCursor()<br />mx = getAxis(&quot;MOUSE_X&quot;)<br />my = getAxis(&quot;MOUSE_Y&quot;)</p><p>-- scene update<br />function onSceneUpdate()</p><p>&nbsp; &nbsp; if isKeyPressed(MOUSE_BUTTON3) then<br />&nbsp; &nbsp; &nbsp; &nbsp; rotate(Object, {0, 0, -1}, dx*100)<br />&nbsp; &nbsp; elseif isKeyPressed(MOUSE_BUTTON1) then<br />&nbsp; &nbsp; &nbsp; &nbsp; translate(Object, {dx*100, 0, -dy*100})<br />&nbsp; &nbsp; end<br />&nbsp; &nbsp;<br />&nbsp; &nbsp; -- get mouse direction<br />&nbsp; &nbsp; dx = getAxis(&quot;MOUSE_X&quot;) - mx<br />&nbsp; &nbsp; dy = getAxis(&quot;MOUSE_Y&quot;) - my</p><p>&nbsp; &nbsp; -- center cursor<br />&nbsp; &nbsp; centerCursor()<br />&nbsp; &nbsp;<br />&nbsp; &nbsp; mx = getAxis(&quot;MOUSE_X&quot;)<br />&nbsp; &nbsp; my = getAxis(&quot;MOUSE_Y&quot;)&nbsp; &nbsp;<br />&nbsp; &nbsp;<br />end</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Wed, 04 May 2011 15:59:01 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=331#p331</guid>
		</item>
		<item>
			<title><![CDATA[Re: Showroom and viewer mesh !!]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=330#p330</link>
			<description><![CDATA[<p>French. thanks</p>]]></description>
			<author><![CDATA[dummy@example.com (eric007)]]></author>
			<pubDate>Wed, 04 May 2011 15:33:49 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=330#p330</guid>
		</item>
		<item>
			<title><![CDATA[Re: Showroom and viewer mesh !!]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=329#p329</link>
			<description><![CDATA[<p>In this piece of code, you have to move the mouse and to click the mouse button.<br />What is your natural language ?</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Wed, 04 May 2011 14:10:30 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=329#p329</guid>
		</item>
		<item>
			<title><![CDATA[Re: Showroom and viewer mesh !!]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=328#p328</link>
			<description><![CDATA[<p>Sorry my English is very bad I use a translator. !. To use both the mouse click and the mouse movement. is the same code.<br />thanks</p>]]></description>
			<author><![CDATA[dummy@example.com (eric007)]]></author>
			<pubDate>Wed, 04 May 2011 12:48:13 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=328#p328</guid>
		</item>
		<item>
			<title><![CDATA[Re: Showroom and viewer mesh !!]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=327#p327</link>
			<description><![CDATA[<p>You can use isKeyPressed(MOUSE_BUTTON1), isKeyPressed(MOUSE_BUTTON2) and isKeyPressed(MOUSE_BUTTON3)<br />to know if there is left click, middle click or right clic.</p><p>Something like that :<br />(set your camera oriented toward Y)</p><p>if isKeyPressed(MOUSE_BUTTON3) then<br />&nbsp; &nbsp; rotate(Object, {0, 0, -1}, dx*100)<br />elseif isKeyPressed(MOUSE_BUTTON1) then<br />&nbsp; &nbsp; translate(Object, {dx*100, 0, -dy*100})<br />end</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Wed, 04 May 2011 10:10:56 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=327#p327</guid>
		</item>
		<item>
			<title><![CDATA[Re: Showroom and viewer mesh !!]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=326#p326</link>
			<description><![CDATA[<p>Thank Anael;</p><p>It&#039;s simple for you. But for me ... ! : (<br />In addition I will use two functions for the mouse right click +&nbsp; move mouse = rotation. left click + move mouse = pan. And zoom with the wheel mouse.<br />That&#039;s why I was hoping an example already.</p>]]></description>
			<author><![CDATA[dummy@example.com (eric007)]]></author>
			<pubDate>Wed, 04 May 2011 08:51:04 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=326#p326</guid>
		</item>
		<item>
			<title><![CDATA[Re: Showroom and viewer mesh !!]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=325#p325</link>
			<description><![CDATA[<p>Hi,</p><p>yes, you can do that quite easily on script,<br />here is an example to rotate your object around the Z axis using the mouse :</p><p>(you can use the same idea to translate your object on X and Z for the pan)</p><br /><p>-- get objects<br />Object = getObject(&quot;Object&quot;)</p><p>dx = 0.0<br />dy = 0.0</p><p>centerCursor()<br />mx = getAxis(&quot;MOUSE_X&quot;)<br />my = getAxis(&quot;MOUSE_Y&quot;)</p><p>-- scene update<br />function onSceneUpdate()</p><p>&nbsp; &nbsp; -- rotate Object (X mouse)<br />&nbsp; &nbsp; rotate(Object, {0, 0, -1}, dx*100)<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; -- get mouse direction<br />&nbsp; &nbsp; dx = getAxis(&quot;MOUSE_X&quot;) - mx<br />&nbsp; &nbsp; dy = getAxis(&quot;MOUSE_Y&quot;) - my</p><p>&nbsp; &nbsp; -- center cursor<br />&nbsp; &nbsp; centerCursor()<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; mx = getAxis(&quot;MOUSE_X&quot;)<br />&nbsp; &nbsp; my = getAxis(&quot;MOUSE_Y&quot;)&nbsp; &nbsp; <br />&nbsp; &nbsp; <br />end</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Wed, 04 May 2011 08:03:04 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=325#p325</guid>
		</item>
		<item>
			<title><![CDATA[Showroom and viewer mesh !!]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=324#p324</link>
			<description><![CDATA[<p>it is possible to make a viewer (showroom)! pan, rotate and zoom the camera around an object with mouse.<br />thank you. I want to submit a design object.<br />If anyone has any examples, I&#039;d be happy.</p>]]></description>
			<author><![CDATA[dummy@example.com (eric007)]]></author>
			<pubDate>Wed, 04 May 2011 05:47:56 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=324#p324</guid>
		</item>
	</channel>
</rss>
