-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRectangle.hpp
47 lines (44 loc) · 1.43 KB
/
Rectangle.hpp
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//#pragma once
#ifndef __RECTANGLE_HPP__
#define __RECTANGLE_HPP__
#include "Shape.hpp"
//#include "shapes2d.h"
#include <string>
#include "Effects.hpp"
#include <memory>
namespace QUAD_DEF
{
//template <typename T>
class Rectangle : public Shape
{
public:
Rectangle();
//Rectangle(const Point* const p1, const Point* const p2);
//Rectangle::Rectangle(T x0, T y0, T x1, T y1);
Rectangle(float x0, float y0, float x1, float y1);
//Rectangle(const Rect* const r);
Rectangle(const glm::vec3& p1, const glm::vec3& p2, const glm::vec3& p3, const glm::vec3& p4);
//const Rect* getRectD();
std::string getName();
double getFreq();
void setIsRender(bool ir);
bool getIsRender();
Rectangle(const glm::vec3& p1,float h, float w);
void StorePoints(const glm::vec3& p1, const glm::vec3& p2, const glm::vec3& p3, const glm::vec3& p4);
void render(int positionHandle, int modelHandle, int textureHandle);
void render(int positionHandle, int modelHandle,int colorHandle,float *color);
virtual ~Rectangle(void);
void setEffect(std::unique_ptr<Effects> eff);
std::unique_ptr<Effects> eff;
private:
void spc_dat_init(float x0, float y0, float x1, float y1);
void initialize(const glm::vec3& p1, const glm::vec3& p2, const glm::vec3& p3, const glm::vec3& p4);
float *vertexAttributes;
//const Rect *Rd;
double freq;
bool isRender;
std::string name;
//T *vertexAttributes;
};
}
#endif //__RECTANGLE_HPP__