mitsuba/src/librender/phase.cpp

49 lines
1.3 KiB
C++
Raw Normal View History

#include <mitsuba/render/phase.h>
#include <mitsuba/render/medium.h>
MTS_NAMESPACE_BEGIN
std::string PhaseFunctionSamplingRecord::toString() const {
std::ostringstream oss;
oss << "PhaseFunctionSamplingRecord[" << endl
<< " mRec = " << indent(mRec.toString()) << "," << endl
<< " wi = " << wi.toString() << "," << endl
<< " wo = " << wo.toString() << "," << endl
<< " mode = " << mode << endl
<< "]";
return oss.str();
}
void PhaseFunction::configure() {
m_type = 0;
}
Float PhaseFunction::pdf(const PhaseFunctionSamplingRecord &pRec) const {
2011-07-05 02:13:36 +08:00
return eval(pRec);
}
2011-04-14 21:15:59 +08:00
bool PhaseFunction::needsDirectionallyVaryingCoefficients() const {
return false;
}
Float PhaseFunction::sigmaDir(Float cosTheta) const {
Log(EError, "%s::sigmaDir(Float) is not implemented (this is not "
"an anisotropic medium!)", getClass()->getName().c_str());
2011-04-14 21:15:59 +08:00
return 0.0f;
}
2011-07-29 09:29:11 +08:00
Float PhaseFunction::sigmaDirMax() const {
Log(EError, "%s::sigmaDirMax() is not implemented (this is not "
"an anisotropic medium!)", getClass()->getName().c_str());
return 0.0f;
}
Float PhaseFunction::getMeanCosine() const {
Log(EError, "%s::getMeanCosine() is not implemented!",
getClass()->getName().c_str());
return 0.0f;
}
MTS_IMPLEMENT_CLASS(PhaseFunction, true, ConfigurableObject)
MTS_NAMESPACE_END