#include <WoodTexture.h>
Public Member Functions | |
WoodTexture (float ringDist, float distortion, float weight, Point3D org, Vec3D dir, const RGBColor &light, const RGBColor &dark) | |
virtual | ~WoodTexture () |
virtual RGBAColor | getColor (const Point3D &p) const |
RGBAColor | calcColor (const float &x) const |
float | getScale (const Point3D &hit, float disturbation, float widthFactor, bool &down, Vec3D &radius) const |
Vec3D | getBump (const Point3D &p, const Vec3D &normal) const |
Private Attributes | |
float | ringDist |
float | distortion |
float | weight |
Vec3D | dir |
Point3D | org |
RGBAColor | light |
RGBAColor | dark |
Definition at line 10 of file WoodTexture.h.
rcrt::WoodTexture::WoodTexture | ( | float | ringDist, | |
float | distortion, | |||
float | weight, | |||
Point3D | org, | |||
Vec3D | dir, | |||
const RGBColor & | light, | |||
const RGBColor & | dark | |||
) |
Definition at line 6 of file WoodTexture.cpp.
rcrt::WoodTexture::~WoodTexture | ( | ) | [virtual] |
Definition at line 12 of file WoodTexture.cpp.
Implements rcrt::Texture3D.
Definition at line 16 of file WoodTexture.cpp.
References calcColor(), getScale(), and PerlinNoise::turbulence().
Referenced by rcrt::WoodMaterial::sample(), and rcrt::WoodMaterial::scatterPhoton().
RGBAColor rcrt::WoodTexture::calcColor | ( | const float & | x | ) | const |
float rcrt::WoodTexture::getScale | ( | const Point3D & | hit, | |
float | disturbation, | |||
float | widthFactor, | |||
bool & | down, | |||
Vec3D & | radius | |||
) | const |
Definition at line 34 of file WoodTexture.cpp.
References dir, distortion, rcrt::Vec3D::norm(), rcrt::Vec3D::normalize(), org, and ringDist.
Referenced by getBump(), and getColor().
Definition at line 65 of file WoodTexture.cpp.
References getScale(), PerlinNoise::turbulence(), and weight.
Referenced by rcrt::WoodMaterial::getShadingNormal().
float rcrt::WoodTexture::ringDist [private] |
float rcrt::WoodTexture::distortion [private] |
float rcrt::WoodTexture::weight [private] |
Vec3D rcrt::WoodTexture::dir [private] |
Point3D rcrt::WoodTexture::org [private] |
RGBAColor rcrt::WoodTexture::light [private] |
RGBAColor rcrt::WoodTexture::dark [private] |