31 #ifndef SWORD25_REGION_H 32 #define SWORD25_REGION_H 34 #include "sword25/kernel/common.h" 35 #include "sword25/kernel/persistable.h" 36 #include "sword25/math/vertex.h" 37 #include "sword25/math/polygon.h" 38 #include "common/rect.h" 69 static uint create(REGION_TYPE type);
144 return static_cast<int>(
_polygons.size() - 1);
170 bool isLineOfSight(
const Vertex &a,
const Vertex &b)
const;
181 virtual void setPos(
int x,
int y);
REGION_TYPE _type
This specifies the type of object.
Definition: region.h:204
Common::Array< Polygon > _polygons
This array contains all the polygons that define the region. The first element of.
Definition: region.h:211
int getHoleCount() const
Definition: region.h:143
const Polygon & getContour() const
Definition: region.h:136
const Vertex & getPosition() const
Definition: region.h:100
Eine Polygonklasse.
Definition: polygon.h:46
Vertex findClosestPointOnLine(const Vertex &lineStart, const Vertex &lineEnd, const Vertex point) const
virtual void setPos(int x, int y)
Vertex findClosestRegionPoint(const Vertex &point) const
Definition: persistable.h:39
Vertex getCentroid() const
virtual bool init(const Polygon &contour, const Common::Array< Polygon > *pHoles=NULL)
bool _valid
This variable indicates whether the current object state is valid.
Definition: region.h:206
int getPosX() const
Definition: region.h:107
bool isValid() const
Definition: region.h:93
int getPosY() const
Definition: region.h:114
int16 x
Definition: rect.h:46
int16 y
Definition: rect.h:47
bool isPointInRegion(const Vertex &vertex) const
const Polygon & getHole(uint i) const
Definition: region.h:230
Vertex _position
This vertex is the position of the region.
Definition: region.h:208
Common::Rect _boundingBox
The bounding box for the region.
Definition: region.h:213
Definition: outputpersistenceblock.h:39