Last active
May 11, 2024 16:41
-
-
Save awilki01/776e360834f768b5693fcbbeb471cfda to your computer and use it in GitHub Desktop.
Rectangle.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef RECTANGLE_H | |
#define RECTANGLE_H | |
#include <vector> | |
#include "Shader.h" | |
#include <glad/glad.h> | |
#include <GLFW/glfw3.h> | |
#include <glm/glm.hpp> | |
#include <glm/gtc/matrix_transform.hpp> | |
#include <glm/gtc/type_ptr.hpp> | |
#include "Vector3D.hpp" | |
class Rectangle | |
{ | |
public: | |
Rectangle(); | |
~Rectangle(); | |
void draw(const Shader& shader); | |
void scale(const Shader& shader, glm::vec3& vFactor); | |
void translate(const Shader& shader, glm::vec3& vTranslate); | |
private: | |
float mVertices[12] {}; | |
unsigned int mIndices[6] {}; | |
unsigned int mVBO, mVAO, mEBO; | |
glm::mat4 mModel; | |
}; | |
#endif //RECTANGLE_H |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment