
Public Member Functions | |
| VolumeGrid (const Spectrum &sa, const Spectrum &ss, float gg, const Spectrum &emit, const BBox &e, const Transform &v2w, int nx, int ny, int nz, const float *d) | |
| ~VolumeGrid () | |
| BBox | WorldBound () const |
| bool | IntersectP (const Ray &r, float *t0, float *t1) const |
| float | Density (const Point &Pobj) const |
| float | D (int x, int y, int z) const |
Private Attributes | |
| float * | density |
| const int | nx |
| const int | ny |
| const int | nz |
| const BBox | extent |
Definition at line 27 of file volumegrid.cpp.
| VolumeGrid::VolumeGrid | ( | const Spectrum & | sa, | |
| const Spectrum & | ss, | |||
| float | gg, | |||
| const Spectrum & | emit, | |||
| const BBox & | e, | |||
| const Transform & | v2w, | |||
| int | nx, | |||
| int | ny, | |||
| int | nz, | |||
| const float * | d | |||
| ) |
Definition at line 53 of file volumegrid.cpp.
References density, memcpy(), nx, ny, and nz.
Referenced by CreateVolumeRegion().
| VolumeGrid::~VolumeGrid | ( | ) | [inline] |
| BBox VolumeGrid::WorldBound | ( | ) | const [inline, virtual] |
Implements VolumeRegion.
Definition at line 34 of file volumegrid.cpp.
References extent, Transform::GetInverse(), and DensityRegion::WorldToVolume.
| bool VolumeGrid::IntersectP | ( | const Ray & | r, | |
| float * | t0, | |||
| float * | t1 | |||
| ) | const [inline, virtual] |
Implements VolumeRegion.
Definition at line 35 of file volumegrid.cpp.
References extent, BBox::IntersectP(), and DensityRegion::WorldToVolume.
| float VolumeGrid::Density | ( | const Point & | Pobj | ) | const [virtual] |
Implements DensityRegion.
Definition at line 63 of file volumegrid.cpp.
References D(), extent, Floor2Int(), BBox::Inside(), Lerp(), nx, ny, nz, BBox::pMax, BBox::pMin, Point::x, Point::y, and Point::z.
| float VolumeGrid::D | ( | int | x, | |
| int | y, | |||
| int | z | |||
| ) | const [inline] |
Definition at line 40 of file volumegrid.cpp.
References Clamp(), and density.
Referenced by Density().
float* VolumeGrid::density [private] |
const int VolumeGrid::nx [private] |
Definition at line 49 of file volumegrid.cpp.
Referenced by CreateVolumeRegion(), Density(), and VolumeGrid().
const int VolumeGrid::ny [private] |
Definition at line 49 of file volumegrid.cpp.
Referenced by CreateVolumeRegion(), Density(), and VolumeGrid().
const int VolumeGrid::nz [private] |
Definition at line 49 of file volumegrid.cpp.
Referenced by CreateVolumeRegion(), Density(), and VolumeGrid().
const BBox VolumeGrid::extent [private] |
Definition at line 50 of file volumegrid.cpp.
Referenced by Density(), IntersectP(), and WorldBound().
1.5.6