SPH
Public Member Functions | Friends | List of all members
Ray Class Reference

#include <Bvh.h>

Public Member Functions

 Ray ()=default
 
 Ray (const Vector &origin, const Vector &dir)
 
const Vectororigin () const
 
const Vectordirection () const
 

Friends

bool intersectBox (const Box &box, const Ray &ray, Float &t_min, Float &t_max)
 Finds intersections of ray with a box. More...
 

Detailed Description

Definition at line 10 of file Bvh.h.

Constructor & Destructor Documentation

◆ Ray() [1/2]

Ray::Ray ( )
default

◆ Ray() [2/2]

Ray::Ray ( const Vector origin,
const Vector dir 
)
inline

Definition at line 22 of file Bvh.h.

Member Function Documentation

◆ direction()

const Vector& Ray::direction ( ) const
inline

Definition at line 35 of file Bvh.h.

◆ origin()

const Vector& Ray::origin ( ) const
inline

Definition at line 31 of file Bvh.h.

Friends And Related Function Documentation

◆ intersectBox

bool intersectBox ( const Box box,
const Ray ray,
Float t_min,
Float t_max 
)
friend

Finds intersections of ray with a box.

There is always either zero or two intersections. If the ray intersects the box, the function returns true and the intersection distances (near and far distance) are returned as t_min and t_max.

Definition at line 16 of file Bvh.inl.h.


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