ViennaGrid - The Vienna Grid Library  2.1.0
Public Types | Public Member Functions | Static Public Attributes
spatial_point< CoordType, CoordinateSystem > Class Template Reference

Main point class of ViennaGrid. Represents a geometric location inside the respective Euclidian space. More...

#include <point.hpp>

Inheritance diagram for spatial_point< CoordType, CoordinateSystem >:
static_array< CoordType, CoordinateSystem::dim >

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_pointoperator*= (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_pointoperator+= (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_pointoperator-= (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_pointoperator/= (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_pointoperator= (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.

Detailed Description

template<typename CoordType, typename CoordinateSystem>
class viennagrid::spatial_point< CoordType, CoordinateSystem >

Main point class of ViennaGrid. Represents a geometric location inside the respective Euclidian space.

Template Parameters:
CoordTypeNumerical type to be used for coordinates. Typically double.
CoordinateSystemThe coordinate system to be used. For a cartesian coordinate system, use cartesian_cs<d>, where d is the spatial dimension.

Member Typedef Documentation

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 >.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.


Field Documentation

const int dim = CoordinateSystem::dim [static]

Publish the geometric dimension of the point.


The documentation for this class was generated from the following file: