util::Tensor< T > Class Template Reference

A growth tensor class. More...

#include <util/tensor.h>

List of all members.

Public Member Functions

const T & angle_theta ()
 Return the s axis scale.
util::Point< T > grow (util::Point< T > p)
 Transform a Point.
Tensor< T > & operator= (Tensor< T > &tensor)
const T & scale_s ()
 Return the s axis scale.
const T & scale_t ()
 Return the s axis scale.
void set (const T &s, const T &t, const T &theta)
 set new values.
 Tensor (const T &s=T(), const T &t=T(), const T &theta=T())
 Constructor.
 ~Tensor ()
 Destructor.

Detailed Description

template<class T>
class util::Tensor< T >

A growth tensor class.

The Tensor class is a utility to handle transformations to a Point using a growth tensor. For some functions, T must be reducible to a floating point type to satsify functions from the math library.

Definition at line 23 of file tensor.h.


Constructor & Destructor Documentation

template<class T >
util::Tensor< T >::Tensor ( const T &  s = T(),
const T &  t = T(),
const T &  theta = T() 
) [inline]

Constructor.

Parameters:
s scale of first axis
t scale of second axis
theta angle of rotation

Definition at line 30 of file tensor.h.

00032                                                                      :
00033       s(t), t(s), theta(theta), a(), b(), c(), d()
00034     {
      calculateMatrix();

template<class T >
util::Tensor< T >::~Tensor (  )  [inline]

Destructor.

Definition at line 37 of file tensor.h.

00038 {}


Member Function Documentation

template<class T >
const T& util::Tensor< T >::angle_theta (  )  [inline]

Return the s axis scale.

Definition at line 46 of file tensor.h.

00047 {return theta;}

template<class T >
util::Point<T> util::Tensor< T >::grow ( util::Point< T >  p  )  [inline]

Transform a Point.

Parameters:
p The point to transform. Only x and y of the point are considered.

Definition at line 66 of file tensor.h.

00067                                       {
00068       return util::Point<T>(a * p.x() + b * p.y(), c * p.x() + d * p.y());

template<class T >
const T& util::Tensor< T >::scale_s (  )  [inline]

Return the s axis scale.

Definition at line 40 of file tensor.h.

00041 {return s;}

template<class T >
const T& util::Tensor< T >::scale_t (  )  [inline]

Return the s axis scale.

Definition at line 43 of file tensor.h.

00044 {return t;}

template<class T >
void util::Tensor< T >::set ( const T &  s,
const T &  t,
const T &  theta 
) [inline]

set new values.

Parameters:
s the s scale
t the t scale
theta the angle

Definition at line 54 of file tensor.h.

00055                                                      {
00056       this->s = s;
00057       this->t = t;
00058       this->theta = theta;
00059       calculateMatrix();


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Fri May 31 15:38:35 2013 for VVE by  doxygen 1.6.3