Page 1 of 1

Quads in Meshs, and surface selection

Posted: Tue Aug 14, 2007 11:55 am
by hypervox
Another quick question for you gurus! The source I've looked at so far creates meshes using triangle surfaces - can you create meshes in purebasic that have surfaces of 4 sides or more?

Also, once you've created your mesh, can you reference a particular surface so you can perform some sort of action eg. scaleing? If this is not possible in the 3d implementation of purebasic but is available in a addon library, please let me know.

Rgrds

Hypervox

Re: Quads in Meshs, and surface selection

Posted: Tue Aug 14, 2007 12:04 pm
by Comtois
hypervox wrote: can you create meshes in purebasic that have surfaces of 4 sides or more?
No, you will have to use triangles
Also, once you've created your mesh, can you reference a particular surface so you can perform some sort of action eg. scaleing?

As you build your mesh manually, you can always scale a particular surface manually. For example :
http://purebasic.fr/english/viewtopic.php?t=21634

Posted: Tue Aug 14, 2007 1:30 pm
by hypervox
Bugger. I'm trying to load a OBJ file , and as OBJ's can have faces of 4 edges or more, that might be problematical. I suppose I could triangulate the mesh on the fly (i.e. if I have a square face, convert it to 2 triangles).

Posted: Tue Aug 14, 2007 6:21 pm
by Comtois
hypervox wrote:Bugger. I'm trying to load a OBJ file , and as OBJ's can have faces of 4 edges or more, that might be problematical. I suppose I could triangulate the mesh on the fly (i.e. if I have a square face, convert it to 2 triangles).
May be you can use Deledto convert your obj file ?

Posted: Tue Aug 14, 2007 7:22 pm
by Barney
You can find C++ source code for tesselation (triangulation) here.

Barney