<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Maratis forum - Showroom and viewer mesh !!]]></title>
	<link rel="self" href="http://forum.maratis3d.com/extern.php?action=feed&amp;tid=91&amp;type=atom"/>
	<updated>2011-05-04T16:03:28Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.maratis3d.com/viewtopic.php?id=91</id>
		<entry>
			<title type="html"><![CDATA[Re: Showroom and viewer mesh !!]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=332#p332"/>
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[eric007]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=79</uri>
			</author>
			<updated>2011-05-04T16:03:28Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=332#p332</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Showroom and viewer mesh !!]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=331#p331"/>
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2011-05-04T15:59:01Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=331#p331</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Showroom and viewer mesh !!]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=330#p330"/>
			<content type="html"><![CDATA[<p>French. thanks</p>]]></content>
			<author>
				<name><![CDATA[eric007]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=79</uri>
			</author>
			<updated>2011-05-04T15:33:49Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=330#p330</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Showroom and viewer mesh !!]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=329#p329"/>
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2011-05-04T14:10:30Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=329#p329</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Showroom and viewer mesh !!]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=328#p328"/>
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[eric007]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=79</uri>
			</author>
			<updated>2011-05-04T12:48:13Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=328#p328</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Showroom and viewer mesh !!]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=327#p327"/>
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2011-05-04T10:10:56Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=327#p327</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Showroom and viewer mesh !!]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=326#p326"/>
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[eric007]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=79</uri>
			</author>
			<updated>2011-05-04T08:51:04Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=326#p326</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Showroom and viewer mesh !!]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=325#p325"/>
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2011-05-04T08:03:04Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=325#p325</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Showroom and viewer mesh !!]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=324#p324"/>
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[eric007]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=79</uri>
			</author>
			<updated>2011-05-04T05:47:56Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=324#p324</id>
		</entry>
</feed>
