Material Class Reference
Abstract representation of a surface Material, defined without respect to the underlying surface (loose coupling between Shapes and Materials from the point-of-view of a Material, but all Shapes know about their surface Material). Materials subclass PropertyMap, and it is through this interface that Material properties may be set (ex: diffuse color, texture/bump/color map(s), index of refraction of interior volume, etc.). More...
#include <Material.h>

Public Member Functions | |
Constructors | |
| Material () | |
| virtual | ~Material () |
Initialization | |
| virtual void | init () |
| Performs any initialization that may be necessary before beginning to sample this material. | |
Main usage interface | |
| virtual bool | isEmitter () |
| virtual BSDF * | getBSDF (SurfacePoint &pt) |
| Accessor for instantiating BSDFs used in sampling at various SurfacePoints along an underlying surface comprised of this Material. | |
| virtual Emitter * | getEmitter (SurfacePoint &pt) |
| Accessor for instantiating Emitters used for evaluating emittance along an underlying surface comprised of this Material. | |
| virtual Emitter * | getEmitter () |
| Accessor for instantiating a representative Emitter at any point on the surface of this Material. | |
| virtual Sensor * | getSensor (SurfacePoint &pt) |
| Accessor for instantiating Sensors used for evaluating importance along an underlying surface comprised of this Material. | |
| virtual void | preview (Shape *shape) |
| Sets up OpenGL material state (color properties, lights, etc.) to enable a crude/fast preview of geometry to which this Material is applied. | |
Utility methods for extracting BSDF/Emitter/Sensor parameters | |
| SpectralSampleSet | getSpectralSampleSet (const std::string &key, const SpectralSampleSet &defaultValue, const SurfacePoint &pt) |
| SpectralSampleSet | getSpectralSampleSet (const std::string &key, const real_t &defaultValue, const SurfacePoint &pt) |
| SpectralSampleSet | getSpectralSampleSet (const std::string &key, const std::string &defaultValue, const SurfacePoint &pt) |
| SpectralSampleSet | getSpectralSampleSet (const std::string &key, const SurfacePoint &pt) |
| RgbaHDR | getSample (const ImagePtr &image, const UV &uv) |
| KernelFilter * | getFilter () |
Lazy evaluation of SurfacePoint information | |
| virtual void | initSurfacePoint (SurfacePoint &pt) |
Static Public Attributes | |
Static members | |
| static SurfacePoint | s_nullSurfacePoint |
| static Emitter * | s_nullEmitter = new NullEmitter(Material::s_nullSurfacePoint) |
| static Sensor * | s_nullSensor = new NullSensor (Material::s_nullSurfacePoint) |
Protected Member Functions | |
| virtual void | _initShadingNormal (SurfacePoint &pt) |
Protected Attributes | |
| KernelFilter * | m_filter |
| std::string | m_bsdf |
| std::string | m_emitter |
| std::string | m_bumpMap |
| real_t | m_repeatU |
| real_t | m_repeatV |
| real_t | m_bumpIntensity |
Detailed Description
Abstract representation of a surface Material, defined without respect to the underlying surface (loose coupling between Shapes and Materials from the point-of-view of a Material, but all Shapes know about their surface Material). Materials subclass PropertyMap, and it is through this interface that Material properties may be set (ex: diffuse color, texture/bump/color map(s), index of refraction of interior volume, etc.).
- Date:
- Fall 2008
Definition at line 47 of file Material.h.
Constructor & Destructor Documentation
| Material::Material | ( | ) | [inline] |
Definition at line 60 of file Material.h.
| Material::~Material | ( | ) | [virtual] |
Definition at line 47 of file Material.cpp.
Member Function Documentation
| void Material::init | ( | ) | [virtual] |
Performs any initialization that may be necessary before beginning to sample this material.
- Note:
- default implementation initializes this material's filter, used for filtering texture values
Definition at line 51 of file Material.cpp.
| bool Material::isEmitter | ( | ) | [virtual] |
| BSDF * Material::getBSDF | ( | SurfacePoint & | pt | ) | [virtual] |
Accessor for instantiating BSDFs used in sampling at various SurfacePoints along an underlying surface comprised of this Material.
- Returns:
- a new BSDF defined at the given surface point. The type of BSDF returned depends on the 'bsdf' property in the PropertyMap, which defaults to DiffuseBSDF
Definition at line 65 of file Material.cpp.
| Emitter * Material::getEmitter | ( | SurfacePoint & | pt | ) | [virtual] |
Accessor for instantiating Emitters used for evaluating emittance along an underlying surface comprised of this Material.
- Returns:
- a new Emitter defined at the given surface point. The type of Emitter returned depends on the 'emitter' property in the PropertyMap, which defaults to NullEmitter (no light emitted)
Definition at line 96 of file Material.cpp.
| Emitter * Material::getEmitter | ( | ) | [virtual] |
Accessor for instantiating a representative Emitter at any point on the surface of this Material.
- Note:
- useful if you just want to know the emittance properties of this Material (power, radiant exitance, etc.) and don't actually intend to use it for sampling purposes
- Returns:
- a new Emitter defined at a dummy surface point. The type of Emitter returned depends on the 'emitter' property in the PropertyMap, which defaults to NullEmitter (no light emitted)
Definition at line 116 of file Material.cpp.
| Sensor * Material::getSensor | ( | SurfacePoint & | pt | ) | [virtual] |
Accessor for instantiating Sensors used for evaluating importance along an underlying surface comprised of this Material.
- Returns:
- a new Sensor defined at the given surface point
Definition at line 120 of file Material.cpp.
| void Material::preview | ( | Shape * | shape | ) | [virtual] |
Sets up OpenGL material state (color properties, lights, etc.) to enable a crude/fast preview of geometry to which this Material is applied.
Definition at line 137 of file Material.cpp.
| SpectralSampleSet Material::getSpectralSampleSet | ( | const std::string & | key, | |
| const SpectralSampleSet & | defaultValue, | |||
| const SurfacePoint & | pt | |||
| ) |
Definition at line 225 of file Material.cpp.
| SpectralSampleSet Material::getSpectralSampleSet | ( | const std::string & | key, | |
| const real_t & | defaultValue, | |||
| const SurfacePoint & | pt | |||
| ) |
Definition at line 235 of file Material.cpp.
| SpectralSampleSet Material::getSpectralSampleSet | ( | const std::string & | key, | |
| const std::string & | defaultValue, | |||
| const SurfacePoint & | pt | |||
| ) |
Definition at line 247 of file Material.cpp.
| SpectralSampleSet Material::getSpectralSampleSet | ( | const std::string & | key, | |
| const SurfacePoint & | pt | |||
| ) |
Definition at line 257 of file Material.cpp.
Definition at line 279 of file Material.cpp.
| KernelFilter* Material::getFilter | ( | ) | [inline] |
Definition at line 168 of file Material.h.
| void Material::initSurfacePoint | ( | SurfacePoint & | pt | ) | [virtual] |
Definition at line 155 of file Material.cpp.
| void Material::_initShadingNormal | ( | SurfacePoint & | pt | ) | [protected, virtual] |
Definition at line 177 of file Material.cpp.
Member Data Documentation
SurfacePoint Material::s_nullSurfacePoint [static] |
Definition at line 51 of file Material.h.
Emitter * Material::s_nullEmitter = new NullEmitter(Material::s_nullSurfacePoint) [static] |
Definition at line 52 of file Material.h.
Sensor * Material::s_nullSensor = new NullSensor (Material::s_nullSurfacePoint) [static] |
Definition at line 53 of file Material.h.
KernelFilter* Material::m_filter [protected] |
Definition at line 186 of file Material.h.
std::string Material::m_bsdf [protected] |
Definition at line 188 of file Material.h.
std::string Material::m_emitter [protected] |
Definition at line 189 of file Material.h.
std::string Material::m_bumpMap [protected] |
Definition at line 190 of file Material.h.
real_t Material::m_repeatU [protected] |
Definition at line 192 of file Material.h.
real_t Material::m_repeatV [protected] |
Definition at line 193 of file Material.h.
real_t Material::m_bumpIntensity [protected] |
Definition at line 194 of file Material.h.
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6