proj home

Files   Classes   Functions   Hierarchy  

crossproduct Class Reference

In 3D given two vectors that make a plane find a third vector at right angles to this plane. More...

#include <mathlib.h>

List of all members.

Static Public Member Functions

template<class T >
static void eval (T &w, T const &a, T const &b)
 On the right hand a is the thumb, b is the first finger, w points outwards of palm.
template<class T >
static void evalxyz (T &w, T const &a, T const &b)
 On the right hand a is the thumb, b is the first finger, w points outwards of palm.


Detailed Description

In 3D given two vectors that make a plane find a third vector at right angles to this plane.

Definition at line 76 of file mathlib.h.


Member Function Documentation

template<class T >
static void crossproduct::eval ( T w,
T const &  a,
T const &  b 
) [inline, static]

On the right hand a is the thumb, b is the first finger, w points outwards of palm.

Definition at line 83 of file mathlib.h.

Referenced by surfaceplane< T >::operator()(), test03(), tetrahedronvolume(), tetrahedron< PT, PD >::triangleverticiespoint(), and tetrahedron< PT, PD >::verticiespoint().

00084   {
00085     w[0] = a[1]*b[2]-b[1]*a[2];
00086     w[1] = a[2]*b[0]-a[0]*b[2];
00087     w[2] = a[0]*b[1]-a[1]*b[0];
00088   }

template<class T >
static void crossproduct::evalxyz ( T w,
T const &  a,
T const &  b 
) [inline, static]

On the right hand a is the thumb, b is the first finger, w points outwards of palm.

Definition at line 93 of file mathlib.h.

Referenced by myRotate::draw(), gobjMyCircleDraw::draw(), triangle3D< PT, PD >::equilaterali(), plane::intersects(), disk::intersects(), triangle3D< typename TET::PTtype, typename TET::PDtype >::normal(), triangle3D< PT, PD >::normali(), triangle3D< PT, PD >::orthocenteri(), plane::plane(), and tetrahedron< PT, PD >::valid().

00094   {
00095     w.x = a.y*b.z-b.y*a.z;
00096     w.y = a.z*b.x-a.x*b.z;
00097     w.z = a.x*b.y-a.y*b.x;
00098   }


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

Generated on Fri Mar 4 00:49:52 2011 for Chelton Evans Source by  doxygen 1.5.8