Go::BaryCoordSystem< Dim > Class Template Reference
['utils' - a collection of useful math and programming tools]

Encapsulates a barycentric coordinatesystem. More...

#include <BaryCoordSystem.h>

List of all members.

Public Member Functions

 BaryCoordSystem ()
 Empty default constructor.
 BaryCoordSystem (const Array< double, Dim > *corners)
 Constructor.
void setCorners (const Array< double, Dim > *corners)
 Set corners.
const Array< double, Dim > & corner (int i) const
 Returns the corner points.
template<class T>
Array< T, Dim > baryToCart (const Array< T, Dim+1 > &bary_pt) const
 Input is a barycentric point, output is the corresponding cartesian point.
template<class T>
Array< T, Dim+1 > cartToBary (const Array< T, Dim > &cart_pt) const
 Input is a cartesian point, output is the corresponding barycentric point.
void read (std::istream &is)
 Read from input stream.
void write (std::ostream &os) const
 Write to output stream.


Detailed Description

template<int Dim>
class Go::BaryCoordSystem< Dim >

Encapsulates a barycentric coordinatesystem.

It is designed to work in any dimension, but at the time of writing, only dimension 2 and 3 is supported by the functions in the included header "Volumes.h"

You specify the dimension with a template parameter:

BaryCoordSystem<2> bc(corner_pointer);

... or by using the supplied typedefs:

BaryCoordSystem2D bc(corner_pointer);

This file also contains the small function called triangle_area_signed().

Definition at line 64 of file BaryCoordSystem.h.


Constructor & Destructor Documentation

template<int Dim>
Go::BaryCoordSystem< Dim >::BaryCoordSystem ( const Array< double, Dim > *  corners  )  [inline]

Constructor.

Takes an array of points that will become the corners of the coordinate simplex.

Definition at line 71 of file BaryCoordSystem.h.

References Go::simplex_volume().


The documentation for this class was generated from the following file:
Generated on Mon Jun 11 14:48:18 2007 for GoTools Core Library by  doxygen 1.5.1