Quads in Meshs, and surface selection

Advanced game related topics
hypervox
User
User
Posts: 48
Joined: Mon Apr 28, 2003 10:02 am
Location: UK
Contact:

Quads in Meshs, and surface selection

Post 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
PC 1:AMD Athlon XP 2000,Geforce 2 MX400 64Mb, Windows 2000 :D
PC 2:Intel P3 1ghz, Nvidia Vanta 16Gb, Windows 2000 :)
Registered Purebasic User :D

PureBasic Game Creation Site
http://www.hypervox.co.uk/PureBasic/
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Re: Quads in Meshs, and surface selection

Post 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
Please correct my english
http://purebasic.developpez.com/
hypervox
User
User
Posts: 48
Joined: Mon Apr 28, 2003 10:02 am
Location: UK
Contact:

Post 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).
PC 1:AMD Athlon XP 2000,Geforce 2 MX400 64Mb, Windows 2000 :D
PC 2:Intel P3 1ghz, Nvidia Vanta 16Gb, Windows 2000 :)
Registered Purebasic User :D

PureBasic Game Creation Site
http://www.hypervox.co.uk/PureBasic/
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post 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 ?
Please correct my english
http://purebasic.developpez.com/
Barney
User
User
Posts: 54
Joined: Wed Apr 26, 2006 12:01 pm

Post by Barney »

You can find C++ source code for tesselation (triangulation) here.

Barney
Post Reply