29#include <boost/python.hpp>
35using namespace boost::python;
40 class_<Geom::Affine>(
"Affine", init<double, double, double, double, double, double>())
42 .def(init<Geom::Rotate>())
43 .def(init<Geom::Scale>())
44 .def(init<Geom::Translate>())
45 .def(self_ns::str(self))
61 .def(self * other<Geom::Translate>())
62 .def(self * other<Geom::Scale>())
63 .def(self * other<Geom::Rotate>())
66 class_<Geom::Scale>(
"Scale", init<double, double>())
75 class_<Geom::Translate>(
"Translate", init<double, double>())
76 .def(init<Geom::Point>())
82 .def(self * other<Geom::Rotate>())
83 .def(self * other<Geom::Scale>())
86 class_<Geom::Rotate>(
"Rotate", init<double>())
91 .staticmethod(
"from_degrees")
3x3 matrix representing an affine transformation.
void setYAxis(Point const &vec)
Coord det() const
Calculate the determinant.
void setTranslation(Point const &loc)
Sets the translation imparted by the Affine.
Point translation() const
Gets the translation imparted by the Affine.
Coord descrim() const
Calculate the descriminant.
bool isScale(Coord eps=EPSILON) const
Check whether this matrix represents pure scaling.
bool isUniformScale(Coord eps=EPSILON) const
Check whether this matrix represents pure uniform scaling.
void setXAxis(Point const &vec)
Coord expansionX() const
Calculates the amount of x-scaling imparted by the Affine.
Coord descrim2() const
Calculate the square of the descriminant.
void setIdentity()
Sets this matrix to be the Identity Affine.
bool isTranslation(Coord eps=EPSILON) const
Check whether this matrix represents a pure translation.
Affine inverse() const
Compute the inverse matrix.
bool isRotation(Coord eps=EPSILON) const
Check whether this matrix represents a pure rotation.
Coord expansionY() const
Calculates the amount of y-scaling imparted by the Affine.
Two-dimensional point that doubles as a vector.
static Rotate from_degrees(Coord deg)
Construct a rotation from its angle in degrees.
Translate inverse() const
Get the inverse translation.