LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
lsst::afw::geom::CoordinateBase< Derived, T, 3 > Class Template Reference

Specialization of CoordinateBase for 3 dimensions. More...

#include <CoordinateBase.h>

Public Types

typedef T Element
 
typedef Eigen::Matrix< T,
3, 1, Eigen::DontAlign > 
EigenVector
 

Public Member Functions

T & operator[] (int n)
 
T const & operator[] (int n) const
 
T & coeffRef (int n)
 
T const & coeffRef (int n) const
 
EigenVector const & asEigen () const
 Return a fixed-size Eigen representation of the coordinate object. More...
 
T const & getX () const
 
T const & getY () const
 
T const & getZ () const
 
T & getX ()
 
T & getY ()
 
T & getZ ()
 
void setX (T x)
 
void setY (T y)
 
void setZ (T z)
 
boost::tuple< T, T, T > asTuple () const
 Return a boost::tuple representation of the coordinate object. More...
 

Static Public Attributes

static int const dimensions = 3
 

Protected Member Functions

 CoordinateBase (T val=static_cast< T >(0))
 
template<typename Vector >
 CoordinateBase (Eigen::MatrixBase< Vector > const &vector)
 
void _swap (CoordinateBase &other)
 

Protected Attributes

EigenVector _vector
 

Detailed Description

template<typename Derived, typename T>
class lsst::afw::geom::CoordinateBase< Derived, T, 3 >

Specialization of CoordinateBase for 3 dimensions.

Definition at line 151 of file CoordinateBase.h.

Member Typedef Documentation

template<typename Derived , typename T >
typedef Eigen::Matrix<T,3,1,Eigen::DontAlign> lsst::afw::geom::CoordinateBase< Derived, T, 3 >::EigenVector

Definition at line 155 of file CoordinateBase.h.

template<typename Derived , typename T >
typedef T lsst::afw::geom::CoordinateBase< Derived, T, 3 >::Element

Definition at line 153 of file CoordinateBase.h.

Constructor & Destructor Documentation

template<typename Derived , typename T >
lsst::afw::geom::CoordinateBase< Derived, T, 3 >::CoordinateBase ( val = static_cast<T>(0))
inlineexplicitprotected

Definition at line 190 of file CoordinateBase.h.

190 : _vector(EigenVector::Constant(val)) {}
bool val
template<typename Derived , typename T >
template<typename Vector >
lsst::afw::geom::CoordinateBase< Derived, T, 3 >::CoordinateBase ( Eigen::MatrixBase< Vector > const &  vector)
inlineexplicitprotected

Definition at line 193 of file CoordinateBase.h.

Member Function Documentation

template<typename Derived , typename T >
void lsst::afw::geom::CoordinateBase< Derived, T, 3 >::_swap ( CoordinateBase< Derived, T, 3 > &  other)
inlineprotected

Definition at line 194 of file CoordinateBase.h.

194 {_vector.swap(other._vector);}
template<typename Derived , typename T >
EigenVector const& lsst::afw::geom::CoordinateBase< Derived, T, 3 >::asEigen ( ) const
inline

Return a fixed-size Eigen representation of the coordinate object.

The fact that this returns by const reference rather than by value should not be considered part of the API; this is merely an optimization enabled by the implementation.

Definition at line 169 of file CoordinateBase.h.

template<typename Derived , typename T >
boost::tuple<T,T,T> lsst::afw::geom::CoordinateBase< Derived, T, 3 >::asTuple ( ) const
inline

Return a boost::tuple representation of the coordinate object.

Definition at line 184 of file CoordinateBase.h.

184  {
185  return boost::make_tuple(_vector.x(), _vector.y(), _vector.z());
186  }
template<typename Derived , typename T >
T& lsst::afw::geom::CoordinateBase< Derived, T, 3 >::coeffRef ( int  n)
inline

Definition at line 160 of file CoordinateBase.h.

160 { return _vector.coeffRef(n); }
template<typename Derived , typename T >
T const& lsst::afw::geom::CoordinateBase< Derived, T, 3 >::coeffRef ( int  n) const
inline

Definition at line 161 of file CoordinateBase.h.

template<typename Derived , typename T >
T const& lsst::afw::geom::CoordinateBase< Derived, T, 3 >::getX ( ) const
inline

Definition at line 173 of file CoordinateBase.h.

template<typename Derived , typename T >
T& lsst::afw::geom::CoordinateBase< Derived, T, 3 >::getX ( )
inline

Definition at line 176 of file CoordinateBase.h.

template<typename Derived , typename T >
T const& lsst::afw::geom::CoordinateBase< Derived, T, 3 >::getY ( ) const
inline

Definition at line 174 of file CoordinateBase.h.

template<typename Derived , typename T >
T& lsst::afw::geom::CoordinateBase< Derived, T, 3 >::getY ( )
inline

Definition at line 177 of file CoordinateBase.h.

template<typename Derived , typename T >
T const& lsst::afw::geom::CoordinateBase< Derived, T, 3 >::getZ ( ) const
inline

Definition at line 175 of file CoordinateBase.h.

template<typename Derived , typename T >
T& lsst::afw::geom::CoordinateBase< Derived, T, 3 >::getZ ( )
inline

Definition at line 178 of file CoordinateBase.h.

template<typename Derived , typename T >
T& lsst::afw::geom::CoordinateBase< Derived, T, 3 >::operator[] ( int  n)
inline

Definition at line 158 of file CoordinateBase.h.

template<typename Derived , typename T >
T const& lsst::afw::geom::CoordinateBase< Derived, T, 3 >::operator[] ( int  n) const
inline

Definition at line 159 of file CoordinateBase.h.

159 { return const_cast<EigenVector&>(_vector)[n]; }
Eigen::Matrix< T, 3, 1, Eigen::DontAlign > EigenVector
template<typename Derived , typename T >
void lsst::afw::geom::CoordinateBase< Derived, T, 3 >::setX ( x)
inline

Definition at line 179 of file CoordinateBase.h.

template<typename Derived , typename T >
void lsst::afw::geom::CoordinateBase< Derived, T, 3 >::setY ( y)
inline

Definition at line 180 of file CoordinateBase.h.

template<typename Derived , typename T >
void lsst::afw::geom::CoordinateBase< Derived, T, 3 >::setZ ( z)
inline

Definition at line 181 of file CoordinateBase.h.

Member Data Documentation

template<typename Derived , typename T >
EigenVector lsst::afw::geom::CoordinateBase< Derived, T, 3 >::_vector
protected

Definition at line 195 of file CoordinateBase.h.

template<typename Derived , typename T >
int const lsst::afw::geom::CoordinateBase< Derived, T, 3 >::dimensions = 3
static

Definition at line 154 of file CoordinateBase.h.


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