_____
From: For...@ao... [mailto:For...@ao...]
Sent: 21. joulukuuta 2006 3:30
To: Hei...@ut...
Subject: Re: [DirectPython] 3d Text
hello again,
I can render the text now (thank you). I can't rotate the 3d text yet
but I'm sure I'll figure the camera out. I have access to the vertex and
vertex normals. I am trying to export this information to a .obj
file....however I don't know how to deal with faces 'f'
you need the vertices:
v
vertex normals:
vn
and faces:
f 1//1 2//2 etc.
how do I know what points form a face?
Andre O'Brien
Use the index buffer to determine faces. Direct3D meshes are made of
trianglelists (3 vertices per face), so it should not be too difficult. Here
is an example:
vbuffer, ibuffer = mesh.getBuffers()
i = 0
indices = ibuffer[:] #Take a temporary copy
while i < len(indices):
print "Face ", indices[i:i+3]
i += 3
--
Heikki Salo
|