I am trying to understand Marching Cube Algorithm, so for I think I have understood how triangles are formed and how normals are calculated in each grid. I can see there is a linked list kind of structure that links each grid to another. But when I come across GetDepth(t[m]) which passes each triangles (those triangles of each grid) (t[0],..,..)individually, it returns depth of the node.
The function,
float GetDepth(TRIANGLE t) {
float z;
z = t.p[0].z;
z = t.p[1].z > z? t.p[1].z: z;
z = t.p[2].z > z? t.p[2].z: z;
return z;
}
It looks like its trying to find max z(is it true).
I can see that it compares " > " and then I lost it.
Can any one please explain what is happening here.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…