My Project
Public Member Functions | Public Attributes | List of all members
Ray3D Class Reference

#include <geometry.h>

Public Member Functions

 Ray3D (const Point3D &pos, const Point3D &dir)
 
Ray3D add (const Point3D &p) const
 
Ray3D operator+ (const Point3D &p) const
 
Ray3Doperator+= (const Point3D &p)
 
Ray3D subtract (const Point3D &p) const
 
Ray3D operator- (const Point3D &p) const
 
Ray3Doperator-= (const Point3D &p)
 
Point3D operator() (double t) const
 

Public Attributes

Point3D position
 
Point3D direction
 

Detailed Description

This class represents a Ray in 3D.

Member Function Documentation

Ray3D Ray3D::add ( const Point3D p) const

This method computes the translation of the ray by p and returns the translated ray.

Point3D Ray3D::operator() ( double  t) const

This method returns the point at a distance of t along the ray.

Ray3D Ray3D::operator+ ( const Point3D p) const

This method computes the translation of the ray by p and returns the translated ray.

Ray3D & Ray3D::operator+= ( const Point3D p)

This method translates the current ray by p.

Ray3D Ray3D::operator- ( const Point3D p) const

This method computes the translation of the ray by -p and returns the translated ray.

Ray3D & Ray3D::operator-= ( const Point3D p)

This method translates the current ray by -p.

Ray3D Ray3D::subtract ( const Point3D p) const

This method computes the translation of the ray by -p and returns the translated ray.

Member Data Documentation

Point3D Ray3D::direction

The direction of the ray

Point3D Ray3D::position

The starting point of the ray


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