22 #ifndef QDENGINE_QDCORE_QD_CONTOUR_H 23 #define QDENGINE_QDCORE_QD_CONTOUR_H 25 #include "qdengine/parser/xml_fwd.h" 26 #include "qdengine/xmath.h" 75 bool is_inside(
const Vect2s &pos)
const;
80 virtual bool load_script(
const xml::tag *p);
86 void add_contour_point(
const Vect2s &pt);
91 void insert_contour_point(
const Vect2s &pt,
int insert_pos = 0);
93 bool remove_contour_point(
int pos);
95 bool update_contour_point(
const Vect2s &pt,
int pos);
103 void divide_contour(
int shift = 1);
105 void mult_contour(
int shift = 1);
107 void shift_contour(
int dx,
int dy);
111 return _contour[pos];
114 void createMaskOld(
int x0,
int y0,
int x1,
int y1);
116 const byte *maskData()
const {
117 return &*_mask.begin();
132 return _contour.size();
139 bool is_mask_empty()
const {
140 return _contour.empty();
143 bool update_contour();
148 bool can_be_closed()
const;
151 bool is_contour_empty()
const;
173 #endif // QDENGINE_QDCORE_QD_CONTOUR_H
int size_x() const
Возвращает горизонтальный размер контура.
Definition: qd_contour.h:66
const Vect2s & mask_size() const
Возвращает размеры маски.
Definition: qd_contour.h:121
Контур.
Definition: qd_contour.h:39
void clear_contour()
Удаляет все точки из контура.
Definition: qd_contour.h:98
qdContourType contour_type() const
Возвращает тип контура.
Definition: qd_contour.h:57
qdContourType
Definition: qd_contour.h:41
const Vect2s & mask_pos() const
Возвращает координаты центра маски.
Definition: qd_contour.h:126
Прямоугольник
Definition: qd_contour.h:43
XML тег.
Definition: xml_tag.h:33
Базовый класс для игровых ресурсов.
Definition: console.h:28
Definition: algorithm.h:29
int contour_size() const
Возвращает количество точек в контуре.
Definition: qd_contour.h:131
const Std::vector< Vect2s > & get_contour() const
Возвращает массив точек контура.
Definition: qd_contour.h:135
void set_contour_type(qdContourType tp)
Устанавливает тип контура.
Definition: qd_contour.h:61
Окружность
Definition: qd_contour.h:45
const Vect2s & get_point(int pos) const
Возвращает координаты точки контура номер pos.
Definition: qd_contour.h:110
int size_y() const
Возвращает вертикальный размер контура.
Definition: qd_contour.h:70