Public Member Functions | |
std::vector< std::pair< float, float > > const & | shape () const |
float | shape_radius () const |
std::vector< std::pair< float, float > > const & | points () const |
float | points_radius () const |
float | x () const |
void | set_x (float x) final |
float | y () const |
void | set_y (float y) final |
float | angle () const |
void | set_angle (float angle) final |
float | scale () const |
void | set_scale (float scale) |
std::array< float, 4 > const & | transformation_matrix () const |
float | x_offset () const final |
void | set_x_offset (float x_offset) |
float | y_offset () const final |
void | set_y_offset (float y_offset) |
float | angle_offset () const final |
void | set_angle_offset (float angle_offset) |
bool | attach_x () const final |
void | set_attach_x (bool attach_x) |
bool | attach_y () const final |
void | set_attach_y (bool attach_y) |
bool | attach_angle () const final |
void | set_attach_angle (bool attach_angle) |
bool | x_angle_lock () const final |
void | set_x_angle_lock (bool x_angle_lock) |
bool | y_angle_lock () const final |
void | set_y_angle_lock (bool y_angle_lock) |
polygon (std::vector< std::pair< float, float > > const &shape={{0, 0}, {0, 0}, {0, 0}}, float x=0, float y=0, float angle=0, float scale=1, float x_offset=0, float y_offset=0, float angle_offset=0, bool attach_x=true, bool attach_y=true, bool attach_angle=true, bool x_angle_lock=true, bool y_angle_lock=true) | |
bool | inside (float x, float y) const |
template<typename T > | |
std::enable_if_t< std::is_same_v< T, bool >||std::is_same_v< T, float >, T > | overlap (polygon const &other) const |
![]() |
Definition at line 35 of file polygon.hpp.
|
explicit |
Definition at line 209 of file polygon.cpp.
|
nodiscard |
Definition at line 82 of file polygon.cpp.
|
nodiscard |
Definition at line 86 of file polygon.cpp.
|
nodiscard |
Definition at line 90 of file polygon.cpp.
|
nodiscard |
Definition at line 94 of file polygon.cpp.
|
nodiscard |
Definition at line 98 of file polygon.cpp.
|
finalvirtual |
Implements wze::component.
Definition at line 102 of file polygon.cpp.
|
nodiscard |
Definition at line 107 of file polygon.cpp.
|
finalvirtual |
Implements wze::component.
Definition at line 111 of file polygon.cpp.
|
nodiscard |
Definition at line 116 of file polygon.cpp.
|
finalvirtual |
Implements wze::component.
Definition at line 120 of file polygon.cpp.
|
nodiscard |
Definition at line 128 of file polygon.cpp.
void wze::polygon::set_scale | ( | float | scale | ) |
Definition at line 132 of file polygon.cpp.
|
nodiscard |
Definition at line 141 of file polygon.cpp.
|
nodiscardfinalvirtual |
Implements wze::component.
Definition at line 145 of file polygon.cpp.
void wze::polygon::set_x_offset | ( | float | x_offset | ) |
Definition at line 149 of file polygon.cpp.
|
nodiscardfinalvirtual |
Implements wze::component.
Definition at line 153 of file polygon.cpp.
void wze::polygon::set_y_offset | ( | float | y_offset | ) |
Definition at line 157 of file polygon.cpp.
|
nodiscardfinalvirtual |
Implements wze::component.
Definition at line 161 of file polygon.cpp.
void wze::polygon::set_angle_offset | ( | float | angle_offset | ) |
Definition at line 165 of file polygon.cpp.
|
nodiscardfinalvirtual |
Implements wze::component.
Definition at line 169 of file polygon.cpp.
void wze::polygon::set_attach_x | ( | bool | attach_x | ) |
Definition at line 173 of file polygon.cpp.
|
nodiscardfinalvirtual |
Implements wze::component.
Definition at line 177 of file polygon.cpp.
void wze::polygon::set_attach_y | ( | bool | attach_y | ) |
Definition at line 181 of file polygon.cpp.
|
nodiscardfinalvirtual |
Implements wze::component.
Definition at line 185 of file polygon.cpp.
void wze::polygon::set_attach_angle | ( | bool | attach_angle | ) |
Definition at line 189 of file polygon.cpp.
|
nodiscardfinalvirtual |
Implements wze::component.
Definition at line 193 of file polygon.cpp.
void wze::polygon::set_x_angle_lock | ( | bool | x_angle_lock | ) |
Definition at line 197 of file polygon.cpp.
|
nodiscardfinalvirtual |
Implements wze::component.
Definition at line 201 of file polygon.cpp.
void wze::polygon::set_y_angle_lock | ( | bool | y_angle_lock | ) |
Definition at line 205 of file polygon.cpp.
|
nodiscard |
Definition at line 231 of file polygon.cpp.
|
inlinenodiscard |
Definition at line 369 of file polygon.hpp.