started work on CompoundShape
This commit is contained in:
@@ -14,17 +14,21 @@ struct ShapeInfo {
|
||||
|
||||
class Shape {
|
||||
public:
|
||||
glm::vec3 pos;
|
||||
glm::vec3 rotation;
|
||||
glm::vec3 scale;
|
||||
glm::mat4 transform;
|
||||
|
||||
Shape(
|
||||
std::shared_ptr<Shader> shader,
|
||||
ShapeInfo& shapeInfo,
|
||||
glm::vec3 pos = { 0.0f, 0.0f, 0.0f }
|
||||
ShapeInfo& shapeInfo
|
||||
);
|
||||
|
||||
~Shape();
|
||||
|
||||
void init();
|
||||
void draw() const;
|
||||
void reset_transform();
|
||||
void translate(const glm::vec3& translation);
|
||||
void rotate(const float rotation_rad, const glm::vec3& axis);
|
||||
void scale(const glm::vec3& scale_amount);
|
||||
|
||||
private:
|
||||
std::vector<float> vertices;
|
||||
|
||||
Reference in New Issue
Block a user