6 #ifndef LIB_ALMATH_SCENEGRAPH_MESH_H
7 #define LIB_ALMATH_SCENEGRAPH_MESH_H
9 #include <boost/optional.hpp>
104 const std::vector<float> &
positions()
const;
108 const std::vector<float> &
normals()
const;
112 const std::vector<float> &
texCoords()
const;
116 const std::vector<size_t> &
vertices()
const;
130 size_t normal(
float x,
float y,
float z);
134 void normal(
size_t index);
146 size_t position(
float x,
float y,
float z);
157 void vertex(
size_t positionIndex);
162 void vertex(
float x,
float y,
float z);
172 std::vector<float> _positions;
173 std::vector<float> _normals;
174 std::vector<float> _texCoords;
175 std::vector<size_t> _vertices;
176 std::vector<size_t> _vcounts;
179 boost::optional<Mode> _currentMode;
181 size_t _currentVcount;
182 size_t _currentNormal;
183 size_t _currentTexCoord;
float const * positionPtrAt(size_t index) const
const std::vector< float > & normals() const
size_t normal(float x, float y, float z)
size_t const * vertexPtrAt(size_t index) const
size_t texCoord(float u, float v)
size_t verticesNb() const
void vertex(size_t positionIndex)
static const size_t positionOffset
size_t texCoordsNb() const
static const size_t normalOffset
float const * normalPtrAt(size_t index) const
const std::vector< size_t > & vertices() const
float const * texCoordPtrAt(size_t index) const
const std::vector< float > & positions() const
size_t polygonsNb() const
const std::vector< float > & texCoords() const
static const size_t texCoordOffset
size_t position(float x, float y, float z)
size_t positionsNb() const
Mesh(bool withTexCoords=false)
const std::vector< size_t > & polygonVerticesCounts() const
static const size_t NO_INDEX
size_t verticesStride() const
size_t polygonVerticesCountAt(size_t index) const
bool withTexCoords() const