Archived

This topic is now archived and is closed to further replies.

Gammastrahler

how to organize 3d geometry?

Recommended Posts

hi, i´m a little confused about the organisation of 3d geometry data. i have read that some use this format:
  
struct MESH
{
    VERTEX    vertices[];  // the actual coordinates and

                           // texture coords

    TRIANGLE  triangles[]; // that hold the indices to vertices

    
    VECTOR    normals[];
};
  
but how to describe FACES?? i dont understand this relation excatly. for example, if i want to create a cube, i first add the vertices and the vertex is only added to the MESH if it´s coordiante ins´t already in the vertex list? and then i store the indices in the triangle object?? but what´s about faces and how to access them? if i need, for example, to get the vertices for the "left side" of the cube, is this a FACE or a list of vertices?? can anybodyhelp me? thanks & greetings gammastrahler

Share this post


Link to post
Share on other sites