Blue Brain BioExplorer
core::engine::optix::OptiXFrameBuffer Class Reference

#include <OptiXFrameBuffer.h>

Inheritance diagram for core::engine::optix::OptiXFrameBuffer:
Collaboration diagram for core::engine::optix::OptiXFrameBuffer:

Public Member Functions

 OptiXFrameBuffer (const std::string &name, const Vector2ui &size, FrameBufferFormat frameBufferFormat, const RenderingParameters &renderingParameters)
 
 ~OptiXFrameBuffer ()
 
void resize (const Vector2ui &size) 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...
 
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...
 
const float * getDepthBuffer () const
 
- Public Member Functions inherited from core::FrameBuffer
PLATFORM_API FrameBuffer (const std::string &name, const Vector2ui &frameSize, FrameBufferFormat frameBufferFormat)
 FrameBuffer constructor. More...
 
virtual PLATFORM_API void clear ()
 Clear the framebuffer. More...
 
virtual PLATFORM_API Vector2ui getSize () const
 Get the Size object. More...
 
virtual PLATFORM_API void setFormat (FrameBufferFormat frameBufferFormat)
 Set a new framebuffer format. More...
 
virtual PLATFORM_API void setSubsampling (const size_t)
 Set a new subsampling with a factor from 1 to x of the current size. More...
 
virtual PLATFORM_API void createPixelOp (const std::string &)
 Create and set a pixelop (pre/post filter) on the framebuffer. More...
 
virtual PLATFORM_API void updatePixelOp (const PropertyMap &)
 Update the current pixelop with the given properties. 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

OptiX specific frame buffer

This object is the OptiX specific implementation of a frame buffer

Definition at line 41 of file OptiXFrameBuffer.h.

Constructor & Destructor Documentation

◆ OptiXFrameBuffer()

core::engine::optix::OptiXFrameBuffer::OptiXFrameBuffer ( const std::string &  name,
const Vector2ui size,
FrameBufferFormat  frameBufferFormat,
const RenderingParameters renderingParameters 
)

Definition at line 39 of file OptiXFrameBuffer.cpp.

◆ ~OptiXFrameBuffer()

core::engine::optix::OptiXFrameBuffer::~OptiXFrameBuffer ( )

Definition at line 47 of file OptiXFrameBuffer.cpp.

Member Function Documentation

◆ getColorBuffer()

const uint8_t* core::engine::optix::OptiXFrameBuffer::getColorBuffer ( ) const
inlinefinalvirtual

Get the Color Buffer object.

Returns
const uint8_t* The color buffer.

Implements core::FrameBuffer.

Definition at line 54 of file OptiXFrameBuffer.h.

◆ getDepthBuffer()

const float* core::engine::optix::OptiXFrameBuffer::getDepthBuffer ( ) const
inline

Definition at line 56 of file OptiXFrameBuffer.h.

◆ getFloatBuffer()

const float* core::engine::optix::OptiXFrameBuffer::getFloatBuffer ( ) const
inlinefinalvirtual

Get the Float Buffer object.

Returns
const float* The depth buffer.

Implements core::FrameBuffer.

Definition at line 55 of file OptiXFrameBuffer.h.

◆ getScopeLock()

std::unique_lock<std::mutex> core::engine::optix::OptiXFrameBuffer::getScopeLock ( )
inline

Definition at line 53 of file OptiXFrameBuffer.h.

◆ map()

void core::engine::optix::OptiXFrameBuffer::map ( )
finalvirtual

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

Implements core::FrameBuffer.

Definition at line 118 of file OptiXFrameBuffer.cpp.

◆ resize()

void core::engine::optix::OptiXFrameBuffer::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 72 of file OptiXFrameBuffer.cpp.

◆ setAccumulation()

void core::engine::optix::OptiXFrameBuffer::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 196 of file OptiXFrameBuffer.cpp.

◆ unmap()

void core::engine::optix::OptiXFrameBuffer::unmap ( )
finalvirtual

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

Implements core::FrameBuffer.

Definition at line 154 of file OptiXFrameBuffer.cpp.


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