From 47cd8a592ecad52c1b01f27d23476c0a5afeb7f1 Mon Sep 17 00:00:00 2001 From: Sebastian Park Date: Wed, 10 Apr 2024 02:45:04 -0400 Subject: initial --- src/graphics/shape.cpp | 6 ++++++ src/graphics/shape.h | 2 ++ 2 files changed, 8 insertions(+) (limited to 'src/graphics') diff --git a/src/graphics/shape.cpp b/src/graphics/shape.cpp index 8fe35b1..9459306 100644 --- a/src/graphics/shape.cpp +++ b/src/graphics/shape.cpp @@ -104,6 +104,12 @@ void Shape::setModelMatrix(const Affine3f &model) { m_modelMatrix = model.matrix // ================== General Graphics Stuff +void Shape::setColor(float r, float g, float b) { + m_red = r; + m_green = g; + m_blue = b; +} + void Shape::draw(Shader *shader, GLenum mode) { Eigen::Matrix3f m3 = m_modelMatrix.topLeftCorner(3, 3); diff --git a/src/graphics/shape.h b/src/graphics/shape.h index 3ba81fb..1451c85 100644 --- a/src/graphics/shape.h +++ b/src/graphics/shape.h @@ -31,6 +31,8 @@ public: void setModelMatrix(const Eigen::Affine3f &model); + void setColor(float r, float g, float b); + void draw(Shader *shader, GLenum mode); SelectMode select(Shader *shader, int vertex); bool selectWithSpecifiedMode(Shader *shader, int vertex, SelectMode mode); -- cgit v1.2.3-70-g09d2