33#include <wfmath/vector.h>
34#include <wfmath/point.h>
35#include <wfmath/const.h>
36#include <wfmath/rotmatrix.h>
37#include <wfmath/axisbox.h>
38#include <wfmath/ball.h>
39#include <wfmath/intersect_decls.h>
55template<const
int dim>
70 friend std::ostream& operator<< <dim>(std::ostream& os,
const Shape& s);
72 friend std::istream&
operator>> <dim>(std::istream& is,
Shape& s);
A dim dimensional axis-aligned box.
A dim dimensional rotation matrix. Technically, a member of the group O(dim).
A fake class which documents the generic parts of the WFMath interface.
Shape & rotatePoint(const RotMatrix< dim > &m, const Point< dim > &p)
shape: rotate the shape while holding the Point p fixed.
Shape & moveCenterTo(const Point< dim > &p)
shape: move the shape, moving the center to the Point p
Point< dim > getCorner(size_t i) const
shape: return the position of the i'th corner, where 0 <= i < numCorners()
Point< dim > getCenter() const
shape: return the position of the center of the shape
bool isEqualTo(const Shape &s, CoordType tolerance=numeric_constants< CoordType >::epsilon()) const
generic: check if two classes are equal, up to a given tolerance
Shape & rotateCenter(const RotMatrix< dim > &m)
shape: rotate the shape while holding the center fixed
AxisBox< dim > boundingBox() const
shape: return the minimal axis-aligned bounding box
bool operator!=(const Shape &s) const
generic: check if two classes are not equal, up to tolerance WFMATH_EPSILON
Shape & moveCornerTo(const Point< dim > &p, size_t corner)
shape: move the shape, moving the given corner to the Point p
bool isValid() const
generic: returns true if the class instance has been initialized
Shape & shift(const Vector< dim > &v)
shape: move the shape by an amount given by the Vector v
Ball< dim > boundingSphere() const
shape: return the minimal bounding sphere
bool operator==(const Shape &s) const
generic: check if two classes are equal, up to tolerance WFMATH_EPSILON
Ball< dim > boundingSphereSloppy() const
size_t numCorners() const
shape: return the number of corners in the shape.
Shape & rotateCorner(const RotMatrix< dim > &m, size_t corner)
shape: rotate the shape while holding the given corner fixed
Generic library namespace.
double CoordType
Basic floating point type.