Public Member Functions

SamplingCallback Class Reference

Search for all occurrences

Detailed Description

See also:
Class Sampler, Class ShadeContext, Class Color, Class Point2.

Description:
This class is available in release 3.0 and later only.

This is the callback object for the DoSamples() method of class Sampler. The SampleAtOffset() method is the one that actually computes the shading value for the Sampler.

#include <samplers.h>

Inheritance diagram for SamplingCallback:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual BOOL  SampleAtOffset (ShadeOutput *pOut, Point2 &sample, float sampleScale)=0

Member Function Documentation

virtual BOOL SampleAtOffset ( ShadeOutput pOut,
Point2 sample,
float  sampleScale 
) [pure virtual]
Remarks:
This is the method that integrates the sampler into the renderer. The plug-in Sampler calls this method to actually perform a sample at the specified 2D point. This method computes the output color and transparency.
Parameters:
ShadeOutput* pOut

The output of the sampling

Point2& sample

The 2D sample point.

float sampleScale

The scale of the sample. This parameter is the way a sampler tells the shader to use the whole pixel (sampleScale=1) size for texture samples or some fraction. This scale is an edge scale not an area scale, so if you want samples 1/4 pixel large the sampleScale should be 1/2.
Returns:
TRUE if the sample was processed; FALSE if the clipped sample was ignored.

SamplingCallback SamplingCallback SamplingCallback SamplingCallback SamplingCallback SamplingCallback SamplingCallback SamplingCallback SamplingCallback SamplingCallback
SamplingCallback SamplingCallback SamplingCallback SamplingCallback SamplingCallback SamplingCallback SamplingCallback SamplingCallback SamplingCallback SamplingCallback