diff --git a/tango_gl/include/tango-gl/drawable_object.h b/tango_gl/include/tango-gl/drawable_object.h index 2d0a5a06..ac7aecc6 100644 --- a/tango_gl/include/tango-gl/drawable_object.h +++ b/tango_gl/include/tango-gl/drawable_object.h @@ -40,6 +40,9 @@ class DrawableObject : public Transform { const std::vector& indices); void SetVertices(const std::vector& vertices, const std::vector& normals); + void SetVertices(const std::vector& vertices, + const std::vector& normals, + const std::vector& indices); virtual void Render(const glm::mat4& projection_mat, const glm::mat4& view_mat) const = 0; diff --git a/tango_gl/src/drawable_object.cc b/tango_gl/src/drawable_object.cc index e87974e7..f5382ea5 100644 --- a/tango_gl/src/drawable_object.cc +++ b/tango_gl/src/drawable_object.cc @@ -63,4 +63,12 @@ void DrawableObject::SetVertices(const std::vector& vertices, vertices_ = vertices; normals_ = normals; } + +void DrawableObject::SetVertices(const std::vector& vertices, + const std::vector& normals, + const std::vector& indices) { + vertices_ = vertices; + normals_ = normals; + indices_ = indices; +} } // namespace tango_gl