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.
Definition const.h:48
A dim dimensional ball.
Definition const.h:49
A dim dimensional point.
Definition point.h:96
A dim dimensional rotation matrix. Technically, a member of the group O(dim).
Definition rotmatrix.h:87
A fake class which documents the generic parts of the WFMath interface.
Definition shape.h:57
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
Definition shape.h:115
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
friend bool Contains(Shape< dim > &s1, Shape< dim > &s2, bool proper)
shape: Returns true if the first shape contains the second.
Shape & rotateCenter(const RotMatrix< dim > &m)
shape: rotate the shape while holding the center fixed
Definition shape.h:129
AxisBox< dim > boundingBox() const
shape: return the minimal axis-aligned bounding box
friend bool Intersect(Shape< dim > &s1, Shape< dim > &s2, bool proper)
shape: Returns true if the two shapes intersect.
bool operator!=(const Shape &s) const
generic: check if two classes are not equal, up to tolerance WFMATH_EPSILON
Definition shape.h:82
Shape & moveCornerTo(const Point< dim > &p, size_t corner)
shape: move the shape, moving the given corner to the Point p
Definition shape.h:109
bool isValid() const
generic: returns true if the class instance has been initialized
Definition shape.h:85
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
Definition shape.h:80
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
Definition shape.h:123
A dim dimensional vector.
Definition vector.h:121
Generic library namespace.
Definition atlasconv.h:45
float CoordType
Basic floating point type.
Definition const.h:140