Blue Brain BioExplorer
core::engine::ospray::OSPRayFrameBuffer Class Reference

#include <OSPRayFrameBuffer.h>

Inheritance diagram for core::engine::ospray::OSPRayFrameBuffer:
Collaboration diagram for core::engine::ospray::OSPRayFrameBuffer:

Public Member Functions

 OSPRayFrameBuffer (const std::string &name, const Vector2ui &frameSize, const FrameBufferFormat frameBufferFormat)
 
 ~OSPRayFrameBuffer ()
 
void clear () final
 Clear the framebuffer. More...
 
void resize (const Vector2ui &frameSize) final
 Resize the framebuffer to the new size. More...
 
void map () final
 Map the buffer for reading with get*Buffer(). More...
 
void unmap () final
 Unmap the buffer for reading with get*Buffer(). More...
 
void setAccumulation (const bool accumulation) final
 Enable/disable accumulation state on the framebuffer. More...
 
void setFormat (FrameBufferFormat frameBufferFormat) final
 Set a new framebuffer format. More...
 
void setSubsampling (const size_t) final
 Set a new subsampling with a factor from 1 to x of the current size. More...
 
Vector2ui getSize () const final
 Get the Size object. More...
 
std::unique_lock< std::mutex > getScopeLock ()
 
const uint8_t * getColorBuffer () const final
 Get the Color Buffer object. More...
 
const float * getFloatBuffer () const final
 Get the Float Buffer object. More...
 
OSPFrameBuffer impl ()
 
void createPixelOp (const std::string &name) final
 Create and set a pixelop (pre/post filter) on the framebuffer. More...
 
void updatePixelOp (const PropertyMap &properties) final
 Update the current pixelop with the given properties. More...
 
- Public Member Functions inherited from core::FrameBuffer
PLATFORM_API FrameBuffer (const std::string &name, const Vector2ui &frameSize, FrameBufferFormat frameBufferFormat)
 FrameBuffer constructor. More...
 
PLATFORM_API size_t getColorDepth () const
 Get the Color Depth object. More...
 
PLATFORM_API const Vector2uigetFrameSize () const
 Get the Frame Size object. More...
 
PLATFORM_API bool getAccumulation () const
 Get the Accumulation object. More...
 
PLATFORM_API FrameBufferFormat getFrameBufferFormat () const
 Get the Frame Buffer Format object. More...
 
PLATFORM_API const std::string & getName () const
 Get the Name object. More...
 
PLATFORM_API void incrementAccumFrames ()
 Increment the accumulation frames. More...
 
PLATFORM_API size_t numAccumFrames () const
 Get the number of accumulation frames. More...
 
PLATFORM_API freeimage::ImagePtr getImage ()
 Get the Image object. More...
 
PLATFORM_API void setAccumulationType (const AccumulationType accumulationType)
 Set the Accumulation Type object. More...
 
PLATFORM_API AccumulationType getAccumulationType () const
 Get the Accumulation Type object. More...
 
- Public Member Functions inherited from core::BaseObject
 BaseObject ()=default
 
virtual ~BaseObject ()=default
 
 BaseObject (const BaseObject &)
 
BaseObjectoperator= (const BaseObject &rhs)
 
bool isModified () const
 
void resetModified ()
 
void markModified (const bool triggerCallback=true)
 
void onModified (const ModifiedCallback &callback)
 
void clearModifiedCallback ()
 

Additional Inherited Members

- Public Types inherited from core::BaseObject
using ModifiedCallback = std::function< void(const BaseObject &)>
 
- Protected Member Functions inherited from core::BaseObject
template<typename T >
void _updateValue (T &member, const T &newValue, const bool triggerCallback=true)
 
template<class T >
bool _isEqual (const T &a, const T &b, typename std::enable_if< std::is_floating_point< T >::value >::type *=0)
 
template<class T >
bool _isEqual (const T &a, const T &b, typename std::enable_if<!std::is_floating_point< T >::value >::type *=0)
 
- Protected Attributes inherited from core::FrameBuffer
const std::string _name
 
Vector2ui _frameSize
 
FrameBufferFormat _frameBufferFormat
 
bool _accumulation {true}
 
AccumulationType _accumulationType {AccumulationType::linear}
 
std::atomic_size_t _accumFrames {0}
 

Detailed Description

Definition at line 36 of file OSPRayFrameBuffer.h.

Constructor & Destructor Documentation

◆ OSPRayFrameBuffer()

core::engine::ospray::OSPRayFrameBuffer::OSPRayFrameBuffer ( const std::string &  name,
const Vector2ui frameSize,
const FrameBufferFormat  frameBufferFormat 
)

Definition at line 52 of file OSPRayFrameBuffer.cpp.

◆ ~OSPRayFrameBuffer()

core::engine::ospray::OSPRayFrameBuffer::~OSPRayFrameBuffer ( )

Definition at line 59 of file OSPRayFrameBuffer.cpp.

Member Function Documentation

◆ clear()

void core::engine::ospray::OSPRayFrameBuffer::clear ( )
finalvirtual

Clear the framebuffer.

Reimplemented from core::FrameBuffer.

Definition at line 122 of file OSPRayFrameBuffer.cpp.

◆ createPixelOp()

void core::engine::ospray::OSPRayFrameBuffer::createPixelOp ( const std::string &  )
finalvirtual

Create and set a pixelop (pre/post filter) on the framebuffer.

Parameters
nameThe name of the pixelOp.

Reimplemented from core::FrameBuffer.

Definition at line 217 of file OSPRayFrameBuffer.cpp.

◆ getColorBuffer()

const uint8_t* core::engine::ospray::OSPRayFrameBuffer::getColorBuffer ( ) const
inlinefinalvirtual

Get the Color Buffer object.

Returns
const uint8_t* The color buffer.

Implements core::FrameBuffer.

Definition at line 51 of file OSPRayFrameBuffer.h.

◆ getFloatBuffer()

const float* core::engine::ospray::OSPRayFrameBuffer::getFloatBuffer ( ) const
inlinefinalvirtual

Get the Float Buffer object.

Returns
const float* The depth buffer.

Implements core::FrameBuffer.

Definition at line 52 of file OSPRayFrameBuffer.h.

◆ getScopeLock()

std::unique_lock<std::mutex> core::engine::ospray::OSPRayFrameBuffer::getScopeLock ( )
inline

Definition at line 50 of file OSPRayFrameBuffer.h.

◆ getSize()

Vector2ui core::engine::ospray::OSPRayFrameBuffer::getSize ( ) const
inlinefinalvirtual

Get the Size object.

Returns
Vector2ui The current framebuffer size.

Reimplemented from core::FrameBuffer.

Definition at line 49 of file OSPRayFrameBuffer.h.

◆ impl()

OSPFrameBuffer core::engine::ospray::OSPRayFrameBuffer::impl ( )
inline

Definition at line 53 of file OSPRayFrameBuffer.h.

◆ map()

void core::engine::ospray::OSPRayFrameBuffer::map ( )
finalvirtual

Map the buffer for reading with get*Buffer().

Implements core::FrameBuffer.

Definition at line 133 of file OSPRayFrameBuffer.cpp.

◆ resize()

void core::engine::ospray::OSPRayFrameBuffer::resize ( const Vector2ui frameSize)
finalvirtual

Resize the framebuffer to the new size.

Parameters
frameSizeThe frame buffer size to be set.

Implements core::FrameBuffer.

Definition at line 69 of file OSPRayFrameBuffer.cpp.

◆ setAccumulation()

void core::engine::ospray::OSPRayFrameBuffer::setAccumulation ( const bool  accumulation)
finalvirtual

Enable/disable accumulation state on the framebuffer.

Parameters
accumulationThe accumulation state to be set.

Reimplemented from core::FrameBuffer.

Definition at line 187 of file OSPRayFrameBuffer.cpp.

◆ setFormat()

void core::engine::ospray::OSPRayFrameBuffer::setFormat ( FrameBufferFormat  frameBufferFormat)
finalvirtual

Set a new framebuffer format.

Parameters
frameBufferFormatThe new frame buffer format to be set.

Reimplemented from core::FrameBuffer.

Definition at line 196 of file OSPRayFrameBuffer.cpp.

◆ setSubsampling()

void core::engine::ospray::OSPRayFrameBuffer::setSubsampling ( const  size_t)
finalvirtual

Set a new subsampling with a factor from 1 to x of the current size.

Parameters
size_tThe size to be set.

Reimplemented from core::FrameBuffer.

Definition at line 205 of file OSPRayFrameBuffer.cpp.

◆ unmap()

void core::engine::ospray::OSPRayFrameBuffer::unmap ( )
finalvirtual

Unmap the buffer for reading with get*Buffer().

Implements core::FrameBuffer.

Definition at line 148 of file OSPRayFrameBuffer.cpp.

◆ updatePixelOp()

void core::engine::ospray::OSPRayFrameBuffer::updatePixelOp ( const PropertyMap )
finalvirtual

Update the current pixelop with the given properties.

Parameters
propertiesThe properties to be updated.

Reimplemented from core::FrameBuffer.

Definition at line 231 of file OSPRayFrameBuffer.cpp.


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