ViennaGrid - The Vienna Grid Library
2.1.0
|
Main point class of ViennaGrid. Represents a geometric location inside the respective Euclidian space. More...
#include <point.hpp>
Public Types | |
typedef dim_type | size_type |
STL-compatible typedef for the value returned by size() | |
typedef CoordType | value_type |
Publish the underlying numberic type of coordinates. | |
Public Member Functions | |
spatial_point | operator* (CoordType factor) const |
Convenience overload for stretching the vector given by the point. The vector is stretched in the Euclidian space - thus coordinates are transformed appropriately if required. | |
spatial_point & | operator*= (CoordType factor) |
Convenience overload for stretching the vector given by the point. The vector is stretched in the Euclidian space - thus coordinates are transformed appropriately if required. | |
spatial_point | operator+ (spatial_point const &other) const |
Convenience overload for the addition of points. | |
spatial_point & | operator+= (spatial_point const &other) |
Convenience overload for the inplace addition of points. | |
spatial_point | operator- () const |
Convenience overload for the subtraction of points. | |
spatial_point | operator- (spatial_point const &other) const |
Convenience overload for the subtraction of points. | |
spatial_point & | operator-= (spatial_point const &other) |
Convenience overload for the inplace subtraction of points. | |
spatial_point | operator/ (CoordType factor) const |
Convenience overload for stretching the vector given by the point. The vector is stretched in the Euclidian space - thus coordinates are transformed appropriately if required. | |
spatial_point & | operator/= (CoordType factor) |
Convenience overload for stretching the vector given by the point. The vector is stretched in the Euclidian space - thus coordinates are transformed appropriately if required. | |
template<typename CoordType2 , typename CoordinateSystem2 > | |
spatial_point & | operator= (spatial_point< CoordType2, CoordinateSystem2 > const &p2) |
Assignment operator for a point given in a different coordinate system. | |
spatial_point () | |
Default constructor. Sets all entries to zero. | |
spatial_point (CoordType x, CoordType y=0, CoordType z=0) | |
Convenience constructor, initializing the point components with values. | |
template<typename CoordType2 , typename CoordinateSystem2 > | |
spatial_point (spatial_point< CoordType2, CoordinateSystem2 > const &p2) | |
Constructor taking a point given in a different coordinate system. | |
Static Public Attributes | |
static const int | dim = CoordinateSystem::dim |
Publish the geometric dimension of the point. |
Main point class of ViennaGrid. Represents a geometric location inside the respective Euclidian space.
CoordType | Numerical type to be used for coordinates. Typically double. |
CoordinateSystem | The coordinate system to be used. For a cartesian coordinate system, use cartesian_cs<d>, where d is the spatial dimension. |
STL-compatible typedef for the value returned by size()
Reimplemented from static_array< CoordType, CoordinateSystem::dim >.
typedef CoordType value_type |
Publish the underlying numberic type of coordinates.
Reimplemented from static_array< CoordType, CoordinateSystem::dim >.
spatial_point | ( | ) | [inline] |
Default constructor. Sets all entries to zero.
spatial_point | ( | CoordType | x, |
CoordType | y = 0 , |
||
CoordType | z = 0 |
||
) | [inline] |
Convenience constructor, initializing the point components with values.
spatial_point | ( | spatial_point< CoordType2, CoordinateSystem2 > const & | p2 | ) | [inline] |
Constructor taking a point given in a different coordinate system.
spatial_point operator* | ( | CoordType | factor | ) | const [inline] |
Convenience overload for stretching the vector given by the point. The vector is stretched in the Euclidian space - thus coordinates are transformed appropriately if required.
spatial_point& operator*= | ( | CoordType | factor | ) | [inline] |
Convenience overload for stretching the vector given by the point. The vector is stretched in the Euclidian space - thus coordinates are transformed appropriately if required.
spatial_point operator+ | ( | spatial_point< CoordType, CoordinateSystem > const & | other | ) | const [inline] |
Convenience overload for the addition of points.
spatial_point& operator+= | ( | spatial_point< CoordType, CoordinateSystem > const & | other | ) | [inline] |
Convenience overload for the inplace addition of points.
spatial_point operator- | ( | ) | const [inline] |
Convenience overload for the subtraction of points.
spatial_point operator- | ( | spatial_point< CoordType, CoordinateSystem > const & | other | ) | const [inline] |
Convenience overload for the subtraction of points.
spatial_point& operator-= | ( | spatial_point< CoordType, CoordinateSystem > const & | other | ) | [inline] |
Convenience overload for the inplace subtraction of points.
spatial_point operator/ | ( | CoordType | factor | ) | const [inline] |
Convenience overload for stretching the vector given by the point. The vector is stretched in the Euclidian space - thus coordinates are transformed appropriately if required.
spatial_point& operator/= | ( | CoordType | factor | ) | [inline] |
Convenience overload for stretching the vector given by the point. The vector is stretched in the Euclidian space - thus coordinates are transformed appropriately if required.
spatial_point& operator= | ( | spatial_point< CoordType2, CoordinateSystem2 > const & | p2 | ) | [inline] |
Assignment operator for a point given in a different coordinate system.
const int dim = CoordinateSystem::dim [static] |
Publish the geometric dimension of the point.