1 #ifndef _KIPR_GEOMETRY_GEOMETRY_HPP_
2 #define _KIPR_GEOMETRY_GEOMETRY_HPP_
75 Point3(
const T &x,
const T &y,
const T &z)
126 template <
typename T>
130 Rect(
const T &x,
const T &y,
const T &width,
const T &height)
160 return Point2<T>(m_x + m_width / 2, m_y + m_height / 2);
185 return m_width * m_height;
Definition: geometry.hpp:13
void setRow(const T &row)
Definition: geometry.hpp:56
Point2(const T &x, const T &y)
Definition: geometry.hpp:15
const T & x() const
Definition: geometry.hpp:21
void setX(const T &x)
Definition: geometry.hpp:41
const T & row() const
Definition: geometry.hpp:26
const T & column() const
Definition: geometry.hpp:36
point2 toCPoint2() const
Definition: geometry.hpp:61
const T & y() const
Definition: geometry.hpp:31
void setColumn(const T &column)
Definition: geometry.hpp:46
void setY(const T &y)
Definition: geometry.hpp:51
Definition: geometry.hpp:73
void setZ(const T &z)
Definition: geometry.hpp:107
const T & y() const
Definition: geometry.hpp:87
void setY(const T &y)
Definition: geometry.hpp:102
const T & x() const
Definition: geometry.hpp:82
void setX(const T &x)
Definition: geometry.hpp:97
const T & z() const
Definition: geometry.hpp:92
Point3(const T &x, const T &y, const T &z)
Definition: geometry.hpp:75
point3 toCPoint3() const
Definition: geometry.hpp:112
Definition: geometry.hpp:128
const T & height() const
Definition: geometry.hpp:153
void setY(const T &y)
Definition: geometry.hpp:168
Rect(const T &x, const T &y, const T &width, const T &height)
Definition: geometry.hpp:130
void setHeight(const T &height)
Definition: geometry.hpp:178
Point2< T > center() const
Definition: geometry.hpp:158
const T & width() const
Definition: geometry.hpp:148
const T & x() const
Definition: geometry.hpp:138
rectangle toCRectangle() const
Definition: geometry.hpp:188
void setX(const T &x)
Definition: geometry.hpp:163
void setWidth(const T &width)
Definition: geometry.hpp:173
const T & y() const
Definition: geometry.hpp:143
T area() const
Definition: geometry.hpp:183
#define EXPORT_SYM
Definition: export.h:7
EXPORT_SYM rectangle create_rectangle(int ulx, int uly, int width, int height)
Create a rectangle object.
EXPORT_SYM point3 create_point3(int x, int y, int z)
Create a point3 object.
EXPORT_SYM point2 create_point2(int x, int y)
Create a point2 object.
Rect< double > Rectd
Definition: geometry.hpp:201
Point2< float > Point2f
Definition: geometry.hpp:123
Rect< float > Rectf
Definition: geometry.hpp:200
Point2< double > Point2d
Definition: geometry.hpp:124
A 2D point; has x and y.
Definition: geometry.h:15
A 3D point; has x, y, and z.
Definition: geometry.h:25
A rectangle object.
Definition: geometry.h:36