Hermes
hermes::Plane Class Reference

Public Member Functions

 Plane ()
 default_color constructor
 
 Plane (normal3 n, real_t o)
 
 Plane (normal3 n, point3 p)
 
point3 closestPoint (const point3 &p) const
 
vec3 project (const vec3 &v) const
 projects v on plane More...
 
vec3 reflect (const vec3 &v) const
 reflects v fron plane More...
 
bool onNormalSide (const point3 &p) const
 

Static Public Member Functions

static Plane XY (bool invert_normal=false)
 
static Plane XZ (bool invert_normal=false)
 
static Plane YZ (bool invert_normal=false)
 

Public Attributes

normal3 normal
 
real_t offset
 

Friends

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

Detailed Description

Implements the equation normal X = offset.

Constructor & Destructor Documentation

◆ Plane()

hermes::Plane::Plane ( normal3  n,
real_t  o 
)
inline

Constructor

Parameters
n[in] normal
o[in] offset

Member Function Documentation

◆ project()

vec3 hermes::Plane::project ( const vec3 v) const
inline

projects v on plane

Parameters
v
Returns
projected v

◆ reflect()

vec3 hermes::Plane::reflect ( const vec3 v) const
inline

reflects v fron plane

Parameters
v
Returns
reflected v

◆ XY()

static Plane hermes::Plane::XY ( bool  invert_normal = false)
inlinestatic
Parameters
invert_normal
Returns
a plane with offset = 0 and normal(0,0,1)

◆ XZ()

static Plane hermes::Plane::XZ ( bool  invert_normal = false)
inlinestatic
Parameters
invert_normal
Returns
a plane with offset = 0 and normal(0,1,0)

◆ YZ()

static Plane hermes::Plane::YZ ( bool  invert_normal = false)
inlinestatic
Parameters
invert_normal
Returns
a plane with offset = 0 and normal(1,0,0)

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