#include <RixIntegrator.h>

void  InitOrigination (RixShadingContext const *sCtx, RtNormal3 const *Ngn, int _shadingCtxIndex) 
 InitOrigination() should be called after the ray geometry has been setup for calls to GetNearestHits() . More...


void  InitTransmitOrigination (RixShadingContext const *sCtx, int _shadingCtxIndex) 
 InitTransmission() is analogous to InitOrigination() but should be used for transmission rays. More...


void  SetRaySpread (RixBXLobeSampled lobe, float rayOriginRadius, float rayOriginSpread, float curvature, float fPdf, bool lightPath=false) 
 Computes ray spread for given reflection/transmission type, pdf, and surface curvature, using two approaches: More...


◆ RayType
Enumerator 

k_rtInvalid  
k_rtCamera  
k_rtLight  
k_rtTransmission  
k_rtDirectlight  
k_rtIndirect  
k_rtNumRayTypes  
◆ DecodeWavelength()
static PRMAN_INLINE float RtRayGeometry::DecodeWavelength 
( 
uint16_t 
encodedWavelength  ) 


inlinestatic 
Converts from encoded 16 bits representation of wavelength to nanometers In both units 0 means "full spectrum", meaning no wavelength is defined.
 Parameters

[in]  encodedWavelength  A 16bits encoded wavelength 
 Returns
 the wavelength, in nanometers.
◆ EncodeWavelength()
static PRMAN_INLINE uint16_t RtRayGeometry::EncodeWavelength 
( 
float 
wavelength  ) 


inlinestatic 
Converts a wavelenght
(in nanometers) to a compact 16 bits representation of it.
In both units 0 means "full spectrum", meaning no wavelength is defined.
 Parameters

[in]  wavelength  A wavelength in nanometers. 
 Returns
 a 16bits encoded wavelength.
◆ InitOrigination()
InitOrigination()
should be called after the ray geometry has been setup for calls to GetNearestHits()
.
In addition to setting the origination context, we analyze the combination of lobeSampled
and Nn
to determine whether a transmit event was a nominal enter or exit. Origination state allows rays to be backtracked to the original shading context for recovery of raypath information.
 Parameters

[in]  sCtx  Shading context containing the shading point that launched this ray. 
[in]  Ngn  Geometric normal at the shading point that launched this ray. 
[in]  _shadingCtxIndex  Index of the shading point in the shading context. 
References RixBXLobeSampled::GetTransmit(), RixShadingContext::integratorCtxIndex, RixBXLobeSampled::SetEntering(), and RixShadingContext::shadingCtxId.
◆ InitTransmitOrigination()
void RtRayGeometry::InitTransmitOrigination 
( 
RixShadingContext const * 
sCtx, 


int 
_shadingCtxIndex 

) 
 

inline 
◆ SetRaySpread()
void RtRayGeometry::SetRaySpread 
( 
RixBXLobeSampled 
lobe, 


float 
rayOriginRadius, 


float 
rayOriginSpread, 


float 
curvature, 


float 
fPdf, 


bool 
lightPath = false 

) 
 

inline 
Computes ray spread for given reflection/transmission type, pdf, and surface curvature, using two approaches:
 Ray spread based on roughness (pdf). The ray spread from a flat rough surface depends on roughness: the higher roughness the lower the pdf in a given direction; here we map the pdf to a ray spread using a heuristic mapping.
 Ray spread based on surface curvature. The ray spread for reflection from a curved smooth surface is simple to compute using Igehy's formula.
We set the overall ray spread to the max of these two. (For rough curved surfaces a better answer might be larger than the max – perhaps the sum? – but it's not 100% clear what the optimal combined value should be.)
 Parameters

[in]  lobe  Used to determine if we are dealing with a reflection or transmission event. 
[in]  rayOriginRadius  Incident ray radius at ray origin. 
[in]  rayOriginSpread  Incident ray spread at ray origin. 
[in]  curvature  Local surface curvature. 
[in]  fPdf  Pdf associated with the ray direction. 
[in]  lightPath  Indicates if the rays is part of a light path or not. Optional. 
References RixBXLobeSampled::GetReflect(), RixBXLobeSampled::GetSolidAngle(), RixBXLobeSampled::GetTransmit(), and RixIsFinite().
◆ direction
Radius of ray at its origin.
◆ flags
uint16_t RtRayGeometry::flags 
Internal hit id, zero means 'no hit.'.
◆ hitId
uint16_t RtRayGeometry::hitId 

mutable 
This value is updated on each presence hit, whenever a surface with presence is hit.
The presence value will be compared against this threshold to decide if it is a hit or a miss.
◆ ignoreGroupingId
uint16_t RtRayGeometry::ignoreGroupingId 
If nonzero: ignore geometry with the specified Attribute "grouping" "id".
◆ integratorCtxIndex
int16_t RtRayGeometry::integratorCtxIndex 
Shading context unique identifier.
◆ lobeSampled
See RayType for possible values.
◆ lpeState
Userprovided index in the ray bundle.
◆ maxDist
float RtRayGeometry::maxDist 
Minimum hit distance. Used only for primary rays.
◆ minDist
float RtRayGeometry::minDist 
How much the ray radius changes for each unit the ray travels.
Use as is to get tex/env filter radii. Multiply by 2 to get footprints and tex/env filter diameters. Values range between 0 and 1 (where 1 corresponds to an angle of 45 degrees).
◆ opacityThreshold
float RtRayGeometry::opacityThreshold 
◆ origin
◆ originRadius
float RtRayGeometry::originRadius 
◆ private0
uint32_t RtRayGeometry::private0[5] 
A pointer to the LPE state for this ray launch.
◆ rayId
uint16_t RtRayGeometry::rayId 
Index into the lauching shading context.
◆ raySpread
float RtRayGeometry::raySpread 
◆ raytype
uint16_t RtRayGeometry::raytype 
Shutternormalized time of ray launch.
◆ shadingCtxId
Characteristics of the BxDF lobe this ray samples.
◆ shadingCtxIndex
uint16_t RtRayGeometry::shadingCtxIndex 
Associated primary ray index.
◆ time
float RtRayGeometry::time 
◆ wavelength
uint16_t RtRayGeometry::wavelength 
The documentation for this struct was generated from the following file: