Point.h
Go to the documentation of this file.
220 std::ostream& operator<<(std::ostream& os, const Point<D>& p) {
WONTON_INLINE Point()
Default constructor - Point at origin in D-space.
Definition: Point.h:58
WONTON_INLINE Point< D > & operator+=(const Point< D > &p)
Add two Point vectors to get a third point vector.
Definition: Point.h:150
WONTON_INLINE Point< D > & operator+=(const Vector< D > &v)
Translate this Point along the Vector v.
Definition: Point.h:143
WONTON_INLINE Vector< D > asV() const
Convert Point to Vector from the origin to the coordinates of the Point.
Definition: Point.h:204
WONTON_INLINE Point(const double &x, const double &y)
Specialized constructor for Points in 2d.
Definition: Point.h:91
Factorize a number N into D equal (or nearly equal) factors.
Definition: adaptive_refinement_mesh.h:31
WONTON_INLINE Point< D > operator*(const Point< D > &p, double s)
Definition: Point.h:247
WONTON_INLINE Vector< D > asV()
Convert Point to Vector from the origin to the coordinates of the Point.
Definition: Point.h:195
WONTON_INLINE Point(const double &x, const double &y, const double &z)
Specialized constructor for Points in 3d.
Definition: Point.h:79
WONTON_INLINE Point(const Point< D > &rhs)
Copy constructor.
Definition: Point.h:116
WONTON_INLINE Point< D > operator/(const Point< D > &p, double s)
Definition: Point.h:259
WONTON_INLINE bool approxEq(const Point< D > &p1, const Point< D > &p2, double tol=1.0e-8)
Definition: Point.h:274
WONTON_INLINE const double & operator[](const int &i) const
Return component i of the Point.
Definition: Point.h:123
WONTON_INLINE Point< D > & operator+=(std::vector< double > const &v)
Definition: Point.h:156
WONTON_INLINE Point(const double &x)
Specialized constructor for Points in 1d.
Definition: Point.h:102
WONTON_INLINE Point< D > & operator/=(double s)
Scale this Point (/)
Definition: Point.h:172
WONTON_INLINE Point< D > & operator*=(double s)
Scale this Point (*)
Definition: Point.h:165
WONTON_INLINE Point< D > operator-() const
Negative of this Point.
Definition: Point.h:135
WONTON_INLINE Point(const std::vector< double > &v)
Specialized constructor from a std::vector of arbitary size.
Definition: Point.h:68
WONTON_INLINE double & operator[](const int &i)
Return component i of the Point.
Definition: Point.h:129
WONTON_INLINE Point< D > operator+(const Point< D > &p, const Vector< D > &v)
Definition: Point.h:227
WONTON_INLINE Point(const Vector< D > &v)
Convert a Vector to a Point.
Definition: Point.h:109
WONTON_INLINE bool operator==(const Point< D > &p1, const Point< D > &p2)
Definition: Point.h:265
std::ostream & writeToStream(std::ostream &os) const
Pretty printing of the coordinates of a Point to an output stream.
Definition: Point.h:185
std::istream & readFromStream(std::istream &is)
Read in the coordinates a Point from an input stream.
Definition: Point.h:178