From: Mikko Rasa Date: Tue, 4 Oct 2016 08:34:44 +0000 (+0300) Subject: Add new matrix manipulation functions to VertexBuilder X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=661073576254a203fa497fb4c2f550dc269cd5de;p=libs%2Fgl.git Add new matrix manipulation functions to VertexBuilder For symmetry with Renderer. --- diff --git a/source/vertexbuilder.h b/source/vertexbuilder.h index 998f7a6c..49f0dcf5 100644 --- a/source/vertexbuilder.h +++ b/source/vertexbuilder.h @@ -33,6 +33,16 @@ public: virtual ~VertexBuilder() { } + void set_matrix(const Matrix &m) + { mtx = m; } + + void transform(const Matrix &m) + { mtx *= m; } + + const Matrix &get_matrix() const + { return mtx.top(); } + + // Deprecated MatrixStack &matrix() { return mtx; }