ImageRegionTilesObserverInterface Class Reference

#include <imageregionobserver_helpers.h>

Inheritance diagram for ImageRegionTilesObserverInterface:

Detailed Description

This interface extends the notifiers about regional image changes with accessors to the tile-based tracking data structure.

Classes

struct  DirtyState
 

Public Member Functions

MAXON_METHOD Result< void > Init (Int tileSize)
 
MAXON_METHOD Result< void > GetAndResetDirtyState (DirtyState &dirtyState)
 

Private Member Functions

 MAXON_INTERFACE (ImageRegionTilesObserverInterface, MAXON_REFERENCE_NORMAL, "net.maxon.nodes.interface.imageregionobserver.tiles", MAXON_IMPLEMENTATION_MODULE("net.maxon.image"))
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( ImageRegionTilesObserverInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.nodes.interface.imageregionobserver.tiles"  ,
MAXON_IMPLEMENTATION_MODULE("net.maxon.image")   
)
private

◆ Init()

MAXON_METHOD Result<void> Init ( Int  tileSize)

Initializes the tile-based change tracking data structure. Each tile contains an AABB. The number of tiles is determined as numTiles = ceil(imageWidth / tileSize) * ceil(imageHeight / tileSize). We recommend reasonable power-of-two values such as 64, 128, 256, 512 or 1024.

Parameters
[in]tileSizeThe size of a tile in pixels.
Returns
OK on success.

◆ GetAndResetDirtyState()

MAXON_METHOD Result<void> GetAndResetDirtyState ( DirtyState dirtyState)

Returns and resets the accumulated region changes in form of a set of non-overlapping tiles.

Parameters
[out]dirtyStateThe state to overwrite.
Returns
OK on success.