![]() |
RenderMan
26.0
|
This struct represents the characteristics of potentially several lobes of a bxdf in aggregate. More...
#include <RixBxdfLobe.h>
Classes | |
struct | Bitfield |
union | Converter |
Public Member Functions | |
PRMAN_INLINE | RixBXLobeTraits () |
Constructor; initializes all fields to zero. More... | |
PRMAN_INLINE | RixBXLobeTraits (unsigned serialized) |
Constructor; initializes from serialization as unsigned short. More... | |
PRMAN_INLINE | RixBXLobeTraits (bool discrete, bool solidAngle, bool reflect, bool transmit, unsigned short D, unsigned short S, unsigned short U) |
Constructor; sets all fields. More... | |
PRMAN_INLINE | RixBXLobeTraits (RixBXLobeSampled lobe) |
Constructor; sets all fields from a RixBXLobeSampled struct. More... | |
PRMAN_INLINE bool | GetDiscrete () const |
PRMAN_INLINE bool | GetSolidAngle () const |
PRMAN_INLINE bool | GetReflect () const |
PRMAN_INLINE bool | GetTransmit () const |
PRMAN_INLINE bool | GetContinuation () const |
PRMAN_INLINE unsigned short | GetDiffuse () const |
PRMAN_INLINE unsigned short | GetSpecular () const |
PRMAN_INLINE unsigned short | GetUser () const |
PRMAN_INLINE bool | GetValid () const |
Returns true if this is a valid sample Note this is different from HasAny because a sample could be valid while HasAny returns false. More... | |
PRMAN_INLINE bool | GetMaxSpecularDepth () const |
PRMAN_INLINE bool | GetMaxDiffuseDepth () const |
PRMAN_INLINE void | SetValid (bool val) |
PRMAN_INLINE void | SetDiscrete (bool val) |
PRMAN_INLINE void | SetSolidAngle (bool val) |
PRMAN_INLINE void | SetReflect (bool val) |
PRMAN_INLINE void | SetTransmit (bool val) |
PRMAN_INLINE void | SetContinuation (bool val) |
PRMAN_INLINE void | SetMaxSpecularDepth (bool val) |
PRMAN_INLINE void | SetMaxDiffuseDepth (bool val) |
PRMAN_INLINE void | SetDiffuse (unsigned short bits) |
PRMAN_INLINE void | SetSpecular (unsigned short bits) |
PRMAN_INLINE void | SetUser (unsigned short bits) |
PRMAN_INLINE void | SetNone () |
Zero all fields. More... | |
PRMAN_INLINE void | SetAll () |
Set all bits to true (except for the discreteSubset and continuationSubset which are both set to zero; use SetDiscrete() / SetContinuation() to explicitly set the discreteSubset and continuationSubset bits). More... | |
PRMAN_INLINE bool | HasAny () const |
Returns true if any diffuse, specular, or user bits are set, and either the reflect, transmit, or continuation bits are set. More... | |
PRMAN_INLINE bool | HasAnyDiffSpec () const |
Returns true if any diffuse or specular bits are set, and either the reflect, transmit, or continuation bits are set. More... | |
PRMAN_INLINE bool | HasAnyDiffuse () const |
Returns true if any diffuse bits are set, and either the reflect or transmit bits are set. More... | |
PRMAN_INLINE bool | HasAnySpecular () const |
Returns true if any specular bits are set, and either the reflect or transmit bits are set. More... | |
PRMAN_INLINE bool | HasAnyUser () const |
Returns true if any user bits are set. More... | |
PRMAN_INLINE unsigned | Serialize () const |
PRMAN_INLINE RixBXLobeTraits const & | operator&= (RixBXLobeTraits const &rhs) |
Bitwise AND all fields with the right-hand-side. More... | |
PRMAN_INLINE RixBXLobeTraits const & | operator|= (RixBXLobeTraits const &rhs) |
Bitwise OR all fields with the right-hand-side. More... | |
This struct represents the characteristics of potentially several lobes of a bxdf in aggregate.
PRMAN_INLINE RixBXLobeTraits::RixBXLobeTraits | ( | ) |
Constructor; initializes all fields to zero.
References RixBXLobeTraits::Converter::bits, SetNone(), and RixBXLobeTraits::Bitfield::valid.
PRMAN_INLINE RixBXLobeTraits::RixBXLobeTraits | ( | unsigned | serialized) |
Constructor; initializes from serialization as unsigned short.
References RixBXLobeTraits::Converter::us.
PRMAN_INLINE RixBXLobeTraits::RixBXLobeTraits | ( | bool | discrete, |
bool | solidAngle, | ||
bool | reflect, | ||
bool | transmit, | ||
unsigned short | D, | ||
unsigned short | S, | ||
unsigned short | U | ||
) |
Constructor; sets all fields.
References RixBXLobeTraits::Converter::bits, RixBXLobeTraits::Bitfield::continuationSubset, RixBXLobeTraits::Bitfield::D, RixBXLobeTraits::Bitfield::discreteSubset, RixBXLobeTraits::Bitfield::maxdiffusedepth, RixBXLobeTraits::Bitfield::maxspeculardepth, RixBXLobeTraits::Bitfield::reflectSubset, RixBXLobeTraits::Bitfield::S, RixBXLobeTraits::Bitfield::solidAngleSubset, RixBXLobeTraits::Bitfield::transmitSubset, RixBXLobeTraits::Bitfield::U, and RixBXLobeTraits::Bitfield::valid.
|
explicit |
Constructor; sets all fields from a RixBXLobeSampled struct.
References RixBXLobeTraits::Converter::bits, RixBXLobeTraits::Bitfield::continuationSubset, RixBXLobeTraits::Bitfield::D, RixBXLobeTraits::Bitfield::discreteSubset, RixBXLobeSampled::GetContinuation(), RixBXLobeSampled::GetDiffuse(), RixBXLobeSampled::GetDiscrete(), RixBXLobeSampled::GetLpeId(), RixBXLobeSampled::GetReflect(), RixBXLobeSampled::GetSolidAngle(), RixBXLobeSampled::GetSpecular(), RixBXLobeSampled::GetTransmit(), RixBXLobeSampled::GetUser(), RixBXLobeSampled::GetValid(), RixBXLobeTraits::Bitfield::maxdiffusedepth, RixBXLobeTraits::Bitfield::maxspeculardepth, RixBXLobeTraits::Bitfield::reflectSubset, RixBXLobeTraits::Bitfield::S, SetNone(), SetValid(), RixBXLobeTraits::Bitfield::solidAngleSubset, RixBXLobeTraits::Bitfield::transmitSubset, and RixBXLobeTraits::Bitfield::U.
PRMAN_INLINE bool RixBXLobeTraits::GetContinuation | ( | ) | const |
PRMAN_INLINE unsigned short RixBXLobeTraits::GetDiffuse | ( | ) | const |
PRMAN_INLINE bool RixBXLobeTraits::GetDiscrete | ( | ) | const |
PRMAN_INLINE bool RixBXLobeTraits::GetMaxDiffuseDepth | ( | ) | const |
PRMAN_INLINE bool RixBXLobeTraits::GetMaxSpecularDepth | ( | ) | const |
PRMAN_INLINE bool RixBXLobeTraits::GetReflect | ( | ) | const |
References RixBXLobeTraits::Converter::bits, and RixBXLobeTraits::Bitfield::reflectSubset.
Referenced by RixLPEScatterEvent::RixLPEScatterEvent().
PRMAN_INLINE bool RixBXLobeTraits::GetSolidAngle | ( | ) | const |
PRMAN_INLINE unsigned short RixBXLobeTraits::GetSpecular | ( | ) | const |
PRMAN_INLINE bool RixBXLobeTraits::GetTransmit | ( | ) | const |
PRMAN_INLINE unsigned short RixBXLobeTraits::GetUser | ( | ) | const |
PRMAN_INLINE bool RixBXLobeTraits::GetValid | ( | ) | const |
Returns true if this is a valid sample Note this is different from HasAny because a sample could be valid while HasAny returns false.
An example could be a diffuse black bxdf being evaluated: we will not evaluate any lobe because its not necessary, but its nevertheless a valid sample Integrators should use this function to test again invalid samples as opposed to HasAny()
References RixBXLobeTraits::Converter::bits, and RixBXLobeTraits::Bitfield::valid.
PRMAN_INLINE bool RixBXLobeTraits::HasAny | ( | ) | const |
Returns true if any diffuse, specular, or user bits are set, and either the reflect, transmit, or continuation bits are set.
References HasAnyDiffSpec(), and HasAnyUser().
PRMAN_INLINE bool RixBXLobeTraits::HasAnyDiffSpec | ( | ) | const |
Returns true if any diffuse or specular bits are set, and either the reflect, transmit, or continuation bits are set.
References RixBXLobeTraits::Converter::bits, RixBXLobeTraits::Bitfield::continuationSubset, RixBXLobeTraits::Bitfield::D, RixBXLobeTraits::Bitfield::reflectSubset, RixBXLobeTraits::Bitfield::S, and RixBXLobeTraits::Bitfield::transmitSubset.
Referenced by HasAny().
PRMAN_INLINE bool RixBXLobeTraits::HasAnyDiffuse | ( | ) | const |
Returns true if any diffuse bits are set, and either the reflect or transmit bits are set.
References RixBXLobeTraits::Converter::bits, RixBXLobeTraits::Bitfield::D, RixBXLobeTraits::Bitfield::reflectSubset, and RixBXLobeTraits::Bitfield::transmitSubset.
PRMAN_INLINE bool RixBXLobeTraits::HasAnySpecular | ( | ) | const |
Returns true if any specular bits are set, and either the reflect or transmit bits are set.
References RixBXLobeTraits::Converter::bits, RixBXLobeTraits::Bitfield::reflectSubset, RixBXLobeTraits::Bitfield::S, and RixBXLobeTraits::Bitfield::transmitSubset.
PRMAN_INLINE bool RixBXLobeTraits::HasAnyUser | ( | ) | const |
Returns true if any user bits are set.
References RixBXLobeTraits::Converter::bits, and RixBXLobeTraits::Bitfield::U.
Referenced by HasAny().
PRMAN_INLINE RixBXLobeTraits const & RixBXLobeTraits::operator&= | ( | RixBXLobeTraits const & | rhs) |
Bitwise AND all fields with the right-hand-side.
References RixBXLobeTraits::Converter::us.
PRMAN_INLINE RixBXLobeTraits const & RixBXLobeTraits::operator|= | ( | RixBXLobeTraits const & | rhs) |
Bitwise OR all fields with the right-hand-side.
References RixBXLobeTraits::Converter::us.
PRMAN_INLINE unsigned RixBXLobeTraits::Serialize | ( | ) | const |
References RixBXLobeTraits::Converter::us.
Referenced by operator&(), and operator|().
PRMAN_INLINE void RixBXLobeTraits::SetAll | ( | ) |
Set all bits to true (except for the discreteSubset and continuationSubset which are both set to zero; use SetDiscrete() / SetContinuation() to explicitly set the discreteSubset and continuationSubset bits).
References RixBXLobeTraits::Converter::bits, RixBXLobeTraits::Bitfield::continuationSubset, RixBXLobeTraits::Bitfield::D, RixBXLobeTraits::Bitfield::discreteSubset, RixBXLobeTraits::Bitfield::maxdiffusedepth, RixBXLobeTraits::Bitfield::maxspeculardepth, RixBXLobeTraits::Bitfield::reflectSubset, RixBXLobeTraits::Bitfield::S, RixBXLobeTraits::Bitfield::solidAngleSubset, RixBXLobeTraits::Bitfield::transmitSubset, RixBXLobeTraits::Bitfield::U, and RixBXLobeTraits::Bitfield::valid.
PRMAN_INLINE void RixBXLobeTraits::SetContinuation | ( | bool | val) |
PRMAN_INLINE void RixBXLobeTraits::SetDiffuse | ( | unsigned short | bits) |
References RixBXLobeTraits::Converter::bits, and RixBXLobeTraits::Bitfield::D.
Referenced by RixBXChooseLobe().
PRMAN_INLINE void RixBXLobeTraits::SetDiscrete | ( | bool | val) |
PRMAN_INLINE void RixBXLobeTraits::SetMaxDiffuseDepth | ( | bool | val) |
PRMAN_INLINE void RixBXLobeTraits::SetMaxSpecularDepth | ( | bool | val) |
PRMAN_INLINE void RixBXLobeTraits::SetNone | ( | ) |
PRMAN_INLINE void RixBXLobeTraits::SetReflect | ( | bool | val) |
References RixBXLobeTraits::Converter::bits, and RixBXLobeTraits::Bitfield::reflectSubset.
PRMAN_INLINE void RixBXLobeTraits::SetSolidAngle | ( | bool | val) |
PRMAN_INLINE void RixBXLobeTraits::SetSpecular | ( | unsigned short | bits) |
References RixBXLobeTraits::Converter::bits, and RixBXLobeTraits::Bitfield::S.
Referenced by RixBXChooseLobe().
PRMAN_INLINE void RixBXLobeTraits::SetTransmit | ( | bool | val) |
PRMAN_INLINE void RixBXLobeTraits::SetUser | ( | unsigned short | bits) |
References RixBXLobeTraits::Converter::bits, and RixBXLobeTraits::Bitfield::U.
PRMAN_INLINE void RixBXLobeTraits::SetValid | ( | bool | val) |
References RixBXLobeTraits::Converter::bits, and RixBXLobeTraits::Bitfield::valid.
Referenced by RixBXLobeTraits().