-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathEllipsisGeometry.h
31 lines (24 loc) · 1.01 KB
/
EllipsisGeometry.h
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
#pragma once
#include "Geometry.h"
namespace dawn
{
class EllipsisGeometry : public Geometry
{
public:
EllipsisGeometry(float width, float height, unsigned int segments, vec4f uv) : m_width(width), m_height(height), m_segments(segments), m_uv(uv) { }
CONSTANTS::GeometryType type() const { return CONSTANTS::EllipsisGeometry; }
float width() const { return m_width; }
void width(float width) { setChanged(m_width != width); m_width = width; }
float height() const { return m_height; }
void height(float height) { setChanged(m_height != height); m_height = height; }
unsigned int segments() const { return m_segments; }
void segments(unsigned int segments) { setChanged(m_segments != segments); m_segments = segments; }
vec4f uv() const { return m_uv; }
void uv(vec4f uv) { setChanged(uv != m_uv); m_uv = uv; }
protected:
float m_width;
float m_height;
unsigned int m_segments;
vec4f m_uv;
};
}