<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Maratis forum - how deform a mesh?]]></title>
	<link rel="self" href="http://forum.maratis3d.com/extern.php?action=feed&amp;tid=484&amp;type=atom"/>
	<updated>2012-12-01T01:55:52Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.maratis3d.com/viewtopic.php?id=484</id>
		<entry>
			<title type="html"><![CDATA[Re: how deform a mesh?]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2987#p2987"/>
			<content type="html"><![CDATA[<p>i want change a terrain in realtime, i will be try this code, thankyou very much.</p>]]></content>
			<author>
				<name><![CDATA[3dcat]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=198</uri>
			</author>
			<updated>2012-12-01T01:55:52Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2987#p2987</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: how deform a mesh?]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2986#p2986"/>
			<content type="html"><![CDATA[<p>Also, depending on what you want to do, you can just use a vertex shader.</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-11-30T22:48:23Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2986#p2986</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: how deform a mesh?]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2985#p2985"/>
			<content type="html"><![CDATA[<p>In c++, you can access the mesh of an entity (or the meshs of a scene).<br />From an entity :</p><div class="codebox"><pre><code>        // mesh
        MMesh * mesh = entity-&gt;getMesh();
        if(! mesh)
                return;

        // sub-meshs
        unsigned int s, sSize = mesh-&gt;getSubMeshsNumber();
        for(s=0; s&lt;sSize; s++)
        {
                MSubMesh * subMesh = &amp;mesh-&gt;getSubMeshs()[s];

                // vertices
                MVector3 * vertices = subMesh-&gt;getVertices();
                if(! vertices)
                        continue;

                unsigned int v, vSize = subMesh-&gt;getVerticesSize();
                for(v=0; v&lt;vSize; v++)
                        vertices[v] += MVector3(1, 0, 0); // ex : translate
        }

        mesh-&gt;updateBoundingBox();</code></pre></div>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-11-30T22:42:56Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2985#p2985</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[how deform a mesh?]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2984#p2984"/>
			<content type="html"><![CDATA[<p>hello, i see the documentation but not found how make this, i need deform a mesh (vertex) in runtime, thanks.</p>]]></content>
			<author>
				<name><![CDATA[3dcat]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=198</uri>
			</author>
			<updated>2012-11-30T20:44:19Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2984#p2984</id>
		</entry>
</feed>
