|
DOLFIN
DOLFIN C++ interface
|
#include <Point.h>
Public Member Functions | |
| Point (const double x=0.0, const double y=0.0, const double z=0.0) | |
| Point (std::size_t dim, const double *x) | |
| Point (const Array< double > &x) | |
| Point (const Point &p) | |
| ~Point () | |
| Destructor. | |
| double & | operator[] (std::size_t i) |
| double | operator[] (std::size_t i) const |
| double | x () const |
| double | y () const |
| double | z () const |
| double * | coordinates () |
| const double * | coordinates () const |
| std::array< double, 3 > | array () const |
| Point | operator+ (const Point &p) const |
| Point | operator- (const Point &p) const |
| const Point & | operator+= (const Point &p) |
| Add given point. | |
| const Point & | operator-= (const Point &p) |
| Subtract given point. | |
| Point | operator- () |
| Unary minus. | |
| Point | operator* (double a) const |
| Multiplication with scalar. | |
| const Point & | operator*= (double a) |
| Incremental multiplication with scalar. | |
| Point | operator/ (double a) const |
| Division by scalar. | |
| const Point & | operator/= (double a) |
| Incremental division by scalar. | |
| const Point & | operator= (const Point &p) |
| Assignment operator. | |
| bool | operator== (const Point &p) const |
| Equal to operator. | |
| bool | operator!= (const Point &p) const |
| Not equal to operator. | |
| double | squared_distance (const Point &p) const |
| double | distance (const Point &p) const |
| double | norm () const |
| double | squared_norm () const |
| const Point | cross (const Point &p) const |
| double | dot (const Point &p) const |
| Point | rotate (const Point &a, double theta) const |
| std::string | str (bool verbose=false) const |
A Point represents a point in :math:\mathbb{R}^3 with coordinates :math:x, y, z, or alternatively, a vector in :math:\mathbb{R}^3, supporting standard operations like the norm, distances, scalar and vector products etc.
|
inlineexplicit |
Create a point at (x, y, z). Default value (0, 0, 0).
| x | (double) The x-coordinate. |
| y | (double) The y-coordinate. |
| z | (double) The z-coordinate. |
|
inline |
Create point from array
| dim | (std::size_t) Dimension of the array. |
| x | (double) The array to create a Point from. |
|
inline |
|
inline |
Copy constructor
| p | (Point) The object to be copied. |
|
inline |
Return copy of coordinate array
Returns list of double The coordinates.
|
inline |
Return coordinate array
|
inline |
Return coordinate array (const. version)
|
inline |
| double Point::dot | ( | const Point & | p | ) | const |
|
inline |
|
inline |
Return address of coordinate in direction i
| i | (std::size_t) Direction. |
Returns
|
inline |
Return coordinate in direction i
| i | (std::size_t) Direction. |
| double Point::squared_distance | ( | const Point & | p | ) | const |
Compute squared distance to given point
| p | (Point) The point to compute distance to. |
|
inline |
| std::string Point::str | ( | bool | verbose = false | ) | const |
Return informal string representation (pretty-print)
| verbose | (bool) Flag to turn on additional output. |
|
inline |
Return x-coordinate
|
inline |
Return y-coordinate
|
inline |
Return z-coordinate
1.8.13