1. ## Triangulating a plane

Was looking at the CSX format used by Torque Constructor, to see if I might be able to write a loader for it. Luckily it's XML, so no probs there.

But one thing that's throwing me off, is the way faces are defined in the file:
<Face id="36" plane="1 -0 0 -2" material="uvchart128" texgens="-0 0.25 0 0.5 0 0 -0.25 -0.5" texScale="1 1" texDiv="128 128" />
How does one go about making triangles out of a plane as defined here?

2. I'm sort of confused as to what you mean since any 3 points in space, thus any triangle, form a plane.

3. Are there vertices elsewhere in the file that link to that face id? Seems kinda silly that they'd have a separate vertex and face tag, but who knows.

4. Originally Posted by jverkoey
Are there vertices elsewhere in the file that link to that face id?
Nope, that's the problem.

Usually in a file containing geometry info, I get lists of faces, vertices, and indices. In this file, all I get is face info with that plane definition.

Originally Posted by Bubba
I'm sort of confused as to what you mean since any 3 points in space, thus any triangle, form a plane.
What I mean is, basically, that I have no idea what the values given for the plane mean/do, and how I would take that information, and create a triangle out of it.

EDIT: ugh, well now I'm confused. I just tried a different CSX, and I get the vertex info and stuff. I thought it might have been because the first one I tried was just some boxes, but I tried saving another with just a cube, and I get vertices for that too. Weird.

I'm still curious about what to do if I just have a plane, though .

5. A guess is that the plane might be defined as the normal + a scalar D.

For all the points (P) on the plane, something like the following is true: D = -dot(P, normal).

Not easy to do anything else if you should represent an infinite plane.

6. The only thing I can think of is perhaps they are representing a plane by:

ax+by+cz+dw=0

That would explain the four numbers.