#include <hyperboloid.h>
Public Member Functions | |
Hyperboloid (const Transform &o2w, bool ro, const Point &point1, const Point &point2, float tm) | |
virtual | ~Hyperboloid () |
virtual BBox | ObjectBound () const |
virtual bool | Intersect (const Ray &ray, float *tHit, DifferentialGeometry *dg) const |
virtual bool | IntersectP (const Ray &ray) const |
virtual float | Area () const |
Static Public Member Functions | |
static Shape * | CreateShape (const Transform &o2w, bool reverseOrientation, const ParamSet ¶ms) |
Protected Attributes | |
Point | p1 |
Point | p2 |
float | zmin |
float | zmax |
float | phiMax |
float | rmax |
float | a |
float | c |
Definition at line 30 of file hyperboloid.h.
Hyperboloid::Hyperboloid | ( | const Transform & | o2w, | |
bool | ro, | |||
const Point & | point1, | |||
const Point & | point2, | |||
float | tm | |||
) |
Definition at line 31 of file hyperboloid.cpp.
References a, c, Clamp(), cimg_library::cimg::max(), cimg_library::cimg::min(), p1, p2, phiMax, Radians(), rmax, cimg_library::cimg::swap(), lux::Point::x, lux::Point::y, lux::Point::z, zmax, and zmin.
Referenced by CreateShape().
virtual lux::Hyperboloid::~Hyperboloid | ( | ) | [inline, virtual] |
Definition at line 36 of file hyperboloid.h.
float Hyperboloid::Area | ( | ) | const [virtual] |
Returns the area of this primitive.
Reimplemented from lux::Primitive.
Definition at line 208 of file hyperboloid.cpp.
References p1, p2, phiMax, QUAD, SQR, lux::Point::x, lux::Point::y, and lux::Point::z.
Shape * Hyperboloid::CreateShape | ( | const Transform & | o2w, | |
bool | reverseOrientation, | |||
const ParamSet & | params | |||
) | [static] |
Definition at line 224 of file hyperboloid.cpp.
References lux::ParamSet::FindOneFloat(), lux::ParamSet::FindOnePoint(), Hyperboloid(), p1, and p2.
bool Hyperboloid::Intersect | ( | const Ray & | ray, | |
float * | tHit, | |||
DifferentialGeometry * | dg | |||
) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 60 of file hyperboloid.cpp.
References a, c, lux::Cross(), lux::Ray::d, lux::Dot(), blender::g, G(), M_PI, lux::Ray::maxt, lux::Ray::mint, lux::Normalize(), lux::Ray::o, lux::Shape::ObjectToWorld, p1, p2, phiMax, Quadratic(), lux::Shape::WorldToObject, lux::Point::x, lux::Vector::x, lux::Point::y, lux::Vector::y, lux::Point::z, lux::Vector::z, zmax, and zmin.
bool Hyperboloid::IntersectP | ( | const Ray & | r | ) | const [virtual] |
Tests for intersection of this primitive with the given ray.
r | The ray to intersect with this primitive. |
Reimplemented from lux::Primitive.
Definition at line 152 of file hyperboloid.cpp.
References a, c, lux::Ray::d, M_PI, lux::Ray::maxt, lux::Ray::mint, lux::Ray::o, p1, p2, phiMax, Quadratic(), lux::Shape::WorldToObject, lux::Point::x, lux::Vector::x, lux::Point::y, lux::Vector::y, lux::Point::z, lux::Vector::z, zmax, and zmin.
BBox Hyperboloid::ObjectBound | ( | ) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 55 of file hyperboloid.cpp.
float lux::Hyperboloid::a [protected] |
Definition at line 50 of file hyperboloid.h.
Referenced by Hyperboloid(), Intersect(), and IntersectP().
float lux::Hyperboloid::c [protected] |
Definition at line 50 of file hyperboloid.h.
Referenced by Hyperboloid(), Intersect(), and IntersectP().
Point lux::Hyperboloid::p1 [protected] |
Definition at line 46 of file hyperboloid.h.
Referenced by Area(), CreateShape(), Hyperboloid(), Intersect(), IntersectP(), and ObjectBound().
Point lux::Hyperboloid::p2 [protected] |
Definition at line 46 of file hyperboloid.h.
Referenced by Area(), CreateShape(), Hyperboloid(), Intersect(), IntersectP(), and ObjectBound().
float lux::Hyperboloid::phiMax [protected] |
Definition at line 48 of file hyperboloid.h.
Referenced by Area(), Hyperboloid(), Intersect(), and IntersectP().
float lux::Hyperboloid::rmax [protected] |
Definition at line 49 of file hyperboloid.h.
Referenced by Hyperboloid(), and ObjectBound().
float lux::Hyperboloid::zmax [protected] |
Definition at line 47 of file hyperboloid.h.
Referenced by Hyperboloid(), Intersect(), IntersectP(), and ObjectBound().
float lux::Hyperboloid::zmin [protected] |
Definition at line 47 of file hyperboloid.h.
Referenced by Hyperboloid(), Intersect(), IntersectP(), and ObjectBound().