Hermes
hermes::Line Class Reference

Represents a line by a point and a vector. More...

Public Member Functions

 Line (point3 _a, vec3 _d)
 
point3 operator() (float t) const
 
vec3 direction () const
 
float projection (point3 p) const
 
point3 closestPoint (point3 p) const
 

Public Attributes

point3 a
 line point
 
vec3 d
 line direction
 

Friends

std::ostream & operator<< (std::ostream &os, const Line &p)
 

Detailed Description

Represents a line by a point and a vector.

Constructor & Destructor Documentation

◆ Line()

hermes::Line::Line ( point3  _a,
vec3  _d 
)
inline
Parameters
_aline point
_ddirection

Member Function Documentation

◆ closestPoint()

point3 hermes::Line::closestPoint ( point3  p) const
inline
Parameters
ppoint
Returns
closest point in line from p

◆ direction()

vec3 hermes::Line::direction ( ) const
inline
Returns
unit vector representing line direction

◆ operator()()

point3 hermes::Line::operator() ( float  t) const
inline
Parameters
tparametric coordinate
Returns
euclidean point from parametric coordinate t

◆ projection()

float hermes::Line::projection ( point3  p) const
inline
Parameters
ppoint
Returns
parametric coordinate of p projection into line

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