Represents an arbitrary point in the underlying coordinate system. More...
#include <point.hpp>
Public Types | |
enum | { dim = CoordinateSystem::dim } |
Publish the geometric dimension of the point. More... | |
typedef CoordType | value_type |
Publish the underlying numberic type of coordinates. | |
typedef dim_type | size_type |
STL-compatible typedef for the value returned by size(). | |
Public Member Functions | |
point_t () | |
Default constructor. Sets all entries to zero. | |
point_t (CoordType x, CoordType y=0, CoordType z=0) | |
Convenience constructor, initializing the point components with values. | |
template<typename CoordType2 , typename CoordinateSystem2 > | |
point_t (point_t< CoordType2, CoordinateSystem2 > const &p2) | |
Constructor taking a point given in a different coordinate system. | |
point_t (point_t const &other) | |
Copy constructor. Copies the entries. | |
point_t & | operator= (point_t const &p2) |
Assignment operator for a point with the same coordinate system. | |
template<typename CoordType2 , typename CoordinateSystem2 > | |
point_t & | operator= (point_t< CoordType2, CoordinateSystem2 > const &p2) |
Assignment operator for a point given in a different coordinate system. | |
CoordType & | operator[] (size_type index) |
Read/Write access to the coordinate at position 'index'. | |
CoordType const & | operator[] (size_type index) const |
Read access to the coordinate at position 'index'. | |
CoordType | at (size_type index) |
STL-type checked read/write access to the coordinate at position 'index'. Throws an exception if 'index' is invalid. | |
CoordType const & | at (size_type index) const |
STL-type checked read access to the coordinate at position 'index'. Throws an exception if 'index' is invalid. | |
size_type | size () const |
Returns the geometric dimension of the point. | |
point_t | operator+ (point_t const &other) const |
Convenience overload for the addition of points. | |
point_t & | operator+= (point_t const &other) |
Convenience overload for the inplace addition of points. | |
point_t | operator- (point_t const &other) const |
Convenience overload for the subtraction of points. | |
point_t & | operator-= (point_t const &other) |
Convenience overload for the inplace subtraction of points. | |
point_t & | 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. | |
point_t & | 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. | |
point_t | 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. | |
point_t | 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. |
Represents an arbitrary point in the underlying coordinate system.
CoordType | Type of each coordinate entry (usually double or float) | |
d | Geometric dimension of the underlying coordinate system | |
CoordinateSystem | The underlying coordinate system of the point. |
typedef CoordType value_type |
Publish the underlying numberic type of coordinates.
point_t | ( | ) | [inline] |
Default constructor. Sets all entries to zero.
point_t | ( | CoordType | x, | |
CoordType | y = 0 , |
|||
CoordType | z = 0 | |||
) | [inline] |
Convenience constructor, initializing the point components with values.
Constructor taking a point given in a different coordinate system.
Copy constructor. Copies the entries.
CoordType at | ( | size_type | index | ) | [inline] |
STL-type checked read/write access to the coordinate at position 'index'. Throws an exception if 'index' is invalid.
CoordType const& at | ( | size_type | index | ) | const [inline] |
STL-type checked read access to the coordinate at position 'index'. Throws an exception if 'index' is invalid.
point_t 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.
point_t& 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.
Convenience overload for the addition of points.
Convenience overload for the inplace addition of points.
Convenience overload for the subtraction of points.
Convenience overload for the inplace subtraction of points.
point_t 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.
point_t& 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.
Assignment operator for a point with the same coordinate system.
Assignment operator for a point given in a different coordinate system.
CoordType& operator[] | ( | size_type | index | ) | [inline] |
Read/Write access to the coordinate at position 'index'.
CoordType const& operator[] | ( | size_type | index | ) | const [inline] |
Read access to the coordinate at position 'index'.
size_type size | ( | ) | const [inline] |
Returns the geometric dimension of the point.