Skip to main content
gamedev.net
🔒 Locked

Vertex structure?

Started by CnCMasta 0 replies 150+ views
Original Post
CnCMasta
CnCMasta
Hi! Im looking for a good design for my vertex-structures, i want to do a struct "3DVertex" and one "Triangle", Triangle should have 3 3DVertex-Vars in it, but i dont know how to handle vertex-arrays then could someone please help? mfg cNc
Love dem or love dem not!
sphinx23
sphinx23

  
// vector / vertex (3d)

typedef float vec3_t[3];

struct triangle
{
vec3_t vertices[3];

// ... vertex specific info (e.g. texture coords...) ...

};

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.