Triangles/src/triangle.hpp
Stephen Seo 2919be2aff WIP Replace SFML with Raylib
Need to fix Raygui usage in helpers.hpp.
Need to fix triangles being drawn flipped over the x-axis.
2021-03-29 17:05:27 +09:00

29 lines
780 B
C++

#ifndef TRIANGLES_TRIANGLE_HPP
#define TRIANGLES_TRIANGLE_HPP
#include <array>
#include "shape.hpp"
namespace Tri {
struct Triangle : public Shape {
Triangle();
Triangle(std::array<glm::vec2, 3> vertices);
Triangle(std::array<glm::vec2, 3> vertices, Color fillColor);
Triangle(std::array<glm::vec2, 3> vertices, Color fillColor, Color outlineColor);
std::array<glm::vec2, 3> vertices;
virtual Shape& draw() override;
virtual void getVertices(std::vector<glm::vec2> &verticesOut) const override;
virtual void getTransformedVertices(std::vector<glm::vec2> &verticesOut) const override;
virtual float getRadius() const override;
virtual void setRadius(float /* radius */) override {};
}; // struct Triangle
} // namespace Tri
#endif