Wonton::Point< D > Class Template Reference
  Represents a point in an N-dimensional space. More...
#include <Point.h>
| Public Member Functions | |
| WONTON_INLINE | Point () | 
| Default constructor - Point at origin in D-space.  More... | |
| WONTON_INLINE | Point (const std::vector< double > &v) | 
| Specialized constructor from a std::vector of arbitary size.  More... | |
| WONTON_INLINE | Point (const double &x, const double &y, const double &z) | 
| Specialized constructor for Points in 3d.  More... | |
| WONTON_INLINE | Point (const double &x, const double &y) | 
| Specialized constructor for Points in 2d.  More... | |
| WONTON_INLINE | Point (const double &x) | 
| Specialized constructor for Points in 1d.  More... | |
| WONTON_INLINE | Point (const Vector< D > &v) | 
| Convert a Vector to a Point.  More... | |
| WONTON_INLINE | Point (const Point< D > &rhs) | 
| Copy constructor.  More... | |
| WONTON_INLINE const double & | operator[] (const int &i) const | 
| Return component iof the Point.  More... | |
| WONTON_INLINE double & | operator[] (const int &i) | 
| Return component iof the Point.  More... | |
| WONTON_INLINE Point< D > | operator- () const | 
| Negative of this Point.  More... | |
| WONTON_INLINE Point< D > & | operator+= (const Vector< D > &v) | 
| Translate this Point along the Vector v.  More... | |
| WONTON_INLINE Point< D > & | operator+= (const Point< D > &p) | 
| Add two Point vectors to get a third point vector.  More... | |
| WONTON_INLINE Point< D > & | operator+= (std::vector< double > const &v) | 
| WONTON_INLINE Point< D > & | operator*= (double s) | 
| Scale this Point (*)  More... | |
| WONTON_INLINE Point< D > & | operator/= (double s) | 
| Scale this Point (/)  More... | |
| std::istream & | readFromStream (std::istream &is) | 
| Read in the coordinates a Point from an input stream.  More... | |
| std::ostream & | writeToStream (std::ostream &os) const | 
| Pretty printing of the coordinates of a Point to an output stream.  More... | |
| WONTON_INLINE Vector< D > | asV () | 
| Convert Point to Vector from the origin to the coordinates of the Point.  More... | |
| WONTON_INLINE Vector< D > | asV () const | 
| Convert Point to Vector from the origin to the coordinates of the Point.  More... | |
Detailed Description
template<int D>
class Wonton::Point< D >
Represents a point in an N-dimensional space.
- Template Parameters
- 
  D Indicates the dimensionality of the Point (this will generally be one of [1,2,3]). 
Constructor & Destructor Documentation
◆ Point() [1/7]
template<int D> 
| 
 | inline | 
Default constructor - Point at origin in D-space.
◆ Point() [2/7]
template<int D> 
| 
 | inline | 
Specialized constructor from a std::vector of arbitary size.
- Parameters
- 
  [in] v std::vector of coordinates. 
◆ Point() [3/7]
template<int D> 
| 
 | inline | 
Specialized constructor for Points in 3d.
- Parameters
- 
  [in] x,y,z The (x,y,z) coordinates of this Point. 
◆ Point() [4/7]
template<int D> 
| 
 | inline | 
Specialized constructor for Points in 2d.
- Parameters
- 
  [in] x,y The (x,y) coordinates of this Point. 
◆ Point() [5/7]
template<int D> 
| 
 | inline | 
Specialized constructor for Points in 1d.
- Parameters
- 
  [in] x The x coordinates of this Point. 
◆ Point() [6/7]
template<int D> 
| 
 | inlineexplicit | 
◆ Point() [7/7]
template<int D> 
| 
 | inline | 
Copy constructor.
Member Function Documentation
◆ asV() [1/2]
template<int D> 
| 
 | inline | 
◆ asV() [2/2]
template<int D> 
| 
 | inline | 
◆ operator*=()
template<int D> 
| 
 | inline | 
Scale this Point (*)
◆ operator+=() [1/3]
template<int D> 
| 
 | inline | 
◆ operator+=() [2/3]
template<int D> 
| 
 | inline | 
Add two Point vectors to get a third point vector.
◆ operator+=() [3/3]
template<int D> 
| 
 | inline | 
◆ operator-()
template<int D> 
| 
 | inline | 
Negative of this Point.
◆ operator/=()
template<int D> 
| 
 | inline | 
Scale this Point (/)
◆ operator[]() [1/2]
template<int D> 
| 
 | inline | 
Return component i of the Point. 
◆ operator[]() [2/2]
template<int D> 
| 
 | inline | 
Return component i of the Point. 
◆ readFromStream()
template<int D> 
| 
 | inline | 
Read in the coordinates a Point from an input stream.
◆ writeToStream()
template<int D> 
| 
 | inline | 
Pretty printing of the coordinates of a Point to an output stream.
The documentation for this class was generated from the following file:
- /home/wonton/wonton/wonton/support/Point.h