public MeshData(Mesh pMesh) { TriMesh = pMesh; RawVertices = TriMesh.vertices.ToList <Vector3>(); RawNormals = TriMesh.normals.ToList <Vector3>(); RawTriangles = TriMesh.triangles.ToList <int>(); GenerateTriangleList(); Root = KDNode.Build(Triangles, 0, Axis.NO_AXIS); }