Scale Class Reference

#include <Scale.hpp>

Inheritance diagram for Scale:

Inheritance graph
[legend]
Collaboration diagram for Scale:

Collaboration graph
[legend]

List of all members.

Public Member Functions

TinyVector< 3, real_t > operator() (const TinyVector< 3, real_t > &x) const
TinyVector< 3, real_t > inverse (const TinyVector< 3, real_t > &x) const
std::string povWrite () const
ReferenceCounting< TransformgetCopy () const
 Scale (const TinyVector< 3, real_t > &x)
 Scale (const Scale &S)
 ~Scale ()
const TransTypetype () const
virtual TinyVector< 3, real_t > operator() (const TinyVector< 3 > &x) const =0
virtual TinyVector< 3, real_t > inverse (const TinyVector< 3 > &x) const =0

Protected Attributes

const TransType __type

Private Attributes

TinyVector< 3, real_t > __scale


Detailed Description

Definition at line 38 of file Scale.hpp.


Constructor & Destructor Documentation

Scale::Scale ( const TinyVector< 3, real_t > &  x  ) 

Constructor

Parameters:
x given Scale vector

Definition at line 64 of file Scale.cpp.

Referenced by getCopy().

00065   : Transform(scale),
00066     __scale(v)
00067 {
00068   ;
00069 }

Scale::Scale ( const Scale S  ) 

Copy Constructor

Parameters:
S given Scale

Definition at line 72 of file Scale.cpp.

00073   : Transform(scale),
00074     __scale(scale.__scale)
00075 {
00076   ;
00077 }

Scale::~Scale (  )  [inline]

Destructor

Definition at line 96 of file Scale.hpp.

00097   {
00098     ;
00099   }


Member Function Documentation

TinyVector< 3, real_t > Scale::operator() ( const TinyVector< 3, real_t > &  x  )  const

Applied the Scale to a vector

Parameters:
x given vector
Returns:
$ S(x) $

Definition at line 24 of file Scale.cpp.

References __scale.

00025 {
00026   TinyVector<3,real_t> temp = v;
00027 
00028   temp[0] *= __scale[0];
00029   temp[1] *= __scale[1];
00030   temp[2] *= __scale[2];
00031 
00032   return temp;
00033 }

TinyVector< 3 > Scale::inverse ( const TinyVector< 3, real_t > &  x  )  const

Applies the inverse of a Scale to a vector

Parameters:
x given vector
Returns:
$ S^{-1}(x) $

Definition at line 36 of file Scale.cpp.

References __scale.

00037 {
00038   TinyVector<3,real_t> temp = v;
00039 
00040   temp[0] /= __scale[0];
00041   temp[1] /= __scale[1];
00042   temp[2] /= __scale[2];
00043 
00044   return temp;
00045 }

std::string Scale::povWrite (  )  const [virtual]

Writes the POVRay expression to a stream

Returns:
POVRay expression

Implements Transform.

Definition at line 48 of file Scale.cpp.

References __scale.

00049 {
00050   std::stringstream povs;
00051   povs << "scale <"
00052        << __scale[0]
00053        << ", "
00054        << __scale[1]
00055        << ", "
00056        << __scale[2]
00057        << ">";
00058   povs << std::ends;
00059 
00060   return povs.str();
00061 }

ReferenceCounting< Transform > Scale::getCopy (  )  const [virtual]

Gets a copy of the Scale

Returns:
deep copy of the Scale

Implements Transform.

Definition at line 80 of file Scale.cpp.

References Scale().

00081 {
00082   return new Scale(*this);
00083 }

Here is the call graph for this function:

const TransType& Transform::type (  )  const [inline, inherited]

Read-only access to the type of the transformation.

Returns:
__type

Definition at line 60 of file Transform.hpp.

References Transform::__type.

00061   {
00062     return __type;
00063   }

virtual TinyVector<3,real_t> Transform::operator() ( const TinyVector< 3 > &  x  )  const [pure virtual, inherited]

Applies the transformation to a point

Parameters:
x given point
Returns:
$ T(x) $

virtual TinyVector<3,real_t> Transform::inverse ( const TinyVector< 3 > &  x  )  const [pure virtual, inherited]

Applies the inverse transformation to a point

Parameters:
x given point
Returns:
$ T^{-1}(x) $


Member Data Documentation

TinyVector<3,real_t> Scale::__scale [private]

POVRay scale values

Definition at line 43 of file Scale.hpp.

Referenced by inverse(), operator()(), and povWrite().

const TransType Transform::__type [protected, inherited]

Transformation type

Definition at line 52 of file Transform.hpp.

Referenced by Transform::type().


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

Generated on Wed Nov 19 00:13:52 2008 for FreeFEM3D (aka ff3d) by  doxygen 1.5.6