You are viewing the course site for a past offering of this course. The current offering may be found here.
Lecture 8: Meshes and Geometry Processing (20)
Czxck001

What is this *t in Vert means? Is it referring to only one Tri or multiple Tri-s?

moridin22

It refers to an array of three triangles corresponding to the three edges of the original triangle. In the image, that array contains the triangles t[0], t[1], and t[2].

chenwnicole

So, Tri *t in Vert points to Tri array t in Tri?

StevenBirdBrown

I think Tri.t is an array of 3 pointers, each pointer corresponding to an array of triangles. There are 3 of them because a triangle has 3 endpoints. And Vert.t is an array of triangles to which Vert serves as an endpoint.

peterqiu1997

I thought that Vert.t was a single triangle, and even though there may be multiple triangles that share that vertex, we select an arbitrary one as a way of getting back to that region in the mesh?

michaeltu1

I think peterqiu1997 is right. One thing to consider is that a vertex could have degree 6, meaning it borders 6 triangles. If Vert.t were a pointer to multiple triangles, it would probably be a double pointer and could have more than 3 pointers. As it is defined, Vert.t is a single pointer to a Tri instance. It makes more sense for Vert.t to point to single triangle to allow you to get back to the mesh. The prof mentioned something along those lines in the lecture as well

You must be enrolled in the course to comment