RenderMan API  23.0
RixProjectionContext Class Referenceabstract

#include <RixProjection.h>

Inheritance diagram for RixProjectionContext:
RixContext

Public Member Functions

virtual void TransformOrigins (RtUString const fromSpace, RtUString const toSpace)=0
 
virtual void TransformDirections (RtUString const fromSpace, RtUString const toSpace)=0
 
- Public Member Functions inherited from RixContext
virtual RixInterfaceGetRixInterface (RixInterfaceId id) const =0
 
virtual ~RixContext ()
 Destructor is for internal use only. More...
 

Public Attributes

int numRays
 
RtPoint2 const * screen
 
RtPoint2 const * lens
 
RtPoint2 const * aperture
 
float * time
 
RtRayGeometryrays
 
RtColorRGBtint
 

Protected Member Functions

 RixProjectionContext ()
 
virtual ~RixProjectionContext ()
 

Detailed Description

The RixProjectionContext bundles together the main inputs and outputs from the RixProjection::Project() method and provides a few convenient utility methods to help it do its work.

Definition at line 214 of file RixProjection.h.

Constructor & Destructor Documentation

◆ RixProjectionContext()

RixProjectionContext::RixProjectionContext ( )
inlineprotected

Definition at line 280 of file RixProjection.h.

◆ ~RixProjectionContext()

virtual RixProjectionContext::~RixProjectionContext ( )
inlineprotectedvirtual

Definition at line 281 of file RixProjection.h.

Member Function Documentation

◆ TransformDirections()

virtual void RixProjectionContext::TransformDirections ( RtUString const  fromSpace,
RtUString const  toSpace 
)
pure virtual

◆ TransformOrigins()

virtual void RixProjectionContext::TransformOrigins ( RtUString const  fromSpace,
RtUString const  toSpace 
)
pure virtual

Utility methods to transform the rays in-place from one space to another. Origins will be treated as points, and directions as vectors. The current ray time values (see shutter) will be respected for single segment motion blur.

DEPRECATED! If you need it, please use the world-to-camera transforms given via the the RixProjectionEnvironment instead.

Member Data Documentation

◆ aperture

RtPoint2 const* RixProjectionContext::aperture

Definition at line 235 of file RixProjection.h.

◆ lens

RtPoint2 const* RixProjectionContext::lens

The lens samples are the raw, canonical samples, uniformly distributed in the [0,1)^2 unit square. The aperture samples are the lens samples warped into the [-1,1]^2 square with a density distribution that produces the bokeh and anamorphic DoF specified by the "aperture" and "dofaspect" parameters from the RiHider line. These are for your convenience. You may ignore them if you wish.

Definition at line 234 of file RixProjection.h.

◆ numRays

int RixProjectionContext::numRays

Definition at line 217 of file RixProjection.h.

◆ rays

RtRayGeometry* RixProjectionContext::rays

Projection plugin will normally use the above data to override the origin, direction, originRadius, and raySpread fields of the rays (they are initially populated by the built-in projection). It may also be useful to override the mindist and maxdist for clipping effects. All of these are defined in terms of camera space with the camera centered at the origin and looking down the +Z axis.

NOTE: the directions should either be normalized or zero!!!

Definition at line 255 of file RixProjection.h.

◆ screen

RtPoint2 const* RixProjectionContext::screen

The screen samples represent samples in screen space with subpixel precision. For typical wide screen images, these will be in the [-aspect,aspect)x[-1,1) rectangle. The exact range depends on the combination of RiFormat, RiFrameAspectRatio, RiScreenWindow, and RiCropWindow settings.

Definition at line 225 of file RixProjection.h.

◆ time

float* RixProjectionContext::time

Time samples are the raw, canonical samples, distributed in the [0,1) range. The distribution density is computed according to the shaped "shutteropening" parameter on the RiCamera line. Time values are interpreted relative to shutter open at 0 and shutter close at 1. The projection may also alter the time values so long as they remain within [0,1).

Definition at line 244 of file RixProjection.h.

◆ tint

RtColorRGB* RixProjectionContext::tint

An optional tint to apply to the beauty channel of the shaded rays before pixel filtering. Defaults to white (1,1,1) to leave them unchanged. Plugins may change these to create vignetting, chromatic aberration, spectral bokeh, or other effects.

Definition at line 262 of file RixProjection.h.


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