support now face coords for OM reader/writer
This commit is contained in:
@@ -152,6 +152,9 @@ public:
|
||||
// set incident face handle for given halfedge
|
||||
virtual void set_face(HalfedgeHandle _heh, FaceHandle _fh) = 0;
|
||||
|
||||
// request texture coordinate property
|
||||
virtual void request_face_texcoords2D() = 0;
|
||||
|
||||
// set vertex texture coordinate
|
||||
virtual void set_texcoord(HalfedgeHandle _heh, const Vec2f& _texcoord) = 0;
|
||||
|
||||
|
||||
@@ -285,9 +285,14 @@ public:
|
||||
mesh_.set_face_handle(_heh, _fh);
|
||||
}
|
||||
|
||||
virtual void request_face_texcoords2D() override
|
||||
{
|
||||
if(!mesh_.has_halfedge_texcoords2D())
|
||||
mesh_.request_halfedge_texcoords2D();
|
||||
}
|
||||
|
||||
virtual void set_texcoord(HalfedgeHandle _heh, const Vec2f& _texcoord) override
|
||||
{
|
||||
{
|
||||
if (mesh_.has_halfedge_texcoords2D())
|
||||
mesh_.set_texcoord2D(_heh, vector_cast<TexCoord2D>(_texcoord));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user