25#include "common/formats/json.h"
26#include "common/hashmap.h"
27#include "common/rect.h"
28#include "math/vector2d.h"
29#include "math/matrix4.h"
31#include "twp/objectanimation.h"
40 uint operator()(Twp::Facing val)
const {
return (uint)val; }
53 Vector2i(
int x_,
int y_) : x(x_), y(y_) {}
54 Vector2i(
float x_,
float y_) : x(round(x_)), y(round(y_)) {}
55 explicit Vector2i(
const Math::Vector2d &p) : x(round(p.getX())), y(round(p.getY())) {}
56 explicit operator Math::Vector2d()
const {
57 return Math::Vector2d(x, y);
78template<
typename T,
class DL = Common::DefaultDeleter<T> >
82Facing getFacing(
int dir, Facing facing);
83Facing flip(Facing facing);
95 for (
size_t i = 0; i < array.
size(); i++) {
105 for (
size_t i = 0; i < array.
size(); i++) {
106 if (array[i].get() == o) {
119 for (
size_t i = 1; i < values.
size(); i++) {
120 if (values[i] < min) {
131 for (
size_t i = 0; i < arr.
size(); i++) {
132 result[arr.
size() - 1 - i] = arr[i];
143void scale(Math::Matrix4 &m,
const Math::Vector2d &v);
144Math::Vector2d operator*(
const Math::Vector2d &v,
float f);
145float distance(
const Math::Vector2d &p1,
const Math::Vector2d &p2);
146float distanceSquared(
const Math::Vector2d &p1,
const Math::Vector2d &p2);
147float distanceToSegment(
const Math::Vector2d &p,
const Math::Vector2d &v,
const Math::Vector2d &w);
148float dot(
const Math::Vector2d &u,
const Math::Vector2d &v);
149float length(
const Math::Vector2d &v);
150bool lineSegmentsCross(
const Math::Vector2d &a,
const Math::Vector2d &b,
const Math::Vector2d &c,
const Math::Vector2d &d);
size_type size() const
Definition: array.h:316
bool empty() const
Definition: array.h:352
It remove(It first, It last, const T &val)
Definition: algorithm.h:466
In find(In first, In last, const T &v)
Definition: algorithm.h:225
Definition: algorithm.h:29