Rasterfarm-SDK
Loading...
Searching...
No Matches
Ray Class Reference

#include <ray.h>

Public Member Functions

 Ray (const Vertex2f &origin, const Vector2f &direction)
 
Ray operator- ()
 
float slope () const
 
bool operator() (const Vertex2f &a, const Vertex2f &b)
 
 Ray (const Vertex3f &origin, const Vector3f &direction)
 
 operator Primitive2D::Ray ()
 
Ray operator- ()
 
void setDirection (const Vector3f &direction)
 
bool operator() (const Vertex3f &a, const Vertex3f &b)
 

Public Attributes

Vector2f direction
 
Vertex2f origin
 
Vector3f direction
 
Vertex3f origin
 

Constructor & Destructor Documentation

◆ Ray() [1/2]

Ray::Ray ( const Vertex2f & origin,
const Vector2f & direction )
Parameters
Thepoint at with the Ray begins.
Thedirection of magnitude = 1, will assert if compiled with SANITY_CHECK.

◆ Ray() [2/2]

Ray::Ray ( const Vertex3f & origin,
const Vector3f & direction )
Parameters
Thepoint at with the Ray begins.
Thedirection of magnitude = 1, will assert if compiled with SANITY_CHECK.

Member Function Documentation

◆ operator Primitive2D::Ray()

Ray::operator Primitive2D::Ray ( )

◆ operator()() [1/2]

bool Ray::operator() ( const Vertex2f & a,
const Vertex2f & b )

◆ operator()() [2/2]

bool Ray::operator() ( const Vertex3f & a,
const Vertex3f & b )

◆ operator-() [1/2]

Ray Ray::operator- ( )
inline

◆ operator-() [2/2]

Ray Ray::operator- ( )
inline

Reverse the direction;

◆ setDirection()

void Ray::setDirection ( const Vector3f & direction)
Parameters
Thedirection of magnitude = 1.

◆ slope()

float Ray::slope ( ) const

Member Data Documentation

◆ direction [1/2]

Vector2f Ray::direction

Normalized.

◆ direction [2/2]

Vector3f Ray::direction

Normalized.

◆ origin [1/2]

Vertex2f Ray::origin

◆ origin [2/2]

Vertex3f Ray::origin

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