rcrt::HCoord4D Class Reference

#include <HCoord4D.h>

List of all members.

Public Member Functions

 HCoord4D ()
 HCoord4D (float xc, float yc, float zc, float wc)
 HCoord4D (const HCoord4D &coords)
 HCoord4D (const Point3D &p)
 HCoord4D (const Vec3D &vec)
virtual ~HCoord4D ()
const HCoord4Doperator= (const HCoord4D &coords)
HCoord4D operator+ (const HCoord4D &coords) const
HCoord4D operator- (const HCoord4D &coords) const
float operator * (const HCoord4D &coords) const
const HCoord4Dnormalize ()
HCoord4D normalized () const
bool isNormalized () const
float norm () const
Point3D toPoint3D () const
const float & x () const
const float & y () const
const float & z () const
const float & w () const

Private Member Functions

void assign (const HCoord4D &vec)

Private Attributes

float values [4]


Detailed Description

Definition at line 10 of file HCoord4D.h.


Constructor & Destructor Documentation

rcrt::HCoord4D::HCoord4D (  ) 

Definition at line 21 of file HCoord4D.cpp.

References values.

Referenced by normalized(), operator+(), and operator-().

rcrt::HCoord4D::HCoord4D ( float  xc,
float  yc,
float  zc,
float  wc 
)

Definition at line 27 of file HCoord4D.cpp.

References values.

rcrt::HCoord4D::HCoord4D ( const HCoord4D coords  ) 

Definition at line 36 of file HCoord4D.cpp.

References assign().

rcrt::HCoord4D::HCoord4D ( const Point3D p  ) 

Definition at line 42 of file HCoord4D.cpp.

References values, rcrt::Point3D::x(), rcrt::Point3D::y(), and rcrt::Point3D::z().

rcrt::HCoord4D::HCoord4D ( const Vec3D vec  ) 

Definition at line 51 of file HCoord4D.cpp.

References values, rcrt::Vec3D::x(), rcrt::Vec3D::y(), and rcrt::Vec3D::z().

rcrt::HCoord4D::~HCoord4D (  )  [virtual]

Definition at line 60 of file HCoord4D.cpp.


Member Function Documentation

void rcrt::HCoord4D::assign ( const HCoord4D vec  )  [private]

Definition at line 10 of file HCoord4D.cpp.

References values.

Referenced by HCoord4D(), and operator=().

const HCoord4D & rcrt::HCoord4D::operator= ( const HCoord4D coords  ) 

Definition at line 65 of file HCoord4D.cpp.

References assign().

HCoord4D rcrt::HCoord4D::operator+ ( const HCoord4D coords  )  const

Definition at line 73 of file HCoord4D.cpp.

References HCoord4D(), and values.

HCoord4D rcrt::HCoord4D::operator- ( const HCoord4D coords  )  const

Definition at line 82 of file HCoord4D.cpp.

References HCoord4D(), and values.

float rcrt::HCoord4D::operator * ( const HCoord4D coords  )  const

Definition at line 91 of file HCoord4D.cpp.

References values.

const HCoord4D & rcrt::HCoord4D::normalize (  ) 

Returns:
this HCoord4D after it was normalized to w == 1.
Exceptions:
NotNormalizableException if w == 0.

Definition at line 100 of file HCoord4D.cpp.

References values.

HCoord4D rcrt::HCoord4D::normalized (  )  const

Returns:
An HCoord4D that is normalized to w == 1.

Definition at line 116 of file HCoord4D.cpp.

References HCoord4D(), and values.

bool rcrt::HCoord4D::isNormalized (  )  const

Returns:
Whether this HCoord4D is normalized in the homogeneous sense, this is the case iff w == 1

Definition at line 127 of file HCoord4D.cpp.

References values.

float rcrt::HCoord4D::norm (  )  const

Returns:
the euclidean norm of this HCoord4D == sqrt(x²+y²+z²+w²)

Definition at line 133 of file HCoord4D.cpp.

References values.

Point3D rcrt::HCoord4D::toPoint3D (  )  const

Returns:
the corresponding 3D point.

Definition at line 139 of file HCoord4D.cpp.

References values.

const float & rcrt::HCoord4D::x (  )  const

Definition at line 146 of file HCoord4D.cpp.

References values.

Referenced by rcrt::Matrix4D::operator *().

const float & rcrt::HCoord4D::y (  )  const

Definition at line 152 of file HCoord4D.cpp.

References values.

Referenced by rcrt::Matrix4D::operator *().

const float & rcrt::HCoord4D::z (  )  const

Definition at line 158 of file HCoord4D.cpp.

References values.

Referenced by rcrt::Matrix4D::operator *().

const float & rcrt::HCoord4D::w (  )  const

Definition at line 164 of file HCoord4D.cpp.

References values.

Referenced by rcrt::Matrix4D::operator *().


Member Data Documentation

float rcrt::HCoord4D::values[4] [private]

Definition at line 13 of file HCoord4D.h.

Referenced by assign(), HCoord4D(), isNormalized(), norm(), normalize(), normalized(), operator *(), operator+(), operator-(), toPoint3D(), w(), x(), y(), and z().


The documentation for this class was generated from the following files:
Generated on Thu Jan 31 19:32:54 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3