Public Member Functions

apf::Vector3 Class Reference

convenience wrapper over apf::Vector<3> More...

Inheritance diagram for apf::Vector3:
apf::Vector< 3 >

List of all members.

Public Member Functions

 Vector3 (double a, double b, double c)
 construct from 3 values
 Vector3 (double const *abc)
 construct from array
void toArray (double *abc) const
 write vector to array
void fromArray (const double *abc)
 read vector from array
double x () const
 immutable x component
double y () const
 immutable y component
double z () const
 immutable z component
double & x ()
 mutable x component
double & y ()
 mutable y component
double & z ()
 mutable z component

Detailed Description

convenience wrapper over apf::Vector<3>

this class adds some functions that could not be filled in by templates, mainly component-specific initialization and x/y/z names

Definition at line 150 of file apfVector.h.


Constructor & Destructor Documentation

apf::Vector3::Vector3 ( double  a,
double  b,
double  c 
) [inline]

construct from 3 values

this is commonly used for hardcoding vectors

Definition at line 159 of file apfVector.h.

    {
      (*this)[0] = a;
      (*this)[1] = b;
      (*this)[2] = c;
    }

apf::Vector3::Vector3 ( double const *  abc  )  [inline]

construct from array

Todo:
this could maybe be templated

Definition at line 167 of file apfVector.h.

    {
      (*this)[0] = abc[0];
      (*this)[1] = abc[1];
      (*this)[2] = abc[2];
    }


Member Function Documentation

void apf::Vector3::fromArray ( const double *  abc  )  [inline]

read vector from array

Todo:
this could be templated

Definition at line 183 of file apfVector.h.

    {
      (*this)[0] = abc[0];
      (*this)[1] = abc[1];
      (*this)[2] = abc[2];
    }

void apf::Vector3::toArray ( double *  abc  )  const [inline]

write vector to array

Todo:
this could be templated

Definition at line 175 of file apfVector.h.

    {
      abc[0] = (*this)[0];
      abc[1] = (*this)[1];
      abc[2] = (*this)[2];
    }


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines