Iterating triangles


I need to be able to know if a model’s triangles lie within a cube. I’ve seen the information found in this thread:

But that code allows to iterate through all egg’s vertices without considering the triangles that the vertices form.

So my question is the following: Is there a way to iterate through all the triangles that form an .egg, in order to check if the triangle’s vertices are within my cube?


Yes, just iterate through the children of EggData until you come to an EggPolygon, then iterate through the vertices of EggPolygon. The Reference should show you the specific information you need for this. You could also examine examples such as egg-octree.


Great! Thanks David!