RenderManAPI  24.0
RixBXLobeTraits Struct Reference

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...
 

Detailed Description

This struct represents the characteristics of potentially several lobes of a bxdf in aggregate.

Constructor & Destructor Documentation

◆ RixBXLobeTraits() [1/4]

PRMAN_INLINE RixBXLobeTraits::RixBXLobeTraits ( )

Constructor; initializes all fields to zero.

References RixBXLobeTraits::Converter::bits, SetNone(), and RixBXLobeTraits::Bitfield::valid.

◆ RixBXLobeTraits() [2/4]

PRMAN_INLINE RixBXLobeTraits::RixBXLobeTraits ( unsigned  serialized)

Constructor; initializes from serialization as unsigned short.

References RixBXLobeTraits::Converter::us.

◆ RixBXLobeTraits() [3/4]

◆ RixBXLobeTraits() [4/4]

Member Function Documentation

◆ GetContinuation()

PRMAN_INLINE bool RixBXLobeTraits::GetContinuation ( ) const

◆ GetDiffuse()

◆ GetDiscrete()

PRMAN_INLINE bool RixBXLobeTraits::GetDiscrete ( ) const

◆ GetMaxDiffuseDepth()

PRMAN_INLINE bool RixBXLobeTraits::GetMaxDiffuseDepth ( ) const

◆ GetMaxSpecularDepth()

PRMAN_INLINE bool RixBXLobeTraits::GetMaxSpecularDepth ( ) const

◆ GetReflect()

◆ GetSolidAngle()

PRMAN_INLINE bool RixBXLobeTraits::GetSolidAngle ( ) const

◆ GetSpecular()

◆ GetTransmit()

PRMAN_INLINE bool RixBXLobeTraits::GetTransmit ( ) const

◆ GetUser()

◆ GetValid()

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.

◆ HasAny()

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().

◆ HasAnyDiffSpec()

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().

◆ HasAnyDiffuse()

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.

◆ HasAnySpecular()

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.

◆ HasAnyUser()

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().

◆ operator &=()

PRMAN_INLINE RixBXLobeTraits const& RixBXLobeTraits::operator&= ( RixBXLobeTraits const &  rhs)

Bitwise AND all fields with the right-hand-side.

◆ operator|=()

PRMAN_INLINE RixBXLobeTraits const & RixBXLobeTraits::operator|= ( RixBXLobeTraits const &  rhs)

Bitwise OR all fields with the right-hand-side.

References RixBXLobeTraits::Converter::us.

◆ Serialize()

PRMAN_INLINE unsigned RixBXLobeTraits::Serialize ( ) const

References RixBXLobeTraits::Converter::us.

Referenced by operator &(), and operator|().

◆ SetAll()

◆ SetContinuation()

PRMAN_INLINE void RixBXLobeTraits::SetContinuation ( bool  val)

◆ SetDiffuse()

PRMAN_INLINE void RixBXLobeTraits::SetDiffuse ( unsigned short  bits)

◆ SetDiscrete()

PRMAN_INLINE void RixBXLobeTraits::SetDiscrete ( bool  val)

◆ SetMaxDiffuseDepth()

PRMAN_INLINE void RixBXLobeTraits::SetMaxDiffuseDepth ( bool  val)

◆ SetMaxSpecularDepth()

PRMAN_INLINE void RixBXLobeTraits::SetMaxSpecularDepth ( bool  val)

◆ SetNone()

PRMAN_INLINE void RixBXLobeTraits::SetNone ( )

Zero all fields.

References RixBXLobeTraits::Converter::us.

Referenced by RixBXLobeTraits().

◆ SetReflect()

PRMAN_INLINE void RixBXLobeTraits::SetReflect ( bool  val)

◆ SetSolidAngle()

PRMAN_INLINE void RixBXLobeTraits::SetSolidAngle ( bool  val)

◆ SetSpecular()

PRMAN_INLINE void RixBXLobeTraits::SetSpecular ( unsigned short  bits)

◆ SetTransmit()

PRMAN_INLINE void RixBXLobeTraits::SetTransmit ( bool  val)

◆ SetUser()

PRMAN_INLINE void RixBXLobeTraits::SetUser ( unsigned short  bits)

◆ SetValid()

PRMAN_INLINE void RixBXLobeTraits::SetValid ( bool  val)

The documentation for this struct was generated from the following file: