What are the advantages of storing a list of triangles over a list of points/indexed triangle for a mesh and vice versa? I would imagine the list of points potentially saves some memory if the vertices' x,y,z coordinate values become very large, but in other cases it would seem that storing the list of triangles saves more memory and lookup time since you only store one list and perform only one indexing operation to get your triangle coordinates.
danielhsu021202
This is sort of like normalizing data, for those who have studied data engineering. Essentially this reduces redundancy by saving each point only once and just having the triangles refer to them. This way, each triangle just needs to store 3 points instead of 9 (xyz for each of the three points). As for efficiency, if we have the points loaded up in memory, this shouldn't be too slower than just having each triangle store the coordinates of each of its points, since array lookup is constant time. In the end I think it's just a tradeoff since for more complicated meshes, it may not be possible to store all the triangles in memory in the first place, so memory might be more of a priority in those cases.
danielhsu021202
Using this implementation also accounts for update or deletion anomalies, meaning if a point changes or is deleted, this change will reflect automatically in all triangles using this point.
What are the advantages of storing a list of triangles over a list of points/indexed triangle for a mesh and vice versa? I would imagine the list of points potentially saves some memory if the vertices' x,y,z coordinate values become very large, but in other cases it would seem that storing the list of triangles saves more memory and lookup time since you only store one list and perform only one indexing operation to get your triangle coordinates.
This is sort of like normalizing data, for those who have studied data engineering. Essentially this reduces redundancy by saving each point only once and just having the triangles refer to them. This way, each triangle just needs to store 3 points instead of 9 (xyz for each of the three points). As for efficiency, if we have the points loaded up in memory, this shouldn't be too slower than just having each triangle store the coordinates of each of its points, since array lookup is constant time. In the end I think it's just a tradeoff since for more complicated meshes, it may not be possible to store all the triangles in memory in the first place, so memory might be more of a priority in those cases.
Using this implementation also accounts for update or deletion anomalies, meaning if a point changes or is deleted, this change will reflect automatically in all triangles using this point.