25 #include "glm/gtc/type_ptr.hpp" 26 #include "glm/gtx/intersect.hpp" 39 _visible(false), _prepared(false) {
65 std::vector<glm::vec3>::const_iterator it1, it2;
66 std::vector<SlopeData>::const_iterator it3;
76 if (
isRayIntersect(x, y, it1->x, it1->y, it2->x, it2->y, it3->m, it3->isVert))
84 return (count % 2) ? true :
false;
100 glColor4f(0.0f, 0.0f, 1.0f, 0.5f);
101 glBegin(GL_TRIANGLES);
103 for (
size_t i = 2; i < vertexCount; ++i) {
104 glVertex3fv(glm::value_ptr(
_geometry[0]));
105 glVertex3fv(glm::value_ptr(
_geometry[i - 1]));
106 glVertex3fv(glm::value_ptr(
_geometry[i]));
110 glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
118 std::vector<glm::vec3>::iterator it;
125 std::vector<glm::vec3>::iterator it1, it2;
134 float dx = it2->x - it1->x;
135 float dy = it2->y - it1->y;
165 float m,
bool isVert)
const {
168 if ((y > y1) && (y > y2))
173 if ((x0 == x1) || (x0 == x2)) {
179 if ((x0 < x1) || (x0 > x2))
182 if ((x0 < x2) || (x0 > x1))
190 float yint = m * (x0 - x1) + y1;
Handling version V3.2/V3.3 of BioWare's GFFs (generic file format).
bool isIn(float x, float y) const
Only render transparent parts.
bool isRayIntersect(float x, float y, float x1, float y1, float x2, float y2, float m, bool isVert) const
std::vector< SlopeData > _sides
Common::BoundingBox _boundingbox
void add(float x, float y, float z)
void render(Graphics::RenderPass pass)
Render the object.
void setVisible(bool visible)
std::vector< glm::vec3 > _geometry
The global resource manager for Aurora resources.
void calculateDistance()
Calculate the object's distance.
bool contains(float x, float y) const