Surface
Every surface in Super Mario 64 is made up of triangles. Every triangle falls into 1 of 3 categories:a floor triangle, a wall triangle, or a ceiling triangle. Weirdly enough, a triangle doesn't store what category it is. Instead, its category is determined based on the y component of the triangles normal vector. Simply putting it, if y component > 0.01, then it's a floor. If the y component < -0.01, then it's a ceiling. Otherwise, it's a wall. <ref>[1], All information came from UncommentatedPannen's video "Walls, Floors, & Ceilings."