3ds Max C++ API Reference
IFrameBufferProcessor::IFrameBufferReader Class Referenceabstract

Generic interface for reading frame buffer data. More...

#include <IFrameBufferProcessor.h>

Public Member Functions

virtual bool GetPixelLine (const unsigned int y, const unsigned int x_start, const unsigned int num_pixels, BMM_Color_fl *const target_pixels)=0
 Reads a subset of a single line of the frame buffer. More...
 
virtual IPoint2 GetResolution () const =0
 Returns the resolution of the frame buffer being abstracted by this class. More...
 
virtual Box2 GetRegion () const =0
 Returns the region, within the frame buffer, which can be read. More...
 

Protected Member Functions

virtual ~IFrameBufferReader ()
 Protected destructor prevents deletion through this interface. More...
 

Detailed Description

Generic interface for reading frame buffer data.

This is the interface, used by IFrameBufferProcessor, for extracting the frame buffer data from the renderer's internal representation.

Constructor & Destructor Documentation

◆ ~IFrameBufferReader()

virtual ~IFrameBufferReader ( )
inlineprotectedvirtual

Protected destructor prevents deletion through this interface.

90 {}

Member Function Documentation

◆ GetPixelLine()

virtual bool GetPixelLine ( const unsigned int  y,
const unsigned int  x_start,
const unsigned int  num_pixels,
BMM_Color_fl *const  target_pixels 
)
pure virtual

Reads a subset of a single line of the frame buffer.

Parameters
yThe index of the frame buffer line to be read.
x_startThe first pixel to be read, within the line.
num_pixelsThe number of pixels to be read, guaranteed to be within the bounds of the line.
target_pixelsThe buffer into which the pixels are to be written, allocated to store num_pixels pixels.
Remarks
Pixels are to be written to target_pixels starting at index 0, without any offset. x_start is not to be used as an offset in the target buffer.
Returns
True on success, false on failure to read to frame buffer for any reason.

◆ GetResolution()

virtual IPoint2 GetResolution ( ) const
pure virtual

Returns the resolution of the frame buffer being abstracted by this class.

This resolution bounds the range of valid pixel indices that may be accessed with GetPixelLine().

Remarks
Internally, the caller is responsible for supporting arbitrary resolutions - and thus to resize the frame buffer if necessary.

◆ GetRegion()

virtual Box2 GetRegion ( ) const
pure virtual

Returns the region, within the frame buffer, which can be read.

This is the region which has been rendered, which contains meaningful value. The caller should limit its frame buffer access to the pixel indices within the region returned here.