#include <hyperboloid.h>
Public Member Functions | |
Hyperboloid (const Transform &o2w, bool ro, const Point &point1, const Point &point2, float tm) | |
BBox | ObjectBound () const |
bool | Intersect (const Ray &ray, float *tHit, DifferentialGeometry *dg) const |
bool | IntersectP (const Ray &ray) const |
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 30 of file hyperboloid.cpp.
References a, c, Clamp(), cimg_library::max(), cimg_library::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().
float Hyperboloid::Area | ( | ) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 207 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 223 of file hyperboloid.cpp.
References lux::ParamSet::FindOneFloat(), lux::ParamSet::FindOnePoint(), Hyperboloid(), p1, and p2.
Referenced by lux::MakeShape().
bool Hyperboloid::Intersect | ( | const Ray & | ray, | |
float * | tHit, | |||
DifferentialGeometry * | dg | |||
) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 59 of file hyperboloid.cpp.
References a, c, lux::Cross(), lux::Ray::d, lux::Dot(), blender::g, M_PI, lux::Ray::maxt, lux::Ray::mint, N, 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 & | ray | ) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 151 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] |
float lux::Hyperboloid::a [protected] |
Definition at line 49 of file hyperboloid.h.
Referenced by Hyperboloid(), Intersect(), and IntersectP().
float lux::Hyperboloid::c [protected] |
Definition at line 49 of file hyperboloid.h.
Referenced by Hyperboloid(), Intersect(), and IntersectP().
Point lux::Hyperboloid::p1 [protected] |
Definition at line 45 of file hyperboloid.h.
Referenced by Area(), CreateShape(), Hyperboloid(), Intersect(), IntersectP(), and ObjectBound().
Point lux::Hyperboloid::p2 [protected] |
Definition at line 45 of file hyperboloid.h.
Referenced by Area(), CreateShape(), Hyperboloid(), Intersect(), IntersectP(), and ObjectBound().
float lux::Hyperboloid::phiMax [protected] |
Definition at line 47 of file hyperboloid.h.
Referenced by Area(), Hyperboloid(), Intersect(), and IntersectP().
float lux::Hyperboloid::rmax [protected] |
float lux::Hyperboloid::zmax [protected] |
Definition at line 46 of file hyperboloid.h.
Referenced by Hyperboloid(), Intersect(), IntersectP(), and ObjectBound().
float lux::Hyperboloid::zmin [protected] |
Definition at line 46 of file hyperboloid.h.
Referenced by Hyperboloid(), Intersect(), IntersectP(), and ObjectBound().