31 #ifndef MESH_VERTEXDATA_H
32 #define MESH_VERTEXDATA_H
50 bool readPlyFile(
const std::string& file );
51 void sort(
const Index start,
const Index length,
const Axis axis );
52 void scale(
const float baseSize = 2.0f );
53 void calculateNormals();
54 void calculateBoundingBox();
55 const BoundingBox& getBoundingBox()
const {
return _boundingBox; }
56 Axis getLongestAxis(
const size_t start,
const size_t elements )
const;
58 void useInvertedFaces() { _invertFaces =
true; }
60 std::vector< Vertex > vertices;
61 std::vector< Color > colors;
62 std::vector< Normal > normals;
63 std::vector< Triangle > triangles;
66 void readVertices(
PlyFile* file,
const int nVertices,
67 const bool readColors );
68 void readTriangles(
PlyFile* file,
const int nFaces );
76 #endif // MESH_VERTEXDATA_H