dpoint3.h File Reference
 
 
 
dpoint3.h File Reference

This reference page is linked to from the following overview topics: Computing Face Normals, Bump Mapping, Computing Vertex Normals, Computing Vertex Normals by Weighting.


#include "GeomExport.h"
#include "maxheap.h"
#include "point3.h"
#include <iosfwd>

Classes

class   DPoint3
  class DPoint3 More...

Functions

double  Length (const DPoint3 &)
int  MaxComponent (const DPoint3 &)
int  MinComponent (const DPoint3 &)
DPoint3  Normalize (const DPoint3 &)
DPoint3  operator* (double, const DPoint3 &)
DPoint3  operator* (const DPoint3 &, double)
DPoint3  operator/ (const DPoint3 &, double)
std::ostream &  operator<< (std::ostream &, const DPoint3 &)
DPoint3  CrossProd (const DPoint3 &a, const DPoint3 &b)
double  DotProd (const DPoint3 &a, const DPoint3 &b)

Function Documentation

double Length ( const DPoint3 v ) [inline]
Remarks:
Returns the 'Length' of the point. This is sqrt(v.x*v.x+v.y*v.y+v.z*v.z)
                                       {        
        return (double)sqrt(v.x*v.x+v.y*v.y+v.z*v.z);
        }
int MaxComponent ( const DPoint3 )
Remarks:
Returns the component with the maximum absolute value. 0=x, 1=y, 2=z.
int MinComponent ( const DPoint3 )
Remarks:
Returns the component with the minimum absolute value. 0=x, 1=y, 2=z.
DPoint3 Normalize ( const DPoint3 )
Remarks:
Returns a unit vector. This is a DPoint3 with each component divided by the point Length().
DPoint3 operator* ( double  f,
const DPoint3 a 
) [inline]
                                                     {
        return(DPoint3(a.x*f, a.y*f, a.z*f));
        }
DPoint3 operator* ( const DPoint3 a,
double  f 
) [inline]
                                                     {
        return(DPoint3(a.x*f, a.y*f, a.z*f));
        }
DPoint3 operator/ ( const DPoint3 a,
double  f 
) [inline]
                                                     {
        return(DPoint3(a.x/f, a.y/f, a.z/f));
        }
std::ostream& operator<< ( std::ostream &  ,
const DPoint3  
)
DPoint3 CrossProd ( const DPoint3 a,
const DPoint3 b 
)
Remarks:
Returns the cross product of two DPoint3s.
double DotProd ( const DPoint3 a,
const DPoint3 b 
)
Remarks:
Returns the dot product of two DPoint3s.