RenderMan API  23.0
RixLPEState Class Reference

#include <RixLPE.h>

Public Member Functions

 RixLPEState (RixLPEAutomata const *automata, const int nautomata)
 
 ~RixLPEState ()
 
void Reset ()
 
std::vector< short > & GetState ()
 
const std::vector< short > & GetState () const
 
void SetState (const std::vector< short > &state)
 
bool Broken () const
 
bool Test (const RixLPEToken dir, const RixLPEToken sca, const RixLPEToken custom)
 
const RtColorRGBGetThruput () const
 
const RixLPEAutomataGetAutomata (int &nautomata) const
 
void MoveCamera (RixShadingContext const *sCtx, int sCtxIndex)
 
void MoveCamera (RixShadingContext const *sCtx, int sCtxIndex, const RtColorRGB &thruput)
 
void MoveEmissiveObject (RixShadingContext const *sCtx, int sCtxIndex, RtColorRGB const &thruput, RixLPEToken lpeGroupId=RixLPE::k_BLANK)
 
void MoveLight (RixShadingContext const *sCtx, int sCtxIndex, RtColorRGB const &thruput, RtColorRGB const *lightTrans, bool firstContribution, RixLPEToken lgtLpeToken)
 
void MoveVertex (RixShadingContext const *sCtx, int sCtxIndex, RixLPEScatterEvent const scatterEvent, RixLPEToken lpeGroupId=RixLPE::k_BLANK)
 
void MoveVertex (RixShadingContext const *sCtx, int sCtxIndex, RixLPEScatterEvent const scatterEvent, const RtColorRGB &thruput, RixLPEToken lpeGroupId=RixLPE::k_BLANK, bool doStateTransition=true)
 

Detailed Description

Represents the LPE system state of a light transport path. Generally, this class provides an API into the internal state of a particular light transport path with respect to the Light Path Expression (LPE) automata. Use the RixLPE::AllocateStates() and RixLPE:FreeStates() methods to allocate and free RixLPEState instances. Then use the MoveCamera(), MoveVertex(), MoveLight() and MoveEmissiveObject() methods of this class in order to perform state transitions at each corresponding type of light scattering event along a light transport path.

Definition at line 440 of file RixLPE.h.

Constructor & Destructor Documentation

◆ RixLPEState()

PRMAN_INLINE RixLPEState::RixLPEState ( RixLPEAutomata const *  automata,
const int  nautomata 
)

Definition at line 152 of file RixLPEInline.h.

◆ ~RixLPEState()

PRMAN_INLINE RixLPEState::~RixLPEState ( )

Definition at line 160 of file RixLPEInline.h.

Member Function Documentation

◆ Broken()

PRMAN_INLINE bool RixLPEState::Broken ( ) const

Definition at line 191 of file RixLPEInline.h.

◆ GetAutomata()

PRMAN_INLINE const RixLPEAutomata * RixLPEState::GetAutomata ( int &  nautomata) const

Definition at line 216 of file RixLPEInline.h.

◆ GetState() [1/2]

PRMAN_INLINE std::vector< short > & RixLPEState::GetState ( )

Definition at line 173 of file RixLPEInline.h.

◆ GetState() [2/2]

PRMAN_INLINE const std::vector< short > & RixLPEState::GetState ( ) const

Definition at line 179 of file RixLPEInline.h.

◆ GetThruput()

PRMAN_INLINE const RtColorRGB & RixLPEState::GetThruput ( ) const

Definition at line 210 of file RixLPEInline.h.

◆ MoveCamera() [1/2]

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

Call this method at a camera event along a light transport path.

This is typically the first state transition along a light transport path. Pass in the shading context and the index of the shading sample in the batch.

The RixShadingContext shading state The index of the shading sample in shading context

Definition at line 223 of file RixLPEInline.h.

◆ MoveCamera() [2/2]

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

Second overload of the MoveCamera() method that accepts a path throughput

This is typically the first state transition along a light transport path. Pass in the shading context, the index of the shading sample in the batch and the path throughput.

The RixShadingContext shading state The index of the shading sample in shading context The current path throughput at this scattering event.

Definition at line 231 of file RixLPEInline.h.

◆ MoveEmissiveObject()

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

Call this method at an emissive object event along a light transport path.

This is typically the last state transition along a light transport path. Pass in the shading context, the index of the shading sample in the batch, the path throughput, and a token identifying the LPE group.

The RixShadingContext shading state The index of the shading sample in shading context The current path throughput at this scattering event A RixLPEToken identifying the LPE group of the emissive geometry.

Definition at line 241 of file RixLPEInline.h.

◆ MoveLight()

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

Call this method at a light event along a light transport path.

This is typically the last state transition along a light transport path. Pass in the shading context, the index of the shading sample in the batch, the path throughput, the transmission to the light, and a token identifying the light in the LPE subsystem.

The RixShadingContext shading state The index of the shading sample in shading context The current path throughput at this scattering event The amount of illumination transmission to the light [Deprecated/unused] A RixLPEToken identifying the light

Definition at line 254 of file RixLPEInline.h.

◆ MoveVertex() [1/2]

PRMAN_INLINE void RixLPEState::MoveVertex ( RixShadingContext const *  sCtx,
int  sCtxIndex,
RixLPEScatterEvent const  scatterEvent,
RixLPEToken  lpeGroupId = RixLPE::k_BLANK 
)

Invoke this method at an intermediate (non-camera/non-light) scattering event along a light transport path.

When light scatters along a light transport path, call this method to transition the state in the LPE automata. This method is intended to be invoked for intermediate light scattering events after MoveCamera() has transitioned out of the camera, and before the light path arrives at the light source (e.g., before MoveLight() / MoveEmissiveObject() are invoked).

The RixShadingContext shading state The index of the shading sample in shading context A RixLPEScatterEvent instance describing the event A RixLPEToken identifying the LPE group

Definition at line 271 of file RixLPEInline.h.

◆ MoveVertex() [2/2]

PRMAN_INLINE void RixLPEState::MoveVertex ( RixShadingContext const *  sCtx,
int  sCtxIndex,
RixLPEScatterEvent const  scatterEvent,
const RtColorRGB thruput,
RixLPEToken  lpeGroupId = RixLPE::k_BLANK,
bool  doStateTransition = true 
)

Second overload of the MoveVertex() method that accepts a path throughput and an optional argument about whether to perform a state transition.

Invoke this overload of the MoveVertex() method in order to communicate the current path throughput to the LPE subsystem. The path throughput information can later be used to attenuate display channel outputs appropriately.

The RixShadingContext shading state The index of the shading sample in shading context A RixLPEScatterEvent instance describing the event The current path throughput at this scattering event A RixLPEToken identifying the LPE group Whether to transit state in the automata.

Definition at line 289 of file RixLPEInline.h.

◆ Reset()

PRMAN_INLINE void RixLPEState::Reset ( )

Definition at line 165 of file RixLPEInline.h.

◆ SetState()

PRMAN_INLINE void RixLPEState::SetState ( const std::vector< short > &  state)

Definition at line 185 of file RixLPEInline.h.

◆ Test()

PRMAN_INLINE bool RixLPEState::Test ( const RixLPEToken  dir,
const RixLPEToken  sca,
const RixLPEToken  custom 
)

Definition at line 199 of file RixLPEInline.h.


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