documentation updates

metadata
Wenzel Jakob 2011-07-03 02:56:24 +02:00
parent 5cc7e40df2
commit 1cef7172cd
3 changed files with 22 additions and 17 deletions

View File

@ -1,14 +1,20 @@
Import('env', 'plugins')
plugins += env.SharedLibrary('lambertian', ['lambertian.cpp'])
# Dielectric microfacet materials
plugins += env.SharedLibrary('dielectric', ['dielectric.cpp'])
plugins += env.SharedLibrary('roughdielectric', ['roughdielectric.cpp'])
plugins += env.SharedLibrary('lambertian', ['lambertian.cpp'])
plugins += env.SharedLibrary('mirror', ['mirror.cpp'])
plugins += env.SharedLibrary('difftrans', ['difftrans.cpp'])
plugins += env.SharedLibrary('mask', ['mask.cpp'])
plugins += env.SharedLibrary('ward', ['ward.cpp'])
plugins += env.SharedLibrary('phong', ['phong.cpp'])
plugins += env.SharedLibrary('microfacet', ['microfacet.cpp'])
plugins += env.SharedLibrary('roughglass', ['roughglass.cpp'])
plugins += env.SharedLibrary('roughmetal', ['roughmetal.cpp'])
plugins += env.SharedLibrary('composite', ['composite.cpp'])
plugins += env.SharedLibrary('twosided', ['twosided.cpp'])

View File

@ -48,7 +48,7 @@ MTS_NAMESPACE_BEGIN
* smooth, resulting in a degenerate\footnote{Meaning that for any given incoming ray of light,
* the model always scatters into a discrete set of directions, as opposed to a continuum.}
* BSDF described by a Dirac delta function. For a similar model that describes a rough
* surface microstructure, take a look at the \pluginref{roughglass} plugin.
* surface microstructure, take a look at the \pluginref{roughdielectric} plugin.
*
* \begin{xml}[caption=A simple air-to-water interface, label=lst:dielectric-water]
* <shape type="...">
@ -80,7 +80,6 @@ MTS_NAMESPACE_BEGIN
* </medium>
* <shape>
* \end{xml}
*
*/
class SmoothDielectric : public BSDF {
public:

View File

@ -23,7 +23,7 @@
MTS_NAMESPACE_BEGIN
/*! \plugin{roughglass}{Rough dielectric material}
/*! \plugin{roughdielectric}{Rough dielectric material}
* \parameters{
* \parameter{distribution}{\String}{
* Specifies the type of microfacet normal distribution
@ -84,7 +84,7 @@ MTS_NAMESPACE_BEGIN
* meaningful and mutally compatible index of refraction change -- see
* \figref{glass-explanation} for an example.
*/
class RoughGlass : public BSDF {
class RoughDielectric : public BSDF {
public:
//// Microfacet distribution types supported by the model
enum EDistribution {
@ -96,7 +96,7 @@ public:
EGGX = 0x0002
};
RoughGlass(const Properties &props)
RoughDielectric(const Properties &props)
: BSDF(props) {
m_specularReflectance = new ConstantSpectrumTexture(
props.getSpectrum("specularReflectance", Spectrum(1.0f)));
@ -151,7 +151,7 @@ public:
m_usesRayDifferentials = false;
}
RoughGlass(Stream *stream, InstanceManager *manager)
RoughDielectric(Stream *stream, InstanceManager *manager)
: BSDF(stream, manager) {
m_distribution = (EDistribution) stream->readInt();
m_alpha = static_cast<Texture *>(manager->getInstance(stream));
@ -171,7 +171,7 @@ public:
m_specularTransmittance->usesRayDifferentials();
}
virtual ~RoughGlass() {
virtual ~RoughDielectric() {
delete[] m_type;
}
@ -751,7 +751,7 @@ public:
std::string toString() const {
std::ostringstream oss;
oss << "RoughGlass[" << endl
oss << "RoughDielectric[" << endl
<< " distribution = ";
switch (m_distribution) {
case EBeckmann: oss << "beckmann," << endl; break;
@ -783,9 +783,9 @@ private:
/* Fake glass shader -- it is really hopeless to visualize
this material in the VPL renderer, so let's try to do at least
something that suggests the presence of a transparent boundary */
class RoughGlassShader : public Shader {
class RoughDielectricShader : public Shader {
public:
RoughGlassShader(Renderer *renderer) :
RoughDielectricShader(Renderer *renderer) :
Shader(renderer, EBSDFShader) {
m_flags = ETransparent;
}
@ -803,11 +803,11 @@ public:
MTS_DECLARE_CLASS()
};
Shader *RoughGlass::createShader(Renderer *renderer) const {
return new RoughGlassShader(renderer);
Shader *RoughDielectric::createShader(Renderer *renderer) const {
return new RoughDielectricShader(renderer);
}
MTS_IMPLEMENT_CLASS(RoughGlassShader, false, Shader)
MTS_IMPLEMENT_CLASS_S(RoughGlass, false, BSDF)
MTS_EXPORT_PLUGIN(RoughGlass, "Rough glass BSDF");
MTS_IMPLEMENT_CLASS(RoughDielectricShader, false, Shader)
MTS_IMPLEMENT_CLASS_S(RoughDielectric, false, BSDF)
MTS_EXPORT_PLUGIN(RoughDielectric, "Rough glass BSDF");
MTS_NAMESPACE_END