19#ifndef HEADER_QUAD_HPP
20#define HEADER_QUAD_HPP
24#include "utils/leak_check.hpp"
25#include "utils/no_copy.hpp"
26#include "utils/vec3.hpp"
30 namespace video {
struct S3DVertex;
struct S3DVertexSkinnedMesh; }
71 const
Vec3 & normal =
Vec3(0, 1, 0),
int index = -1,
72 bool invisible = false,
bool ignored = false);
76 void getVertices(video::S3DVertex *v,
const video::SColor &color)
const;
79 const video::SColor &color)
const;
90 void setHeightTesting(
float min,
float max)
92 m_min_height_testing = min;
93 m_max_height_testing = max;
111 bool isIgnored()
const {
return m_is_ignored; }
118 bool ignore_vertical =
false)
const;
124 virtual float getDistance2FromPoint(
const Vec3 &xyz)
const
Utility class, you can inherit from this class to disallow the assignment operator and copy construct...
Definition: no_copy.hpp:26
int m_index
Index of this quad, used only with graph.
Definition: quad.hpp:48
void setQuad(const Vec3 &p0, const Vec3 &p1, const Vec3 &p2, const Vec3 &p3)
Set new quad coordinates.
Definition: quad.cpp:46
const Vec3 & getCenter() const
Returns the center of a quad.
Definition: quad.hpp:85
float getMinHeight() const
Returns the minimum height of a quad.
Definition: quad.hpp:97
bool isInvisible() const
Returns true of this quad is invisible, i.e.
Definition: quad.hpp:109
float m_max_height
The maximum height of the quad, used together with m_min_height to distinguish between quads which ar...
Definition: quad.hpp:65
const Vec3 & getNormal() const
Returns the normal of this quad.
Definition: quad.hpp:114
Vec3 m_normal
Normal of the quad.
Definition: quad.hpp:51
int getIndex() const
Returns the index of this quad.
Definition: quad.hpp:100
void getSPMVertices(video::S3DVertexSkinnedMesh *v, const video::SColor &color) const
Sets the vertices in an spm vertex array to the 4 points of this quad.
Definition: quad.cpp:91
const Vec3 & operator[](int i) const
Returns the i-th.
Definition: quad.hpp:82
Vec3 m_center
The center of all four points, which is used by the AI.
Definition: quad.hpp:45
bool m_invisible
Set to true if this quad should not be shown in the minimap.
Definition: quad.hpp:55
virtual bool pointInside(const Vec3 &p, bool ignore_vertical=false) const
Returns true if a point is inside this quad.
Definition: quad.cpp:115
float m_min_height
The minimum height of the quad, used in case that several quads are on top of each other when determi...
Definition: quad.hpp:61
Vec3 m_p[4]
The four points of a quad.
Definition: quad.hpp:41
void getVertices(video::S3DVertex *v, const video::SColor &color) const
Sets the vertices in a irrlicht vertex array to the 4 points of this quad.
Definition: quad.cpp:64
virtual bool is3DQuad() const
Returns true if this quad is 3D, which additional 3D testing is used in pointInside.
Definition: quad.hpp:122
A wrapper around bullets btVector3 to include conventient conversion functions (e....
Definition: vec3.hpp:35