RenderMan  26.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RixLight Class Referenceabstract

RixLight This base class defines the interface for light sources. More...

#include <RixLight.h>

Inherited by RixGeometricLight.

Classes

struct  EvaluateEmissionForCameraResults
 Generate the color for lights visible to the camera. More...
 
struct  EvaluateSamplesResults
 EvaluateSamples Given surface information, q, and ray hit information on this light source wo, distance, and the parametric coordinates u,v evaluate the bxdf associated with the light's contribution and return the pdfDirect value. More...
 
struct  GenerateEmissionResults
 Generate a sample on a light for photon emission. More...
 
struct  GenerateSamplesResults
 GenerateSamples() Generate samples, using data from the RixLightContext object: More...
 
struct  RixSamplePoint
 
struct  RixScatterPoint
 

Public Types

enum  Type { k_RixLocal, k_RixInfinite }
 
enum  LightProperty {
  k_LightGroupName, k_EnableShadows, k_ShadowColor, k_ShadowDistance,
  k_ShadowFalloff, k_ShadowFalloffGamma, k_ShadowSubset, k_ShadowExcludeSubset,
  k_TraceLightPaths, k_ThinShadow, k_VisibleInRefractionPath, k_FixedSampleCount,
  k_RixIES, k_Importance, k_LightNormal, k_ApproxFocus,
  k_LightName, k_numLightProperties
}
 

Public Member Functions

 RixLight (RixLightFactory const *lightFactory, Type type)
 
virtual ~RixLight ()
 
bool IsLocal () const
 
bool IsInfinite () const
 
virtual RixSCDetail GetProperty (LightProperty prop, void const **result) const =0
 
virtual void GetBounds (int &nPoints, RtPoint3 const *&points) const =0
 
virtual bool Intersect (bool isTransmissionRay, float const rayTime, RtPoint3 const &rayOrigin, RtVector3 const &rayDirection, float &hitDistance, float &u, float &v, float &w, RtPoint3 &hitP, RtNormal3 &hitNn) const =0
 
virtual float GetIncidentRadianceEstimate (RtPoint3 const &P, RtMatrix4x4 const &lightToCurrent, RtMatrix4x4 const &currentToLight) const =0
 GetIncidentRadianceEstimate Returns an estimate of the radiance this light will return for a shading point. More...
 
virtual float GetIncidentRadianceEstimate (RtPoint3 const &segmentOrigin, RtVector3 const &segmentDir, float segmentLen, RtMatrix4x4 const &lightToCurrent, RtMatrix4x4 const &currentToLight, RtFloat &minT, RtFloat &maxT) const =0
 GetIncidentRadiancEstimate Returns an estimate of the radiance this light will return for a segment, along with a min and max t that represent the subsection of the segment that intersects the light's frustum, if it has one. More...
 
virtual float GetPowerEstimate (RtMatrix4x4 const &xform) const =0
 GetPowerEstimate Returns an estimate of the power emitted by this light. More...
 
virtual void GenerateSamples (RixLightContext const &lCtx, RixScatterPoint const &scatter, GenerateSamplesResults &results) const =0
 
virtual void EvaluateSamples (RixLightContext const &lCtx, RixSamplePoint const &sample, RixScatterPoint const &scatter, EvaluateSamplesResults &results) const =0
 
virtual void GenerateEmission (RixLightContext const &lCtx, GenerateEmissionResults &results) const =0
 
virtual void EvaluateEmissionForCamera (RixLightContext const &lCtx, RixSamplePoint const &sample, RixScatterPoint const &scatter, EvaluateEmissionForCameraResults &results) const =0
 
virtual RixLightEdit (RixContext &ctx, RtUString const name, RixParameterList const *pList, void *instanceData)=0
 

Protected Attributes

RixLightFactory const * m_lightFactory
 

Detailed Description

RixLight This base class defines the interface for light sources.

Member Enumeration Documentation

Enumerator
k_LightGroupName 
k_EnableShadows 
k_ShadowColor 
k_ShadowDistance 
k_ShadowFalloff 
k_ShadowFalloffGamma 
k_ShadowSubset 
k_ShadowExcludeSubset 
k_TraceLightPaths 
k_ThinShadow 
k_VisibleInRefractionPath 
k_FixedSampleCount 
k_RixIES 
k_Importance 
k_LightNormal 
k_ApproxFocus 
k_LightName 
k_numLightProperties 
Enumerator
k_RixLocal 
k_RixInfinite 

Constructor & Destructor Documentation

RixLight::RixLight ( RixLightFactory const *  lightFactory,
Type  type 
)
inline
virtual RixLight::~RixLight ( )
inlinevirtual

Member Function Documentation

virtual RixLight* RixLight::Edit ( RixContext ctx,
RtUString const  name,
RixParameterList const *  pList,
void *  instanceData 
)
pure virtual
virtual void RixLight::EvaluateEmissionForCamera ( RixLightContext const &  lCtx,
RixSamplePoint const &  sample,
RixScatterPoint const &  scatter,
EvaluateEmissionForCameraResults results 
) const
pure virtual
virtual void RixLight::EvaluateSamples ( RixLightContext const &  lCtx,
RixSamplePoint const &  sample,
RixScatterPoint const &  scatter,
EvaluateSamplesResults results 
) const
pure virtual
virtual void RixLight::GenerateEmission ( RixLightContext const &  lCtx,
GenerateEmissionResults results 
) const
pure virtual
virtual void RixLight::GenerateSamples ( RixLightContext const &  lCtx,
RixScatterPoint const &  scatter,
GenerateSamplesResults results 
) const
pure virtual
virtual void RixLight::GetBounds ( int &  nPoints,
RtPoint3 const *&  points 
) const
pure virtual
virtual float RixLight::GetIncidentRadianceEstimate ( RtPoint3 const &  P,
RtMatrix4x4 const &  lightToCurrent,
RtMatrix4x4 const &  currentToLight 
) const
pure virtual

GetIncidentRadianceEstimate Returns an estimate of the radiance this light will return for a shading point.

This is used by localisation schemes to optionally adjust the importance associated with the light source relative to other light sources. As such, it should be an estimate that is very quick to compute.

virtual float RixLight::GetIncidentRadianceEstimate ( RtPoint3 const &  segmentOrigin,
RtVector3 const &  segmentDir,
float  segmentLen,
RtMatrix4x4 const &  lightToCurrent,
RtMatrix4x4 const &  currentToLight,
RtFloat &  minT,
RtFloat &  maxT 
) const
pure virtual

GetIncidentRadiancEstimate Returns an estimate of the radiance this light will return for a segment, along with a min and max t that represent the subsection of the segment that intersects the light's frustum, if it has one.

Dir and segmentLen are normalized direction and segment length This case is used during volume integration.

virtual float RixLight::GetPowerEstimate ( RtMatrix4x4 const &  xform) const
pure virtual

GetPowerEstimate Returns an estimate of the power emitted by this light.

This is used by localisation schemes to optionally adjust the importance associated with the light source relative to other light sources. As such, it should be an estimate that is very quick to compute.

virtual RixSCDetail RixLight::GetProperty ( LightProperty  prop,
void const **  result 
) const
pure virtual
virtual bool RixLight::Intersect ( bool  isTransmissionRay,
float const  rayTime,
RtPoint3 const &  rayOrigin,
RtVector3 const &  rayDirection,
float &  hitDistance,
float &  u,
float &  v,
float &  w,
RtPoint3 &  hitP,
RtNormal3 &  hitNn 
) const
pure virtual
bool RixLight::IsInfinite ( ) const
inline

References k_RixInfinite.

bool RixLight::IsLocal ( ) const
inline

References k_RixLocal.

Member Data Documentation

RixLightFactory const* RixLight::m_lightFactory
protected

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