RixLPEState Class Reference

RixLPEState Class Reference

#include <RixLPE.h>

Public Member Functions

PRMAN_INLINE RixLPEState (const RixLPEAutomata *automata, const RixLPEAutomataNfa *automataNfa, RixCustomLPE *rixCustomLPE)
 Constructor (use RixLPE::AllocateStates(...) to allocate).
 
PRMAN_INLINE RixLPEState (const RixLPEState &that)
 Copy constructor.
 
PRMAN_INLINE ~RixLPEState ()
 Destructor (use RixLPE::FreeStates(...) to free).
 
PRMAN_INLINE RixLPEStateoperator= (const RixLPEState &that)
 Operator =.
 
PRMAN_INLINE int GetState ()
 Get the current state in the automata.
 
PRMAN_INLINE void SetState (int state)
 Set the current state in the automata.
 
PRMAN_INLINE void Reset ()
 Re-initialize / reset this instance.
 
PRMAN_INLINE void MoveCamera (RixShadingContext const *sCtx, int sCtxIndex)
 
PRMAN_INLINE void MoveEmissiveObject (RixShadingContext const *sCtx, int sCtxIndex, RtColorRGB const &thruput, RixLPEToken lpeGrpId=RixLPE::k_BLANK)
 
PRMAN_INLINE void MoveLight (RixShadingContext const *sCtx, int sCtxIndex, RtColorRGB const &thruput, RtColorRGB const *lgtTrans, bool firstContribution, RixLPEToken lgtGrpToken)
 
PRMAN_INLINE void MoveVertex (RixShadingContext const *sCtx, int sCtxIndex, RixBXLobeSampled lobeSampled, RtColorRGB const &thruput, bool firstContribution, RixLPEToken lpeGrpId=RixLPE::k_BLANK, RtColorRGB const **masks=0)
 
PRMAN_INLINE void MoveVertexMultiLobe (RixShadingContext const *sCtx, int sCtxIndex, bool isReflect, RixBXActiveLobeWeights const &activeLobes, int weightIndex, RixLPEToken lpeGrpId=RixLPE::k_BLANK, bool doStateTransition=true)
 
PRMAN_INLINE ChanIdVec const * GetChannelIds ()
 Fetch the array of channel ids for the current state.
 
PRMAN_INLINE std::vector< int >
const * 
GetOutputIndexes ()
 Fetch the array of output indexes for the current state.
 
PRMAN_INLINE std::vector< int >
const * 
GetFlags ()
 Fetch the array of flags for the current state.
 
PRMAN_INLINE std::vector< int >
const * 
GetCustomIds ()
 Fetch the array of custom ids for the current state.
 
PRMAN_INLINE RtColorRGB const * GetThruputs ()
 Fetch the per-display channel path thruputs.
 
PRMAN_INLINE RixCustomLPE * GetRixCustomLPE ()
 Fetch the RixCustomLPE interface object.
 
PRMAN_INLINE RixLPEAutomata const * GetAutomata ()
 
PRMAN_INLINE RixLPEAutomataNfa
const * 
GetAutomataNfa ()
 
PRMAN_INLINE std::map< int,
RtColorRGB > const & 
GetThruputsNfa ()
 
PRMAN_INLINE void SetThruputsNfa (std::map< int, RtColorRGB > const &thrus)
 

Detailed Description

Stores a current state in the deterministic finite automata. Create instances of this class using the RixLPE::AllocateStates() method and free them using RixLPE::FreeStates(). Use the GetState()/SetState() methods to save and restore the current state at any point along the light path, and use Reset() to re-initialize/reset. GetChannelIds() will routine a list of matching channel ids for the current state in the automata.

Member Function Documentation

PRMAN_INLINE void RixLPEState::MoveCamera ( RixShadingContext const *  sCtx,
int  sCtxIndex 
)

Perform a state transition in the DFA that represents leaving the camera.

PRMAN_INLINE void RixLPEState::MoveEmissiveObject ( RixShadingContext const *  sCtx,
int  sCtxIndex,
RtColorRGB const &  thruput,
RixLPEToken  lpeGrpId = RixLPE::k_BLANK 
)

Perform a state transition in the DFA that represents hitting an emissive object.

PRMAN_INLINE void RixLPEState::MoveLight ( RixShadingContext const *  sCtx,
int  sCtxIndex,
RtColorRGB const &  thruput,
RtColorRGB const *  lgtTrans,
bool  firstContribution,
RixLPEToken  lgtGrpToken 
)

Perform a state transition in the DFA that represents hitting a geometric light known to RixLightingServices.

PRMAN_INLINE void RixLPEState::MoveVertex ( RixShadingContext const *  sCtx,
int  sCtxIndex,
RixBXLobeSampled  lobeSampled,
RtColorRGB const &  thruput,
bool  firstContribution,
RixLPEToken  lpeGrpId = RixLPE::k_BLANK,
RtColorRGB const **  masks = 0 
)

Perform a state transition in the DFA that represents a light scattering event at a vertex in a light path given the sampled lobe's trait information. This method should only be called when a scattering event only includes one type of energy (diffuse, glossy, or specular, but not a combination of energy from these lobes); the per-display channel throughputs will not be updated by this method (instead use MoveVertexMultiLobe for that purpose).

PRMAN_INLINE void RixLPEState::MoveVertexMultiLobe ( RixShadingContext const *  sCtx,
int  sCtxIndex,
bool  isReflect,
RixBXActiveLobeWeights const &  activeLobes,
int  weightIndex,
RixLPEToken  lpeGrpId = RixLPE::k_BLANK,
bool  doStateTransition = true 
)

Perform a state transition in the DFA that represents a light scattering event at a vertex in a light path given the sampled lobe's trait information. Use this method in preference to MoveVertex() when a scattering event potentially includes a combination of diffuse/glossy/specular contributions and you wish to update the per-display channel path throughputs.


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