summaryrefslogtreecommitdiff
path: root/engine-ocean/Graphics/shape.h
blob: 6385d2b4b9dbc1179166b264e00a8d3306f99453 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once

#include "GLWrappers/vao.h"
#include "Graphics/material.h"
#include <Eigen/Dense>

class Shape{
public:
    Shape(std::shared_ptr<VAO> vao);
    Shape(std::shared_ptr<VAO> vao, std::shared_ptr<Material> shape_material);

    ~Shape();

    // Draw function
    void draw();
    std::shared_ptr<Material> getShapeMaterial();
    bool hasMaterial();
    void updateVAO(const std::vector<Eigen::Vector3f> &vertices, const std::vector<Eigen::Vector3i> &faces);




private:
    std::shared_ptr<VAO> m_vao;
    std::shared_ptr<Material> m_shape_material;
    bool hasShapeSpecificMaterial = false;
};