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;
Definition: outputpersistenceblock.h:39
Definition: persistable.h:39
Eine Polygonklasse.
Definition: polygon.h:46
const Polygon & getContour() const
Definition: region.h:136
bool isPointInRegion(int x, int y) const
virtual void setPos(int x, int y)
bool isPointInRegion(const Vertex &vertex) const
int getPosX() const
Definition: region.h:107
Vertex _position
This vertex is the position of the region.
Definition: region.h:208
Common::Array< Polygon > _polygons
This array contains all the polygons that define the region. The first element of.
Definition: region.h:211
int getPosY() const
Definition: region.h:114
virtual bool init(const Polygon &contour, const Common::Array< Polygon > *pHoles=NULL)
Vertex findClosestRegionPoint(const Vertex &point) const
bool _valid
This variable indicates whether the current object state is valid.
Definition: region.h:206
bool isValid() const
Definition: region.h:93
Common::Rect _boundingBox
The bounding box for the region.
Definition: region.h:213
const Vertex & getPosition() const
Definition: region.h:100
Vertex findClosestPointOnLine(const Vertex &lineStart, const Vertex &lineEnd, const Vertex point) const
REGION_TYPE _type
This specifies the type of object.
Definition: region.h:204
const Polygon & getHole(uint i) const
Definition: region.h:230
Vertex getCentroid() const
int getHoleCount() const
Definition: region.h:143