|
wfmath
1.0.3
A math library for the Worldforge system.
|
A dim dimensional line. More...
#include <line.h>
Public Member Functions | |
| Line (const Line< dim > &l)=default | |
| Line (const AtlasInType &a) | |
| AtlasOutType | toAtlas () const |
| Create an Atlas object from the line. More... | |
| void | fromAtlas (const AtlasInType &a) |
| Set the line's value to that given by an Atlas object. More... | |
| Line & | operator= (const Line &a)=default |
| bool | isEqualTo (const Line &s, CoordType epsilon=numeric_constants< CoordType >::epsilon()) const |
| generic: check if two classes are equal, up to a given tolerance More... | |
| bool | operator== (const Line &s) const |
| generic: check if two classes are equal, up to tolerance WFMATH_EPSILON More... | |
| bool | operator!= (const Line &s) const |
| generic: check if two classes are not equal, up to tolerance WFMATH_EPSILON More... | |
| bool | isValid () const |
| generic: returns true if the class instance has been initialized More... | |
| size_t | numCorners () const |
| shape: return the number of corners in the shape. More... | |
| Point< dim > | getCorner (size_t i) const |
| shape: return the position of the i'th corner, where 0 <= i < numCorners() More... | |
| Point< dim > | getCenter () const |
| shape: return the position of the center of the shape More... | |
| bool | addCorner (size_t i, const Point< dim > &p, CoordType=numeric_constants< CoordType >::epsilon()) |
| void | removeCorner (size_t i) |
| bool | moveCorner (size_t i, const Point< dim > &p, CoordType=numeric_constants< CoordType >::epsilon()) |
| Line & | shift (const Vector< dim > &v) |
| shape: move the shape by an amount given by the Vector v More... | |
| Line & | moveCornerTo (const Point< dim > &p, size_t corner) |
| shape: move the shape, moving the given corner to the Point p More... | |
| Line & | moveCenterTo (const Point< dim > &p) |
| shape: move the shape, moving the center to the Point p More... | |
| Line & | rotateCorner (const RotMatrix< dim > &m, size_t corner) |
| shape: rotate the shape while holding the given corner fixed More... | |
| Line & | rotateCenter (const RotMatrix< dim > &m) |
| shape: rotate the shape while holding the center fixed More... | |
| Line & | rotatePoint (const RotMatrix< dim > &m, const Point< dim > &p) |
| shape: rotate the shape while holding the Point p fixed. More... | |
| AxisBox< dim > | boundingBox () const |
| Ball< dim > | boundingSphere () const |
| Ball< dim > | boundingSphereSloppy () const |
A dim dimensional line.
This class implements the full shape interface, as described in the fake class Shape.
|
inline |
Set the line's value to that given by an Atlas object.
Definition at line 412 of file atlasconv.h.
|
inline |
shape: return the position of the center of the shape
Definition at line 84 of file line.h.
References WFMath::Barycenter().
Referenced by WFMath::Line< dim >::moveCenterTo(), and WFMath::Line< dim >::rotateCenter().
|
inline |
shape: return the position of the i'th corner, where 0 <= i < numCorners()
Definition at line 82 of file line.h.
Referenced by WFMath::Line< dim >::moveCornerTo(), and WFMath::Line< dim >::rotateCorner().
|
inline |
generic: check if two classes are equal, up to a given tolerance
Definition at line 34 of file line_funcs.h.
Referenced by WFMath::Line< dim >::operator!=(), and WFMath::Line< dim >::operator==().
|
inline |
|
inline |
shape: move the shape, moving the center to the Point p
The center is defined by getCenter()
Definition at line 112 of file line.h.
References WFMath::Line< dim >::getCenter(), and WFMath::Line< dim >::shift().
|
inline |
shape: move the shape, moving the given corner to the Point p
The corner in question is getCorner(corner).
Definition at line 106 of file line.h.
References WFMath::Line< dim >::getCorner(), and WFMath::Line< dim >::shift().
|
inline |
|
inline |
generic: check if two classes are not equal, up to tolerance WFMATH_EPSILON
Definition at line 67 of file line.h.
References WFMath::Line< dim >::isEqualTo().
|
inline |
generic: check if two classes are equal, up to tolerance WFMATH_EPSILON
Definition at line 65 of file line.h.
References WFMath::Line< dim >::isEqualTo().
|
inline |
shape: rotate the shape while holding the center fixed
The center is defined by getCenter()
Definition at line 126 of file line.h.
References WFMath::Line< dim >::getCenter(), and WFMath::Line< dim >::rotatePoint().
|
inline |
shape: rotate the shape while holding the given corner fixed
The corner in question is getCorner(corner).
Definition at line 120 of file line.h.
References WFMath::Line< dim >::getCorner(), and WFMath::Line< dim >::rotatePoint().
|
inline |
shape: rotate the shape while holding the Point p fixed.
Note that p can be any Point, it does not have to lie within the shape.
Definition at line 61 of file line_funcs.h.
Referenced by WFMath::Line< dim >::rotateCenter(), and WFMath::Line< dim >::rotateCorner().
|
inline |
shape: move the shape by an amount given by the Vector v
Definition at line 51 of file line_funcs.h.
Referenced by WFMath::Line< dim >::moveCenterTo(), and WFMath::Line< dim >::moveCornerTo().
|
inline |
Create an Atlas object from the line.
Definition at line 434 of file atlasconv.h.