ASE format: FACES

I am having a bit of a problem with loading up a mesh from an ASE file for use in my program…

The problem I have is defining the faces of a GEOMOBJECT. For example, here is one line:


*MESH_FACE 0: A: 0 B: 2 C: 3 AB: 1 BC: 1 CA: 0

As far as I can understand, this means:

  1. This is Face #0 (number 1)
  2. Vertex ‘A’ of this face is vertex 0 (from the previous vertex list), B is vertex 2, C is vertex 3

The part that does NOT make sense to me is the next bit…

AB: 1
means that the line goes from A to B
BC: 1
means that the line goes from B to C
CA: 0
means that the line does NOT go from C to A, but it actually goes from A to C

Now HOW does this work???
How can you have line going from A to B, and also A to C ??? Aren’t they supposed to link in a chain (in an anticlockwise order)??

If anyone can shed some light on this, I will be really grateful,
I am just 100% stuck on this one problem because my mesh is scrambled when I render it

Thanks heaps in advance

[This message has been edited by drakaza (edited 07-11-2000).]

These are edge flags.
1 means that the line is visible and 0 means that it is not.

When you draw a quad as a set of two triangles, there is one line that you should not see (a diagonal of the square).

As 3DS Max uses only triangles, it uses the edge flags to hide useless lines.

The good thing is that it is easily translated into OpenGL calls :

glEdgeFlag(GL_TRUE); if the line should be visible.
glEdgeFlag(GL_FALSE); if the line should not be seen.

Have fun !



By the way, the rest of your explanations is OK so if your mesh is scrambled, you must have a problem in your code !



Hey Eric,

Thank you very much for the explanation,
it all makes sense now…the hidden lines…

Now to get the program to load up the mesh properly…

Thanks again