Blender V5.0
blender::image_engine::AbstractSpaceAccessor Class Referenceabstract

#include <image_space.hh>

Inherited by blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.

Public Member Functions

virtual ~AbstractSpaceAccessor ()=default
virtual::Image * get_image (Main *bmain)=0
virtual ImageUserget_image_user ()=0
virtual ImBufacquire_image_buffer (::Image *image, void **lock)=0
virtual void release_buffer (::Image *image, ImBuf *image_buffer, void *lock)=0
virtual void get_shader_parameters (ShaderParameters &r_shader_parameters, ImBuf *image_buffer)=0
virtual bool use_tile_drawing () const =0
 Is (wrap) repeat option enabled in the space.
virtual void init_ss_to_texture_matrix (const ARegion *region, const float image_offset[2], const float image_resolution[2], float r_uv_to_texture[4][4]) const =0
 Initialize r_uv_to_texture matrix to transform from normalized screen space coordinates (0..1) to texture space UV coordinates.

Detailed Description

Space accessor.

Image engine is used to draw the images inside multiple spaces

See also
SpaceLink. The AbstractSpaceAccessor is an interface to communicate with a space.

Definition at line 27 of file image_space.hh.

Constructor & Destructor Documentation

◆ ~AbstractSpaceAccessor()

virtual blender::image_engine::AbstractSpaceAccessor::~AbstractSpaceAccessor ( )
virtualdefault

Member Function Documentation

◆ acquire_image_buffer()

virtual ImBuf * blender::image_engine::AbstractSpaceAccessor::acquire_image_buffer ( ::Image * image,
void ** lock )
pure virtual

Acquire the image buffer of the image.

Parameters
imageImage to get the buffer from. Image is the same as returned from the get_image member.
lockpointer to a lock object.
Returns
Image buffer of the given image.

Implemented in blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.

References lock.

◆ get_image()

virtual::Image * blender::image_engine::AbstractSpaceAccessor::get_image ( Main * bmain)
pure virtual

Return the active image of the space.

The returned image will be drawn in the space.

The return value is optional.

Implemented in blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.

◆ get_image_user()

virtual ImageUser * blender::image_engine::AbstractSpaceAccessor::get_image_user ( )
pure virtual

Return the ImageUser of the space.

The return value is optional.

Implemented in blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.

◆ get_shader_parameters()

virtual void blender::image_engine::AbstractSpaceAccessor::get_shader_parameters ( ShaderParameters & r_shader_parameters,
ImBuf * image_buffer )
pure virtual

Update the r_shader_parameters with space specific settings.

Only update the #ShaderParameters.flags and #ShaderParameters.shuffle. Other parameters are updated inside the image engine.

Implemented in blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.

Referenced by blender::image_engine::ShaderParameters::update().

◆ init_ss_to_texture_matrix()

virtual void blender::image_engine::AbstractSpaceAccessor::init_ss_to_texture_matrix ( const ARegion * region,
const float image_offset[2],
const float image_resolution[2],
float r_uv_to_texture[4][4] ) const
pure virtual

Initialize r_uv_to_texture matrix to transform from normalized screen space coordinates (0..1) to texture space UV coordinates.

Implemented in blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.

◆ release_buffer()

virtual void blender::image_engine::AbstractSpaceAccessor::release_buffer ( ::Image * image,
ImBuf * image_buffer,
void * lock )
pure virtual

Release a previous locked image from acquire_image_buffer.

Implemented in blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.

References lock.

◆ use_tile_drawing()

virtual bool blender::image_engine::AbstractSpaceAccessor::use_tile_drawing ( ) const
pure virtual

Is (wrap) repeat option enabled in the space.

Implemented in blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.


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