C++ / OpenCL Raytracer
Object Class Referenceabstract

#include <object.h>

Inheritance diagram for Object:
Box Sphere

Public Member Functions

virtual bool Hit (const Ray &r, HitRecord &rec, double tMin, double tMax) const =0
 
virtual int clType () const =0
 
virtual Vector3D clCenter () const =0
 
virtual double clRadius () const =0
 
virtual Vector3D clBound1 () const =0
 
virtual Vector3D clBound2 () const =0
 
virtual cl_double8 CurMat () const =0
 

Detailed Description

Renderable object which may be hit by rays

Member Function Documentation

◆ clBound1()

virtual Vector3D Object::clBound1 ( ) const
pure virtual

Returns first Vector3D bound of object.

Example:

clBound1();

Implemented in Box, and Sphere.

◆ clBound2()

virtual Vector3D Object::clBound2 ( ) const
pure virtual

Returns second Vector3D bound of object.

Example:

clBound2();

Implemented in Box, and Sphere.

◆ clCenter()

virtual Vector3D Object::clCenter ( ) const
pure virtual

Returns Vector3D center of object.

Example:

clCenter();

Implemented in Box, and Sphere.

◆ clRadius()

virtual double Object::clRadius ( ) const
pure virtual

Returns double radius of object.

Example:

clRadius();

Implemented in Box, and Sphere.

◆ clType()

virtual int Object::clType ( ) const
pure virtual

Returns type of object as int. Sphere (0) or Box (1).

Example:

clType();

Implemented in Box, and Sphere.

◆ CurMat()

virtual cl_double8 Object::CurMat ( ) const
pure virtual

Returns cl_double8 formatted object material.

Example:

CurMat();

Implemented in Box, and Sphere.

◆ Hit()

virtual bool Object::Hit ( const Ray r,
HitRecord rec,
double  tMin,
double  tMax 
) const
pure virtual

Return boolean value if member object is hit by specified ray.

Example:

Hit(ray, hitrec, 0.001, DBL_MAX);

Implemented in Box, and Sphere.


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