NDEVR
API Documentation
MaterialRasterBaseabstract

Base class for painting pixels at a time into a 2D texture. More...

Inheritance diagram for MaterialRasterBase:
[legend]
Collaboration diagram for MaterialRasterBase:
[legend]

Public Member Functions

 MaterialRasterBase (const RasterInfo &raster_info)
 Constructs the base raster with the given raster configuration.
virtual void addImageBuffer (const Buffer< uint01 > &pixels, const Vector< 2, uint04 > &size, const Matrix< fltp08 > &camera_matrix)=0
 Adds an entire image buffer to the raster, mapping pixels through a camera matrix.
virtual void addPixelInfo (const RGBColor &pixel, const Vector< 2, fltp08 > &location, uint04 weight)=0
 Adds a single pixel color at a normalized floating-point location with a weight.
virtual void addPixelInfo (const RGBColor &pixel, const Vector< 2, uint04 > &location, uint08 weight)=0
 Adds a single pixel color at an integer pixel location with a weight.
virtual void addPixelInfo (const Vector< 4, fltp04 > &pixel, const Vector< 2, fltp08 > &location, uint08 weight)=0
 Adds a single pixel as a normalized float RGBA vector at a normalized location with a weight.
virtual void addPixelInfo (const Vector< 4, fltp04 > &pixel, const Vector< 2, uint04 > &location, uint08 weight)=0
 Adds a single pixel as a normalized float RGBA vector at an integer pixel location with a weight.
virtual StringView imageID () const =0
 Returns the identifier string of the underlying image resource.
virtual void updateImage ()=0
 Commits accumulated pixel data to the underlying image.

Protected Attributes

RasterInfo m_raster_info
 The raster configuration settings.

Detailed Description

Base class for painting pixels at a time into a 2D texture.


Definition at line 55 of file MaterialRaster.h.

Constructor & Destructor Documentation

◆ MaterialRasterBase()

MaterialRasterBase::MaterialRasterBase ( const RasterInfo & raster_info)
inline

Constructs the base raster with the given raster configuration.

Parameters
[in]raster_infoThe raster configuration to use.

Definition at line 61 of file MaterialRaster.h.

References m_raster_info.

Referenced by MaterialRaster::MaterialRaster().

Member Function Documentation

◆ addImageBuffer()

virtual void MaterialRasterBase::addImageBuffer ( const Buffer< uint01 > & pixels,
const Vector< 2, uint04 > & size,
const Matrix< fltp08 > & camera_matrix )
pure virtual

Adds an entire image buffer to the raster, mapping pixels through a camera matrix.

Parameters
[in]pixelsRaw pixel data buffer (RGBA, 4 bytes per pixel).
[in]sizeWidth and height of the source image in pixels.
[in]camera_matrixThe camera projection/view matrix used to map source pixels onto the raster.

Implemented in MaterialRaster, and OpenCVImageRaster.

◆ addPixelInfo() [1/4]

virtual void MaterialRasterBase::addPixelInfo ( const RGBColor & pixel,
const Vector< 2, fltp08 > & location,
uint04 weight )
pure virtual

Adds a single pixel color at a normalized floating-point location with a weight.

Parameters
[in]pixelThe color to add.
[in]locationThe normalized [0,1] location on the raster texture.
[in]weightThe contribution weight for this pixel (used in averaging).

Implemented in MaterialRaster.

◆ addPixelInfo() [2/4]

virtual void MaterialRasterBase::addPixelInfo ( const RGBColor & pixel,
const Vector< 2, uint04 > & location,
uint08 weight )
pure virtual

Adds a single pixel color at an integer pixel location with a weight.

Parameters
[in]pixelThe color to add.
[in]locationThe pixel coordinate on the raster texture.
[in]weightThe contribution weight for this pixel (used in averaging).

Implemented in MaterialRaster.

◆ addPixelInfo() [3/4]

virtual void MaterialRasterBase::addPixelInfo ( const Vector< 4, fltp04 > & pixel,
const Vector< 2, fltp08 > & location,
uint08 weight )
pure virtual

Adds a single pixel as a normalized float RGBA vector at a normalized location with a weight.

Parameters
[in]pixelThe RGBA color as floats in [0,1] range.
[in]locationThe normalized [0,1] location on the raster texture.
[in]weightThe contribution weight for this pixel (used in averaging).

Implemented in MaterialRaster.

◆ addPixelInfo() [4/4]

virtual void MaterialRasterBase::addPixelInfo ( const Vector< 4, fltp04 > & pixel,
const Vector< 2, uint04 > & location,
uint08 weight )
pure virtual

Adds a single pixel as a normalized float RGBA vector at an integer pixel location with a weight.

Parameters
[in]pixelThe RGBA color as floats in [0,1] range.
[in]locationThe pixel coordinate on the raster texture.
[in]weightThe contribution weight for this pixel. If set to max uint08, the pixel overwrites rather than accumulates.

Implemented in MaterialRaster.

◆ imageID()

virtual StringView MaterialRasterBase::imageID ( ) const
pure virtual

Returns the identifier string of the underlying image resource.

Returns
A StringView containing the image ID.

Implemented in MaterialRaster, and OpenCVImageRaster.

◆ updateImage()

virtual void MaterialRasterBase::updateImage ( )
pure virtual

Commits accumulated pixel data to the underlying image.

Must be called after adding pixel info to apply changes.

Implemented in MaterialRaster, and OpenCVImageRaster.


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