Added missing ovverides to silence clang

This commit is contained in:
Jan Möbius
2019-01-15 13:51:09 +01:00
parent 4964f1716e
commit 4363a1cbce
2 changed files with 85 additions and 83 deletions

View File

@@ -89,61 +89,61 @@ public:
// get vertex data // get vertex data
Vec3f point(VertexHandle _vh) const Vec3f point(VertexHandle _vh) const override
{ {
return vector_cast<Vec3f>(mesh_.point(_vh)); return vector_cast<Vec3f>(mesh_.point(_vh));
} }
Vec3f normal(VertexHandle _vh) const Vec3f normal(VertexHandle _vh) const override
{ {
return (mesh_.has_vertex_normals() return (mesh_.has_vertex_normals()
? vector_cast<Vec3f>(mesh_.normal(_vh)) ? vector_cast<Vec3f>(mesh_.normal(_vh))
: Vec3f(0.0f, 0.0f, 0.0f)); : Vec3f(0.0f, 0.0f, 0.0f));
} }
Vec3uc color(VertexHandle _vh) const Vec3uc color(VertexHandle _vh) const override
{ {
return (mesh_.has_vertex_colors() return (mesh_.has_vertex_colors()
? color_cast<Vec3uc>(mesh_.color(_vh)) ? color_cast<Vec3uc>(mesh_.color(_vh))
: Vec3uc(0, 0, 0)); : Vec3uc(0, 0, 0));
} }
Vec4uc colorA(VertexHandle _vh) const Vec4uc colorA(VertexHandle _vh) const override
{ {
return (mesh_.has_vertex_colors() return (mesh_.has_vertex_colors()
? color_cast<Vec4uc>(mesh_.color(_vh)) ? color_cast<Vec4uc>(mesh_.color(_vh))
: Vec4uc(0, 0, 0, 0)); : Vec4uc(0, 0, 0, 0));
} }
Vec3ui colori(VertexHandle _vh) const Vec3ui colori(VertexHandle _vh) const override
{ {
return (mesh_.has_vertex_colors() return (mesh_.has_vertex_colors()
? color_cast<Vec3ui>(mesh_.color(_vh)) ? color_cast<Vec3ui>(mesh_.color(_vh))
: Vec3ui(0, 0, 0)); : Vec3ui(0, 0, 0));
} }
Vec4ui colorAi(VertexHandle _vh) const Vec4ui colorAi(VertexHandle _vh) const override
{ {
return (mesh_.has_vertex_colors() return (mesh_.has_vertex_colors()
? color_cast<Vec4ui>(mesh_.color(_vh)) ? color_cast<Vec4ui>(mesh_.color(_vh))
: Vec4ui(0, 0, 0, 0)); : Vec4ui(0, 0, 0, 0));
} }
Vec3f colorf(VertexHandle _vh) const Vec3f colorf(VertexHandle _vh) const override
{ {
return (mesh_.has_vertex_colors() return (mesh_.has_vertex_colors()
? color_cast<Vec3f>(mesh_.color(_vh)) ? color_cast<Vec3f>(mesh_.color(_vh))
: Vec3f(0, 0, 0)); : Vec3f(0, 0, 0));
} }
Vec4f colorAf(VertexHandle _vh) const Vec4f colorAf(VertexHandle _vh) const override
{ {
return (mesh_.has_vertex_colors() return (mesh_.has_vertex_colors()
? color_cast<Vec4f>(mesh_.color(_vh)) ? color_cast<Vec4f>(mesh_.color(_vh))
: Vec4f(0, 0, 0, 0)); : Vec4f(0, 0, 0, 0));
} }
Vec2f texcoord(VertexHandle _vh) const Vec2f texcoord(VertexHandle _vh) const override
{ {
#if defined(OM_CC_GCC) && (OM_CC_VERSION<30000) #if defined(OM_CC_GCC) && (OM_CC_VERSION<30000)
// Workaround! // Workaround!
@@ -159,14 +159,14 @@ public:
#endif #endif
} }
Vec2f texcoord(HalfedgeHandle _heh) const Vec2f texcoord(HalfedgeHandle _heh) const override
{ {
return (mesh_.has_halfedge_texcoords2D() return (mesh_.has_halfedge_texcoords2D()
? vector_cast<Vec2f>(mesh_.texcoord2D(_heh)) ? vector_cast<Vec2f>(mesh_.texcoord2D(_heh))
: Vec2f(0.0f, 0.0f)); : Vec2f(0.0f, 0.0f));
} }
OpenMesh::Attributes::StatusInfo status(VertexHandle _vh) const OpenMesh::Attributes::StatusInfo status(VertexHandle _vh) const override
{ {
if (mesh_.has_vertex_status()) if (mesh_.has_vertex_status())
return mesh_.status(_vh); return mesh_.status(_vh);
@@ -175,49 +175,49 @@ public:
// get edge data // get edge data
Vec3uc color(EdgeHandle _eh) const Vec3uc color(EdgeHandle _eh) const override
{ {
return (mesh_.has_edge_colors() return (mesh_.has_edge_colors()
? color_cast<Vec3uc>(mesh_.color(_eh)) ? color_cast<Vec3uc>(mesh_.color(_eh))
: Vec3uc(0, 0, 0)); : Vec3uc(0, 0, 0));
} }
Vec4uc colorA(EdgeHandle _eh) const Vec4uc colorA(EdgeHandle _eh) const override
{ {
return (mesh_.has_edge_colors() return (mesh_.has_edge_colors()
? color_cast<Vec4uc>(mesh_.color(_eh)) ? color_cast<Vec4uc>(mesh_.color(_eh))
: Vec4uc(0, 0, 0, 0)); : Vec4uc(0, 0, 0, 0));
} }
Vec3ui colori(EdgeHandle _eh) const Vec3ui colori(EdgeHandle _eh) const override
{ {
return (mesh_.has_edge_colors() return (mesh_.has_edge_colors()
? color_cast<Vec3ui>(mesh_.color(_eh)) ? color_cast<Vec3ui>(mesh_.color(_eh))
: Vec3ui(0, 0, 0)); : Vec3ui(0, 0, 0));
} }
Vec4ui colorAi(EdgeHandle _eh) const Vec4ui colorAi(EdgeHandle _eh) const override
{ {
return (mesh_.has_edge_colors() return (mesh_.has_edge_colors()
? color_cast<Vec4ui>(mesh_.color(_eh)) ? color_cast<Vec4ui>(mesh_.color(_eh))
: Vec4ui(0, 0, 0, 0)); : Vec4ui(0, 0, 0, 0));
} }
Vec3f colorf(EdgeHandle _eh) const Vec3f colorf(EdgeHandle _eh) const override
{ {
return (mesh_.has_vertex_colors() return (mesh_.has_vertex_colors()
? color_cast<Vec3f>(mesh_.color(_eh)) ? color_cast<Vec3f>(mesh_.color(_eh))
: Vec3f(0, 0, 0)); : Vec3f(0, 0, 0));
} }
Vec4f colorAf(EdgeHandle _eh) const Vec4f colorAf(EdgeHandle _eh) const override
{ {
return (mesh_.has_vertex_colors() return (mesh_.has_vertex_colors()
? color_cast<Vec4f>(mesh_.color(_eh)) ? color_cast<Vec4f>(mesh_.color(_eh))
: Vec4f(0, 0, 0, 0)); : Vec4f(0, 0, 0, 0));
} }
OpenMesh::Attributes::StatusInfo status(EdgeHandle _eh) const OpenMesh::Attributes::StatusInfo status(EdgeHandle _eh) const override
{ {
if (mesh_.has_edge_status()) if (mesh_.has_edge_status())
return mesh_.status(_eh); return mesh_.status(_eh);
@@ -251,7 +251,7 @@ public:
return mesh_.face_handle(_heh).idx(); return mesh_.face_handle(_heh).idx();
} }
OpenMesh::Attributes::StatusInfo status(HalfedgeHandle _heh) const OpenMesh::Attributes::StatusInfo status(HalfedgeHandle _heh) const override
{ {
if (mesh_.has_halfedge_status()) if (mesh_.has_halfedge_status())
return mesh_.status(_heh); return mesh_.status(_heh);
@@ -261,7 +261,7 @@ public:
// get face data // get face data
unsigned int get_vhandles(FaceHandle _fh, unsigned int get_vhandles(FaceHandle _fh,
std::vector<VertexHandle>& _vhandles) const std::vector<VertexHandle>& _vhandles) const override
{ {
unsigned int count(0); unsigned int count(0);
_vhandles.clear(); _vhandles.clear();
@@ -273,7 +273,7 @@ public:
return count; return count;
} }
unsigned int get_face_texcoords(std::vector<Vec2f>& _hehandles) const unsigned int get_face_texcoords(std::vector<Vec2f>& _hehandles) const override
{ {
unsigned int count(0); unsigned int count(0);
_hehandles.clear(); _hehandles.clear();
@@ -287,7 +287,7 @@ public:
return count; return count;
} }
HalfedgeHandle getHeh(FaceHandle _fh, VertexHandle _vh) const HalfedgeHandle getHeh(FaceHandle _fh, VertexHandle _vh) const override
{ {
typename Mesh::ConstFaceHalfedgeIter fh_it; typename Mesh::ConstFaceHalfedgeIter fh_it;
for(fh_it = mesh_.cfh_iter(_fh); fh_it.is_valid();++fh_it) for(fh_it = mesh_.cfh_iter(_fh); fh_it.is_valid();++fh_it)
@@ -298,85 +298,85 @@ public:
return *fh_it; return *fh_it;
} }
Vec3f normal(FaceHandle _fh) const Vec3f normal(FaceHandle _fh) const override
{ {
return (mesh_.has_face_normals() return (mesh_.has_face_normals()
? vector_cast<Vec3f>(mesh_.normal(_fh)) ? vector_cast<Vec3f>(mesh_.normal(_fh))
: Vec3f(0.0f, 0.0f, 0.0f)); : Vec3f(0.0f, 0.0f, 0.0f));
} }
Vec3uc color(FaceHandle _fh) const Vec3uc color(FaceHandle _fh) const override
{ {
return (mesh_.has_face_colors() return (mesh_.has_face_colors()
? color_cast<Vec3uc>(mesh_.color(_fh)) ? color_cast<Vec3uc>(mesh_.color(_fh))
: Vec3uc(0, 0, 0)); : Vec3uc(0, 0, 0));
} }
Vec4uc colorA(FaceHandle _fh) const Vec4uc colorA(FaceHandle _fh) const override
{ {
return (mesh_.has_face_colors() return (mesh_.has_face_colors()
? color_cast<Vec4uc>(mesh_.color(_fh)) ? color_cast<Vec4uc>(mesh_.color(_fh))
: Vec4uc(0, 0, 0, 0)); : Vec4uc(0, 0, 0, 0));
} }
Vec3ui colori(FaceHandle _fh) const Vec3ui colori(FaceHandle _fh) const override
{ {
return (mesh_.has_face_colors() return (mesh_.has_face_colors()
? color_cast<Vec3ui>(mesh_.color(_fh)) ? color_cast<Vec3ui>(mesh_.color(_fh))
: Vec3ui(0, 0, 0)); : Vec3ui(0, 0, 0));
} }
Vec4ui colorAi(FaceHandle _fh) const Vec4ui colorAi(FaceHandle _fh) const override
{ {
return (mesh_.has_face_colors() return (mesh_.has_face_colors()
? color_cast<Vec4ui>(mesh_.color(_fh)) ? color_cast<Vec4ui>(mesh_.color(_fh))
: Vec4ui(0, 0, 0, 0)); : Vec4ui(0, 0, 0, 0));
} }
Vec3f colorf(FaceHandle _fh) const Vec3f colorf(FaceHandle _fh) const override
{ {
return (mesh_.has_vertex_colors() return (mesh_.has_vertex_colors()
? color_cast<Vec3f>(mesh_.color(_fh)) ? color_cast<Vec3f>(mesh_.color(_fh))
: Vec3f(0, 0, 0)); : Vec3f(0, 0, 0));
} }
Vec4f colorAf(FaceHandle _fh) const Vec4f colorAf(FaceHandle _fh) const override
{ {
return (mesh_.has_vertex_colors() return (mesh_.has_vertex_colors()
? color_cast<Vec4f>(mesh_.color(_fh)) ? color_cast<Vec4f>(mesh_.color(_fh))
: Vec4f(0, 0, 0, 0)); : Vec4f(0, 0, 0, 0));
} }
OpenMesh::Attributes::StatusInfo status(FaceHandle _fh) const OpenMesh::Attributes::StatusInfo status(FaceHandle _fh) const override
{ {
if (mesh_.has_face_status()) if (mesh_.has_face_status())
return mesh_.status(_fh); return mesh_.status(_fh);
return OpenMesh::Attributes::StatusInfo(); return OpenMesh::Attributes::StatusInfo();
} }
virtual const BaseKernel* kernel() { return &mesh_; } virtual const BaseKernel* kernel() override { return &mesh_; }
// query number of faces, vertices, normals, texcoords // query number of faces, vertices, normals, texcoords
size_t n_vertices() const { return mesh_.n_vertices(); } size_t n_vertices() const override { return mesh_.n_vertices(); }
size_t n_faces() const { return mesh_.n_faces(); } size_t n_faces() const override { return mesh_.n_faces(); }
size_t n_edges() const { return mesh_.n_edges(); } size_t n_edges() const override { return mesh_.n_edges(); }
// property information // property information
bool is_triangle_mesh() const bool is_triangle_mesh() const override
{ return Mesh::is_triangles(); } { return Mesh::is_triangles(); }
bool has_vertex_normals() const { return mesh_.has_vertex_normals(); } bool has_vertex_normals() const override { return mesh_.has_vertex_normals(); }
bool has_vertex_colors() const { return mesh_.has_vertex_colors(); } bool has_vertex_colors() const override { return mesh_.has_vertex_colors(); }
bool has_vertex_texcoords() const { return mesh_.has_vertex_texcoords2D(); } bool has_vertex_texcoords() const override { return mesh_.has_vertex_texcoords2D(); }
bool has_vertex_status() const { return mesh_.has_vertex_status(); } bool has_vertex_status() const override { return mesh_.has_vertex_status(); }
bool has_edge_colors() const { return mesh_.has_edge_colors(); } bool has_edge_colors() const override { return mesh_.has_edge_colors(); }
bool has_edge_status() const { return mesh_.has_edge_status(); } bool has_edge_status() const override { return mesh_.has_edge_status(); }
bool has_halfedge_status() const { return mesh_.has_halfedge_status(); } bool has_halfedge_status() const override { return mesh_.has_halfedge_status(); }
bool has_face_normals() const { return mesh_.has_face_normals(); } bool has_face_normals() const override { return mesh_.has_face_normals(); }
bool has_face_colors() const { return mesh_.has_face_colors(); } bool has_face_colors() const override { return mesh_.has_face_colors(); }
bool has_face_status() const { return mesh_.has_face_status(); } bool has_face_status() const override { return mesh_.has_face_status(); }
private: private:

View File

@@ -92,12 +92,12 @@ public:
ImporterT(Mesh& _mesh) : mesh_(_mesh), halfedgeNormals_() {} ImporterT(Mesh& _mesh) : mesh_(_mesh), halfedgeNormals_() {}
virtual VertexHandle add_vertex(const Vec3f& _point) virtual VertexHandle add_vertex(const Vec3f& _point) override
{ {
return mesh_.add_vertex(vector_cast<Point>(_point)); return mesh_.add_vertex(vector_cast<Point>(_point));
} }
virtual VertexHandle add_vertex() virtual VertexHandle add_vertex() override
{ {
return mesh_.new_vertex(); return mesh_.new_vertex();
} }
@@ -107,7 +107,7 @@ public:
return mesh_.new_edge(_vh0, _vh1); return mesh_.new_edge(_vh0, _vh1);
} }
virtual FaceHandle add_face(const VHandles& _indices) virtual FaceHandle add_face(const VHandles& _indices) override
{ {
FaceHandle fh; FaceHandle fh;
@@ -201,7 +201,7 @@ public:
// vertex attributes // vertex attributes
virtual void set_point(VertexHandle _vh, const Vec3f& _point) virtual void set_point(VertexHandle _vh, const Vec3f& _point) override
{ {
mesh_.set_point(_vh,vector_cast<Point>(_point)); mesh_.set_point(_vh,vector_cast<Point>(_point));
} }
@@ -211,7 +211,7 @@ public:
mesh_.set_halfedge_handle(_vh, _heh); mesh_.set_halfedge_handle(_vh, _heh);
} }
virtual void set_normal(VertexHandle _vh, const Vec3f& _normal) virtual void set_normal(VertexHandle _vh, const Vec3f& _normal) override
{ {
if (mesh_.has_vertex_normals()) if (mesh_.has_vertex_normals())
mesh_.set_normal(_vh, vector_cast<Normal>(_normal)); mesh_.set_normal(_vh, vector_cast<Normal>(_normal));
@@ -222,37 +222,37 @@ public:
halfedgeNormals_[_vh] = vector_cast<Normal>(_normal); halfedgeNormals_[_vh] = vector_cast<Normal>(_normal);
} }
virtual void set_color(VertexHandle _vh, const Vec4uc& _color) virtual void set_color(VertexHandle _vh, const Vec4uc& _color) override
{ {
if (mesh_.has_vertex_colors()) if (mesh_.has_vertex_colors())
mesh_.set_color(_vh, color_cast<Color>(_color)); mesh_.set_color(_vh, color_cast<Color>(_color));
} }
virtual void set_color(VertexHandle _vh, const Vec3uc& _color) virtual void set_color(VertexHandle _vh, const Vec3uc& _color) override
{ {
if (mesh_.has_vertex_colors()) if (mesh_.has_vertex_colors())
mesh_.set_color(_vh, color_cast<Color>(_color)); mesh_.set_color(_vh, color_cast<Color>(_color));
} }
virtual void set_color(VertexHandle _vh, const Vec4f& _color) virtual void set_color(VertexHandle _vh, const Vec4f& _color) override
{ {
if (mesh_.has_vertex_colors()) if (mesh_.has_vertex_colors())
mesh_.set_color(_vh, color_cast<Color>(_color)); mesh_.set_color(_vh, color_cast<Color>(_color));
} }
virtual void set_color(VertexHandle _vh, const Vec3f& _color) virtual void set_color(VertexHandle _vh, const Vec3f& _color) override
{ {
if (mesh_.has_vertex_colors()) if (mesh_.has_vertex_colors())
mesh_.set_color(_vh, color_cast<Color>(_color)); mesh_.set_color(_vh, color_cast<Color>(_color));
} }
virtual void set_texcoord(VertexHandle _vh, const Vec2f& _texcoord) virtual void set_texcoord(VertexHandle _vh, const Vec2f& _texcoord) override
{ {
if (mesh_.has_vertex_texcoords2D()) if (mesh_.has_vertex_texcoords2D())
mesh_.set_texcoord2D(_vh, vector_cast<TexCoord2D>(_texcoord)); mesh_.set_texcoord2D(_vh, vector_cast<TexCoord2D>(_texcoord));
} }
virtual void set_status(VertexHandle _vh, const OpenMesh::Attributes::StatusInfo& _status) virtual void set_status(VertexHandle _vh, const OpenMesh::Attributes::StatusInfo& _status) override
{ {
if (!mesh_.has_vertex_status()) if (!mesh_.has_vertex_status())
mesh_.request_vertex_status(); mesh_.request_vertex_status();
@@ -270,25 +270,25 @@ public:
} }
virtual void set_texcoord(HalfedgeHandle _heh, const Vec2f& _texcoord) virtual void set_texcoord(HalfedgeHandle _heh, const Vec2f& _texcoord) override
{ {
if (mesh_.has_halfedge_texcoords2D()) if (mesh_.has_halfedge_texcoords2D())
mesh_.set_texcoord2D(_heh, vector_cast<TexCoord2D>(_texcoord)); mesh_.set_texcoord2D(_heh, vector_cast<TexCoord2D>(_texcoord));
} }
virtual void set_texcoord(VertexHandle _vh, const Vec3f& _texcoord) virtual void set_texcoord(VertexHandle _vh, const Vec3f& _texcoord) override
{ {
if (mesh_.has_vertex_texcoords3D()) if (mesh_.has_vertex_texcoords3D())
mesh_.set_texcoord3D(_vh, vector_cast<TexCoord3D>(_texcoord)); mesh_.set_texcoord3D(_vh, vector_cast<TexCoord3D>(_texcoord));
} }
virtual void set_texcoord(HalfedgeHandle _heh, const Vec3f& _texcoord) virtual void set_texcoord(HalfedgeHandle _heh, const Vec3f& _texcoord) override
{ {
if (mesh_.has_halfedge_texcoords3D()) if (mesh_.has_halfedge_texcoords3D())
mesh_.set_texcoord3D(_heh, vector_cast<TexCoord3D>(_texcoord)); mesh_.set_texcoord3D(_heh, vector_cast<TexCoord3D>(_texcoord));
} }
virtual void set_status(HalfedgeHandle _heh, const OpenMesh::Attributes::StatusInfo& _status) virtual void set_status(HalfedgeHandle _heh, const OpenMesh::Attributes::StatusInfo& _status) override
{ {
if (!mesh_.has_halfedge_status()) if (!mesh_.has_halfedge_status())
mesh_.request_halfedge_status(); mesh_.request_halfedge_status();
@@ -297,31 +297,31 @@ public:
// edge attributes // edge attributes
virtual void set_color(EdgeHandle _eh, const Vec4uc& _color) virtual void set_color(EdgeHandle _eh, const Vec4uc& _color) override
{ {
if (mesh_.has_edge_colors()) if (mesh_.has_edge_colors())
mesh_.set_color(_eh, color_cast<Color>(_color)); mesh_.set_color(_eh, color_cast<Color>(_color));
} }
virtual void set_color(EdgeHandle _eh, const Vec3uc& _color) virtual void set_color(EdgeHandle _eh, const Vec3uc& _color) override
{ {
if (mesh_.has_edge_colors()) if (mesh_.has_edge_colors())
mesh_.set_color(_eh, color_cast<Color>(_color)); mesh_.set_color(_eh, color_cast<Color>(_color));
} }
virtual void set_color(EdgeHandle _eh, const Vec4f& _color) virtual void set_color(EdgeHandle _eh, const Vec4f& _color) override
{ {
if (mesh_.has_edge_colors()) if (mesh_.has_edge_colors())
mesh_.set_color(_eh, color_cast<Color>(_color)); mesh_.set_color(_eh, color_cast<Color>(_color));
} }
virtual void set_color(EdgeHandle _eh, const Vec3f& _color) virtual void set_color(EdgeHandle _eh, const Vec3f& _color) override
{ {
if (mesh_.has_edge_colors()) if (mesh_.has_edge_colors())
mesh_.set_color(_eh, color_cast<Color>(_color)); mesh_.set_color(_eh, color_cast<Color>(_color));
} }
virtual void set_status(EdgeHandle _eh, const OpenMesh::Attributes::StatusInfo& _status) virtual void set_status(EdgeHandle _eh, const OpenMesh::Attributes::StatusInfo& _status) override
{ {
if (!mesh_.has_edge_status()) if (!mesh_.has_edge_status())
mesh_.request_edge_status(); mesh_.request_edge_status();
@@ -330,44 +330,44 @@ public:
// face attributes // face attributes
virtual void set_normal(FaceHandle _fh, const Vec3f& _normal) virtual void set_normal(FaceHandle _fh, const Vec3f& _normal) override
{ {
if (mesh_.has_face_normals()) if (mesh_.has_face_normals())
mesh_.set_normal(_fh, vector_cast<Normal>(_normal)); mesh_.set_normal(_fh, vector_cast<Normal>(_normal));
} }
virtual void set_color(FaceHandle _fh, const Vec3uc& _color) virtual void set_color(FaceHandle _fh, const Vec3uc& _color) override
{ {
if (mesh_.has_face_colors()) if (mesh_.has_face_colors())
mesh_.set_color(_fh, color_cast<Color>(_color)); mesh_.set_color(_fh, color_cast<Color>(_color));
} }
virtual void set_color(FaceHandle _fh, const Vec4uc& _color) virtual void set_color(FaceHandle _fh, const Vec4uc& _color) override
{ {
if (mesh_.has_face_colors()) if (mesh_.has_face_colors())
mesh_.set_color(_fh, color_cast<Color>(_color)); mesh_.set_color(_fh, color_cast<Color>(_color));
} }
virtual void set_color(FaceHandle _fh, const Vec3f& _color) virtual void set_color(FaceHandle _fh, const Vec3f& _color) override
{ {
if (mesh_.has_face_colors()) if (mesh_.has_face_colors())
mesh_.set_color(_fh, color_cast<Color>(_color)); mesh_.set_color(_fh, color_cast<Color>(_color));
} }
virtual void set_color(FaceHandle _fh, const Vec4f& _color) virtual void set_color(FaceHandle _fh, const Vec4f& _color) override
{ {
if (mesh_.has_face_colors()) if (mesh_.has_face_colors())
mesh_.set_color(_fh, color_cast<Color>(_color)); mesh_.set_color(_fh, color_cast<Color>(_color));
} }
virtual void set_status(FaceHandle _fh, const OpenMesh::Attributes::StatusInfo& _status) virtual void set_status(FaceHandle _fh, const OpenMesh::Attributes::StatusInfo& _status) override
{ {
if (!mesh_.has_face_status()) if (!mesh_.has_face_status())
mesh_.request_face_status(); mesh_.request_face_status();
mesh_.status(_fh) = _status; mesh_.status(_fh) = _status;
} }
virtual void add_face_texcoords( FaceHandle _fh, VertexHandle _vh, const std::vector<Vec2f>& _face_texcoords) virtual void add_face_texcoords( FaceHandle _fh, VertexHandle _vh, const std::vector<Vec2f>& _face_texcoords) override
{ {
// get first halfedge handle // get first halfedge handle
HalfedgeHandle cur_heh = mesh_.halfedge_handle(_fh); HalfedgeHandle cur_heh = mesh_.halfedge_handle(_fh);
@@ -384,7 +384,7 @@ public:
} }
} }
virtual void add_face_texcoords( FaceHandle _fh, VertexHandle _vh, const std::vector<Vec3f>& _face_texcoords) virtual void add_face_texcoords( FaceHandle _fh, VertexHandle _vh, const std::vector<Vec3f>& _face_texcoords) override
{ {
// get first halfedge handle // get first halfedge handle
HalfedgeHandle cur_heh = mesh_.halfedge_handle(_fh); HalfedgeHandle cur_heh = mesh_.halfedge_handle(_fh);
@@ -401,13 +401,15 @@ public:
} }
} }
virtual void set_face_texindex( FaceHandle _fh, int _texId ) { virtual void set_face_texindex( FaceHandle _fh, int _texId ) override
{
if ( mesh_.has_face_texture_index() ) { if ( mesh_.has_face_texture_index() ) {
mesh_.set_texture_index(_fh , _texId); mesh_.set_texture_index(_fh , _texId);
} }
} }
virtual void add_texture_information( int _id , std::string _name ) { virtual void add_texture_information( int _id , std::string _name ) override
{
OpenMesh::MPropHandleT< std::map< int, std::string > > property; OpenMesh::MPropHandleT< std::map< int, std::string > > property;
if ( !mesh_.get_property_handle(property,"TextureMapping") ) { if ( !mesh_.get_property_handle(property,"TextureMapping") ) {
@@ -420,26 +422,26 @@ public:
// low-level access to mesh // low-level access to mesh
virtual BaseKernel* kernel() { return &mesh_; } virtual BaseKernel* kernel() override { return &mesh_; }
bool is_triangle_mesh() const bool is_triangle_mesh() const override
{ return Mesh::is_triangles(); } { return Mesh::is_triangles(); }
void reserve(unsigned int nV, unsigned int nE, unsigned int nF) void reserve(unsigned int nV, unsigned int nE, unsigned int nF) override
{ {
mesh_.reserve(nV, nE, nF); mesh_.reserve(nV, nE, nF);
} }
// query number of faces, vertices, normals, texcoords // query number of faces, vertices, normals, texcoords
size_t n_vertices() const { return mesh_.n_vertices(); } size_t n_vertices() const override { return mesh_.n_vertices(); }
size_t n_faces() const { return mesh_.n_faces(); } size_t n_faces() const override { return mesh_.n_faces(); }
size_t n_edges() const { return mesh_.n_edges(); } size_t n_edges() const override { return mesh_.n_edges(); }
void prepare() { } void prepare() override{ }
void finish() { } void finish() override { }
private: private: