renamed a few constants
parent
d666d89031
commit
d53f7c9196
|
@ -61,7 +61,7 @@ public:
|
||||||
* The transported quantity (\ref ERadiance or \ref EImportance)
|
* The transported quantity (\ref ERadiance or \ref EImportance)
|
||||||
*/
|
*/
|
||||||
explicit inline BSDFQueryRecord(const Intersection &its, Sampler *sampler,
|
explicit inline BSDFQueryRecord(const Intersection &its, Sampler *sampler,
|
||||||
ETransportQuantity quantity = ERadiance);
|
ETransportMode quantity = ERadiance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Given a surface interaction an an incident/exitant direction
|
* \brief Given a surface interaction an an incident/exitant direction
|
||||||
|
@ -81,7 +81,7 @@ public:
|
||||||
* The transported quantity (\ref ERadiance or \ref EImportance)
|
* The transported quantity (\ref ERadiance or \ref EImportance)
|
||||||
*/
|
*/
|
||||||
inline BSDFQueryRecord(const Intersection &its, const Vector &wo,
|
inline BSDFQueryRecord(const Intersection &its, const Vector &wo,
|
||||||
ETransportQuantity quantity = ERadiance);
|
ETransportMode quantity = ERadiance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Given a surface interaction an an incident/exitant direction
|
* \brief Given a surface interaction an an incident/exitant direction
|
||||||
|
@ -104,7 +104,7 @@ public:
|
||||||
*/
|
*/
|
||||||
inline BSDFQueryRecord(const Intersection &its,
|
inline BSDFQueryRecord(const Intersection &its,
|
||||||
const Vector &wi, const Vector &wo,
|
const Vector &wi, const Vector &wo,
|
||||||
ETransportQuantity quantity = ERadiance);
|
ETransportMode quantity = ERadiance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Reverse the direction of light transport in the record
|
* \brief Reverse the direction of light transport in the record
|
||||||
|
@ -153,7 +153,7 @@ public:
|
||||||
* This information is required for rendering with non-reciprocal
|
* This information is required for rendering with non-reciprocal
|
||||||
* BSDFs such as transmission through a dielectric material
|
* BSDFs such as transmission through a dielectric material
|
||||||
*/
|
*/
|
||||||
ETransportQuantity quantity;
|
ETransportMode quantity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Bit mask containing the requested BSDF component types that
|
* \brief Bit mask containing the requested BSDF component types that
|
||||||
|
|
|
@ -28,12 +28,16 @@ MTS_NAMESPACE_BEGIN
|
||||||
* sampling or evaluating a scattering function
|
* sampling or evaluating a scattering function
|
||||||
* \ingroup librender
|
* \ingroup librender
|
||||||
*/
|
*/
|
||||||
enum ETransportQuantity {
|
enum ETransportMode {
|
||||||
/* Note to self: do not change enumeration values,
|
/* Note to self: do not change these enumeration
|
||||||
some code depends on this. */
|
values, some code depends on them. */
|
||||||
|
|
||||||
|
/// Radiance transport
|
||||||
ERadiance = 0,
|
ERadiance = 0,
|
||||||
EImportance = 1
|
/// Importance transport
|
||||||
|
EImportance = 1,
|
||||||
|
/// Specifies the number of supported transport modes
|
||||||
|
ETransportModes = 2
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* \brief Specifies the measure associated with
|
* \brief Specifies the measure associated with
|
||||||
|
@ -48,7 +52,7 @@ enum EMeasure {
|
||||||
|
|
||||||
|
|
||||||
/// \cond
|
/// \cond
|
||||||
extern MTS_EXPORT_RENDER std::ostream &operator<<(std::ostream &os, const ETransportQuantity &quantity);
|
extern MTS_EXPORT_RENDER std::ostream &operator<<(std::ostream &os, const ETransportMode &quantity);
|
||||||
extern MTS_EXPORT_RENDER std::ostream &operator<<(std::ostream &os, const EMeasure &measure);
|
extern MTS_EXPORT_RENDER std::ostream &operator<<(std::ostream &os, const EMeasure &measure);
|
||||||
/// \endcond
|
/// \endcond
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ struct MTS_EXPORT_RENDER PhaseFunctionQueryRecord {
|
||||||
|
|
||||||
/* Transported quantity (radiance or importance) -- required for
|
/* Transported quantity (radiance or importance) -- required for
|
||||||
rendering with non-reciprocal phase functions */
|
rendering with non-reciprocal phase functions */
|
||||||
ETransportQuantity quantity;
|
ETransportMode quantity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Given a medium interaction and an incident direction,
|
* \brief Given a medium interaction and an incident direction,
|
||||||
|
@ -70,7 +70,7 @@ struct MTS_EXPORT_RENDER PhaseFunctionQueryRecord {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
inline PhaseFunctionQueryRecord(const MediumSamplingRecord &mRec,
|
inline PhaseFunctionQueryRecord(const MediumSamplingRecord &mRec,
|
||||||
const Vector &wi, ETransportQuantity quantity = ERadiance)
|
const Vector &wi, ETransportMode quantity = ERadiance)
|
||||||
: mRec(mRec), wi(wi), quantity(quantity) { }
|
: mRec(mRec), wi(wi), quantity(quantity) { }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -92,7 +92,7 @@ struct MTS_EXPORT_RENDER PhaseFunctionQueryRecord {
|
||||||
* The transported quantity (\ref ERadiance or \ref EImportance)
|
* The transported quantity (\ref ERadiance or \ref EImportance)
|
||||||
*/
|
*/
|
||||||
inline PhaseFunctionQueryRecord(const MediumSamplingRecord &mRec,
|
inline PhaseFunctionQueryRecord(const MediumSamplingRecord &mRec,
|
||||||
const Vector &wi, const Vector &wo, ETransportQuantity quantity = ERadiance)
|
const Vector &wi, const Vector &wo, ETransportMode quantity = ERadiance)
|
||||||
: mRec(mRec), wi(wi), wo(wo), quantity(quantity) { }
|
: mRec(mRec), wi(wi), wo(wo), quantity(quantity) { }
|
||||||
|
|
||||||
std::string toString() const;
|
std::string toString() const;
|
||||||
|
|
|
@ -21,24 +21,24 @@
|
||||||
|
|
||||||
MTS_NAMESPACE_BEGIN
|
MTS_NAMESPACE_BEGIN
|
||||||
|
|
||||||
inline BSDFQueryRecord::BSDFQueryRecord(const Intersection &its, Sampler *sampler, ETransportQuantity quantity)
|
inline BSDFQueryRecord::BSDFQueryRecord(const Intersection &its, Sampler *sampler, ETransportMode quantity)
|
||||||
: its(its), sampler(sampler), wi(its.wi), quantity(quantity),
|
: its(its), sampler(sampler), wi(its.wi), quantity(quantity),
|
||||||
typeMask(BSDF::EAll), component(-1), sampledType(0), sampledComponent(-1) {
|
typeMask(BSDF::EAll), component(-1), sampledType(0), sampledComponent(-1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline BSDFQueryRecord::BSDFQueryRecord(const Intersection &its, const Vector &wo, ETransportQuantity quantity)
|
inline BSDFQueryRecord::BSDFQueryRecord(const Intersection &its, const Vector &wo, ETransportMode quantity)
|
||||||
: its(its), sampler(NULL), wi(its.wi), wo(wo), quantity(quantity),
|
: its(its), sampler(NULL), wi(its.wi), wo(wo), quantity(quantity),
|
||||||
typeMask(BSDF::EAll), component(-1), sampledType(0), sampledComponent(-1) {
|
typeMask(BSDF::EAll), component(-1), sampledType(0), sampledComponent(-1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline BSDFQueryRecord::BSDFQueryRecord(const Intersection &its, const Vector &wi, const Vector &wo, ETransportQuantity quantity)
|
inline BSDFQueryRecord::BSDFQueryRecord(const Intersection &its, const Vector &wi, const Vector &wo, ETransportMode quantity)
|
||||||
: its(its), sampler(NULL), wi(wi), wo(wo), quantity(quantity),
|
: its(its), sampler(NULL), wi(wi), wo(wo), quantity(quantity),
|
||||||
typeMask(BSDF::EAll), component(-1), sampledType(0), sampledComponent(-1) {
|
typeMask(BSDF::EAll), component(-1), sampledType(0), sampledComponent(-1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BSDFQueryRecord::reverse() {
|
void BSDFQueryRecord::reverse() {
|
||||||
std::swap(wo, wi);
|
std::swap(wo, wi);
|
||||||
quantity = (ETransportQuantity) (1-quantity);
|
quantity = (ETransportMode) (1-quantity);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool Intersection::hasSubsurface() const {
|
inline bool Intersection::hasSubsurface() const {
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
MTS_NAMESPACE_BEGIN
|
MTS_NAMESPACE_BEGIN
|
||||||
|
|
||||||
std::ostream &operator<<(std::ostream &os, const ETransportQuantity &quantity) {
|
std::ostream &operator<<(std::ostream &os, const ETransportMode &quantity) {
|
||||||
switch (quantity) {
|
switch (quantity) {
|
||||||
case EImportance: os << "importance"; break;
|
case EImportance: os << "importance"; break;
|
||||||
case ERadiance: os << "radiance"; break;
|
case ERadiance: os << "radiance"; break;
|
||||||
|
|
Loading…
Reference in New Issue