<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[GMan's Mods & Stuff — look for a little help.]]></title>
	<link rel="self" href="https://gprogs.com/extern.php?action=feed&amp;tid=331&amp;type=atom" />
	<updated>2008-08-23T18:59:36Z</updated>
	<generator>PunBB</generator>
	<id>https://gprogs.com/viewtopic.php?id=331</id>
		<entry>
			<title type="html"><![CDATA[Re: look for a little help.]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1291#p1291" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[gman]]></name>
				<uri>https://gprogs.com/profile.php?id=2</uri>
			</author>
			<updated>2008-08-23T18:59:36Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1291#p1291</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[look for a little help.]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1281#p1281" />
			<content type="html"><![CDATA[]]></content>
			<author>
				<name><![CDATA[detvog]]></name>
				<uri>https://gprogs.com/profile.php?id=241</uri>
			</author>
			<updated>2008-06-10T10:01:43Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1281#p1281</id>
		</entry>
</feed>
