Don’t be sorry, since when does loading 3D objects have nothing to do with opengl?
Anyhow…
You need to use structs. First you have one to define your vertex…
typedef struct
{
float x, y, z;
} VERTEX;
Then you have a struct for your object…
typedef struct
{
int verts;
VERTEX *points;
} OBJECT;
You create something to hold your object info…
OBJECT MyObject;
Somewhere in your code you will read in your object file, find out how many vertices it has and store that in:
MyObject->verts = NumberOfVertices
Then allocate space for those vertices with…
MyObject->points = (VERTEX*)malloc(sizeof(VERTEX)*MyObject->verts);
Once you do this you can store and access your objects vertex info like so:
MyObject->points[i].x
MyObject->points[i].y
MyObject->points[i].z
…where i equals the vertex you want, and you tack on a .x, .y or .z.
If you wanted to do something with all the verts (like render them of course ) you would use a loop like so:
for (i=0; i<MyObject->verts; i++) {
// do stuff with…
// MyObject->points[i].x
// MyObject->points[i].y
// MyObject->points[i].z
}
That’s a very breif explanation, hope it helps.