<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[GMan's Mods & Stuff — look for a little help.]]></title>
		<link>https://gprogs.com/viewtopic.php?id=331</link>
		<atom:link href="https://gprogs.com/extern.php?action=feed&amp;tid=331&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in look for a little help..]]></description>
		<lastBuildDate>Sat, 23 Aug 2008 18:59:36 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: look for a little help.]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=1291#p1291</link>
			<description><![CDATA[<p>greetings <img src="https://gprogs.com/img/smilies/smile.png" width="15" height="15" alt="smile" />&nbsp; the vertex system was revamped for v1.4 so the type Vertex no longer exists.&nbsp; i translated but have not tested:<br /></p><div class="codebox"><pre><code>Function AnimatedMeshToNewtonCollisionTree:Byte Ptr(nWorld:Byte Ptr,g_map:IAnimatedMesh,g_newtonMap:Byte Ptr)
    NewtonTreeCollisionBeginBuild(g_newtonmap)
    Local cMeshBuffer:Int,j:Int
    Local v1i:Int,v2i:Int,v3i:Int
    Local mb:IMeshBuffer
    
    Local vArray:Float[9]    &#039;vertex array (3*3 floats)
    
    Local tmpCount:Int = 0
    
    For cMeshBuffer=0 To g_map.getMesh(0).getMeshBufferCount() - 1
        
        mb = g_map.getMesh(0).getMeshBuffer(cMeshBuffer)
        
        Local verts:S3DVertex[] = mb.getVertices()
        
        Local mb_indices:Short[] = mb.getIndices()
        
        &#039;add each triangle from the mesh
        For Local j = 0 To mb.getIndexCount() - 1 Step 3
            v1i = mb_indices[j]
            v2i = mb_indices[j+1]
            v3i = mb_indices[j+2]

            Local v1:S3DVertex = Null                            
            Local v2:S3DVertex = Null
            Local v3:S3DVertex = Null
            
            v1 = verts[v1i]
            v2 = verts[v2i]
            v3 = verts[v3i]
            
            vArray[0] = v1.getPos().getX()
            vArray[1] = v1.getPos().getY()
            vArray[2] = v1.getPos().getZ()
            vArray[3] = v2.getPos().getX()
            vArray[4] = v2.getPos().getY()
            vArray[5] = v2.getPos().getZ()
            vArray[6] = v3.getPos().getX()
            vArray[7] = v3.getPos().getY()
            vArray[8] = v3.getPos().getZ()
            
            NewtonTreeCollisionAddFace(g_newtonmap, 3,Varptr vArray[0], 12, j)
        Next    
    Next

    NewtonTreeCollisionEndBuild(g_newtonmap,0)
    Local g_newtonmapbody:Byte Ptr = NewtonCreateBody(nWorld,g_newtonmap)
EndFunction</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (gman)]]></author>
			<pubDate>Sat, 23 Aug 2008 18:59:36 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=1291#p1291</guid>
		</item>
		<item>
			<title><![CDATA[look for a little help.]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=1281#p1281</link>
			<description><![CDATA[]]></description>
			<author><![CDATA[null@example.com (detvog)]]></author>
			<pubDate>Tue, 10 Jun 2008 10:01:43 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=1281#p1281</guid>
		</item>
	</channel>
</rss>
