#include <cloud.h>
Public Member Functions | |
| Cloud (const RGBColor &sa, const RGBColor &ss, float gg, const RGBColor &emit, const BBox &e, const float &r, const Transform &v2w, const float &noiseScale, const float &t, const float &sharp, const float &v, const float &baseflatness, const int &octaves, const float &o, const float &offSet, const int &numspheres, const float &spheresize) | |
| virtual | ~Cloud () |
| virtual bool | IntersectP (const Ray &r, float *t0, float *t1) const |
| virtual BBox | WorldBound () const |
| virtual float | Density (const Point &p) const |
Static Public Member Functions | |
| static VolumeRegion * | CreateVolumeRegion (const Transform &volume2world, const ParamSet ¶ms) |
Private Member Functions | |
| bool | SphereFunction (const Point &p) const |
| float | CloudShape (const Point &p) const |
| float | NoiseMask (const Point &p) const |
| Vector | Turbulence (const Point p, float noiseScale, int octaves) const |
| Vector | Turbulence (const Vector &v, float &noiseScale, int &octaves) const |
| float | CloudNoise (Point p, const float &omegaValue, int octaves) const |
Private Attributes | |
| BBox | extent |
| Vector | scale |
| Point * | sphereCentre |
| float | inputRadius |
| float | radius |
| bool | cumulus |
| int | numSpheres |
| float | sphereSize |
| CumulusSphere * | spheres |
| float | baseFadeDistance |
| float | sharpness |
| float | baseFlatness |
| float | variability |
| float | omega |
| float | firstNoiseScale |
| float | noiseOffSet |
| float | turbulenceAmount |
| int | numOctaves |
Definition at line 43 of file cloud.h.
| lux::Cloud::Cloud | ( | const RGBColor & | sa, | |
| const RGBColor & | ss, | |||
| float | gg, | |||
| const RGBColor & | emit, | |||
| const BBox & | e, | |||
| const float & | r, | |||
| const Transform & | v2w, | |||
| const float & | noiseScale, | |||
| const float & | t, | |||
| const float & | sharp, | |||
| const float & | v, | |||
| const float & | baseflatness, | |||
| const int & | octaves, | |||
| const float & | o, | |||
| const float & | offSet, | |||
| const int & | numspheres, | |||
| const float & | spheresize | |||
| ) |
Definition at line 87 of file cloud.h.
References baseFadeDistance, baseFlatness, cumulus, extent, firstNoiseScale, inputRadius, noiseOffSet, numSpheres, lux::BBox::pMax, lux::BBox::pMin, radius, cimg_library::cimg::rand(), lux::RotateY(), lux::RotateZ(), lux::CumulusSphere::setPosition(), lux::CumulusSphere::setRadius(), sphereCentre, spheres, sphereSize, cimg_library::cimg::srand(), Turbulence(), turbulenceAmount, lux::Vector::x, lux::Point::x, lux::Vector::y, lux::Point::y, lux::Vector::z, and lux::Point::z.
Referenced by CreateVolumeRegion().
| virtual lux::Cloud::~Cloud | ( | ) | [inline, virtual] |
Definition at line 50 of file cloud.h.
References sphereCentre, and spheres.
Definition at line 231 of file cloud.h.
References lux::Noise().
Referenced by NoiseMask(), and Turbulence().
| float lux::Cloud::CloudShape | ( | const Point & | p | ) | const [private] |
Definition at line 188 of file cloud.h.
References baseFadeDistance, cimg_library::cos(), cumulus, lux::Vector::Length(), radius, sphereCentre, SphereFunction(), lux::Point::x, lux::Point::y, and lux::Point::z.
Referenced by Density().
| VolumeRegion * Cloud::CreateVolumeRegion | ( | const Transform & | volume2world, | |
| const ParamSet & | params | |||
| ) | [static] |
Definition at line 31 of file cloud.cpp.
References Cloud(), lux::ParamSet::FindOneFloat(), lux::ParamSet::FindOneInt(), lux::ParamSet::FindOnePoint(), lux::ParamSet::FindOneRGBColor(), lux::DensityRegion::g, numSpheres, omega, radius, sharpness, lux::DensityRegion::sigma_a(), lux::DensityRegion::sigma_s(), and variability.
| float lux::Cloud::Density | ( | const Point & | p | ) | const [virtual] |
Implements lux::DensityRegion.
Definition at line 140 of file cloud.h.
References CloudShape(), extent, firstNoiseScale, lux::BBox::Inside(), numOctaves, cimg_library::pow(), sharpness, Turbulence(), and turbulenceAmount.
| virtual bool lux::Cloud::IntersectP | ( | const Ray & | r, | |
| float * | t0, | |||
| float * | t1 | |||
| ) | const [inline, virtual] |
Implements lux::VolumeRegion.
Definition at line 55 of file cloud.h.
References extent, lux::BBox::IntersectP(), and lux::DensityRegion::WorldToVolume.
| float lux::Cloud::NoiseMask | ( | const Point & | p | ) | const [private] |
Definition at line 217 of file cloud.h.
References CloudNoise(), omega, and radius.
Referenced by Turbulence().
| bool lux::Cloud::SphereFunction | ( | const Point & | p | ) | const [private] |
Definition at line 222 of file cloud.h.
References numSpheres, and spheres.
Referenced by CloudShape().
| Vector lux::Cloud::Turbulence | ( | const Vector & | v, | |
| float & | noiseScale, | |||
| int & | octaves | |||
| ) | const [private] |
Definition at line 183 of file cloud.h.
References Turbulence(), lux::Vector::x, lux::Vector::y, and lux::Vector::z.
Definition at line 151 of file cloud.h.
References baseFadeDistance, CloudNoise(), NoiseMask(), noiseOffSet, omega, sphereCentre, variability, lux::Vector::x, lux::Point::x, lux::Vector::y, lux::Point::y, lux::Vector::z, and lux::Point::z.
Referenced by Cloud(), Density(), and Turbulence().
| virtual BBox lux::Cloud::WorldBound | ( | ) | const [inline, virtual] |
Implements lux::VolumeRegion.
Definition at line 59 of file cloud.h.
References extent, lux::Transform::GetInverse(), and lux::DensityRegion::WorldToVolume.
float lux::Cloud::baseFadeDistance [private] |
Definition at line 82 of file cloud.h.
Referenced by Cloud(), CloudShape(), and Turbulence().
float lux::Cloud::baseFlatness [private] |
bool lux::Cloud::cumulus [private] |
Definition at line 77 of file cloud.h.
Referenced by Cloud(), and CloudShape().
BBox lux::Cloud::extent [private] |
Definition at line 72 of file cloud.h.
Referenced by Cloud(), Density(), IntersectP(), and WorldBound().
float lux::Cloud::firstNoiseScale [private] |
float lux::Cloud::inputRadius [private] |
float lux::Cloud::noiseOffSet [private] |
Definition at line 83 of file cloud.h.
Referenced by Cloud(), and Turbulence().
int lux::Cloud::numOctaves [private] |
int lux::Cloud::numSpheres [private] |
Definition at line 78 of file cloud.h.
Referenced by Cloud(), CreateVolumeRegion(), and SphereFunction().
float lux::Cloud::omega [private] |
Definition at line 83 of file cloud.h.
Referenced by CreateVolumeRegion(), NoiseMask(), and Turbulence().
float lux::Cloud::radius [private] |
Definition at line 75 of file cloud.h.
Referenced by Cloud(), CloudShape(), CreateVolumeRegion(), and NoiseMask().
Vector lux::Cloud::scale [private] |
float lux::Cloud::sharpness [private] |
Definition at line 82 of file cloud.h.
Referenced by CreateVolumeRegion(), and Density().
Point* lux::Cloud::sphereCentre [private] |
Definition at line 74 of file cloud.h.
Referenced by Cloud(), CloudShape(), Turbulence(), and ~Cloud().
CumulusSphere* lux::Cloud::spheres [private] |
Definition at line 80 of file cloud.h.
Referenced by Cloud(), SphereFunction(), and ~Cloud().
float lux::Cloud::sphereSize [private] |
float lux::Cloud::turbulenceAmount [private] |
float lux::Cloud::variability [private] |
Definition at line 82 of file cloud.h.
Referenced by CreateVolumeRegion(), and Turbulence().
1.6.2-20100208