Raftel Engine
 
Loading...
Searching...
No Matches
shape.hpp
Go to the documentation of this file.
1
18
19#ifndef __SHAPE_H__
20#define __SHAPE_H__ 1
21
22#pragma once
23
24#include <vector>
25#include "raftel\transform.hpp"
26
27namespace Raftel {
28
38 class Shape {
39 public:
40
49 Shape(const std::vector<float>& vertices);
50
58 void draw();
59
67
69
70 private:
71 std::vector<float> vertices;
72 unsigned int VAO, VBO;
73
81 void setupShape();
82 };
83} // namespace
84
85#endif // !__SHAPE_HPP__
void draw()
Renders the shape to the screen.
~Shape()
Destroy the Shape object and release OpenGL resources.
Shape(const std::vector< float > &vertices)
Construct a new Shape object with the given vertices.
Transform2D tr
The 2D transformation applied to the shape.
Definition shape.hpp:68
Represents a 2D transformation for an object (translation, rotation, and scaling).
Definition transform.hpp:60
Provides the definition of 2D transformation operations for objects.