![]() |
Blue Brain BioExplorer
|
Renderer class inherits from PropertyObject class The Renderer class has methods to render a FrameBuffer, get variance, commit, and pick a point as well as virtual methods to set camera and render frames in specific engines. It also contains a protected ScenePtr _scene variable. More...
#include <Renderer.h>
Classes | |
struct | PickResult |
PickResult Struct containing hit boolean value and Vector3d pos PickResult struct is used to retrieve information about whether the pick ray hit anything and if so the vector position. More... | |
Public Member Functions | |
virtual void | render (FrameBufferPtr frameBuffer)=0 |
Virtual method to render a FrameBuffer This method is implemented in specific engine renderers to draw the FrameBuffer. More... | |
virtual float | getVariance () const |
Get variance from previous render() This method returns the variance from the previous render() call. More... | |
virtual void | commit ()=0 |
This virtual method is implemented in specific engine renderers to signal that rendering is complete. More... | |
virtual void | setCamera (CameraPtr camera)=0 |
Set camera for renderer This virtual method is implemented in specific engine renderers to set the camera for rendering. More... | |
virtual PickResult | pick (const Vector2f &) |
Pick method This method is used to pick a point on the scene and returns PickResult struct with hit boolean value and position. More... | |
PLATFORM_API | Renderer (const AnimationParameters &animationParameters, const RenderingParameters &renderingParameters) |
Constructs the Renderer object with animationParameters and renderingParameters. More... | |
void | setEngine (Engine *engine) |
Sets the _scene pointer to a specified ScenePtr. More... | |
PLATFORM_API bool | getHeadLight () const |
PLATFORM_API void | setHeadLight (const bool value) |
PLATFORM_API void | setMaxAccumFrames (const size_t value) |
PLATFORM_API size_t | getMaxAccumFrames () const |
PLATFORM_API uint32_t | getSamplesPerPixel () const |
PLATFORM_API void | setSamplesPerPixel (const uint32_t value) |
PLATFORM_API uint32_t | getSubsampling () const |
PLATFORM_API void | setSubsampling (const uint32_t subsampling) |
PLATFORM_API const Vector3d & | getBackgroundColor () const |
PLATFORM_API void | setBackgroundColor (const Vector3d &value) |
PLATFORM_API bool | getAccumulation () const |
![]() | |
void | setCurrentType (const std::string &type) |
const std::string & | getCurrentType () const |
template<typename T > | |
void | updateProperty (const std::string &name, const T &value, const bool triggerCallback=true) |
bool | hasProperty (const std::string &name) const |
template<typename T > | |
T | getProperty (const std::string &name) const |
template<typename T > | |
T | getPropertyOrValue (const std::string &name, T val) const |
void | setProperties (const PropertyMap &properties) |
void | setProperties (const std::string &type, const PropertyMap &properties) |
void | updateProperties (const PropertyMap &properties) |
const auto & | getPropertyMap () const |
const auto & | getPropertyMap (const std::string &type) const |
strings | getTypes () const |
void | clonePropertiesFrom (const PropertyObject &obj) |
![]() | |
BaseObject ()=default | |
virtual | ~BaseObject ()=default |
BaseObject (const BaseObject &) | |
BaseObject & | operator= (const BaseObject &rhs) |
bool | isModified () const |
void | resetModified () |
void | markModified (const bool triggerCallback=true) |
void | onModified (const ModifiedCallback &callback) |
void | clearModifiedCallback () |
Protected Attributes | |
const AnimationParameters & | _animationParameters |
const RenderingParameters & | _renderingParameters |
Engine * | _engine {nullptr} |
bool | _accumulation {true} |
bool | _headLight {true} |
Vector3d | _backgroundColor {0., 0., 0.} |
uint32_t | _spp {1} |
uint32_t | _subsampling {1} |
size_t | _maxAccumFrames {100} |
![]() | |
std::string | _currentType |
std::map< std::string, PropertyMap > | _properties |
Additional Inherited Members | |
![]() | |
using | ModifiedCallback = std::function< void(const 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) |
Renderer class inherits from PropertyObject class The Renderer class has methods to render a FrameBuffer, get variance, commit, and pick a point as well as virtual methods to set camera and render frames in specific engines. It also contains a protected ScenePtr _scene variable.
Definition at line 41 of file Renderer.h.
core::Renderer::Renderer | ( | const AnimationParameters & | animationParameters, |
const RenderingParameters & | renderingParameters | ||
) |
Constructs the Renderer object with animationParameters and renderingParameters.
animationParameters | const reference to AnimationParameters struct containing parameters for animation |
renderingParameters | const reference to RenderingParameters struct containing parameters for rendering |
Definition at line 30 of file Renderer.cpp.
|
pure virtual |
This virtual method is implemented in specific engine renderers to signal that rendering is complete.
Implemented in core::engine::ospray::OSPRayRenderer, and core::engine::optix::OptiXRenderer.
|
inline |
If the rendering should be refined by accumulating multiple passes
Definition at line 135 of file Renderer.h.
|
inline |
Background color
Definition at line 131 of file Renderer.h.
|
inline |
Light source follow camera origin
Definition at line 107 of file Renderer.h.
|
inline |
Definition at line 117 of file Renderer.h.
|
inline |
Number of samples per pixel
Definition at line 120 of file Renderer.h.
|
inline |
Sub-sampling
Definition at line 124 of file Renderer.h.
|
inlinevirtual |
Get variance from previous render() This method returns the variance from the previous render() call.
Reimplemented in core::engine::ospray::OSPRayRenderer.
Definition at line 68 of file Renderer.h.
|
inlinevirtual |
Pick method This method is used to pick a point on the scene and returns PickResult struct with hit boolean value and position.
pickPos | Vector2f with pick position coordinates |
Reimplemented in core::engine::ospray::OSPRayRenderer, and core::engine::optix::OptiXRenderer.
Definition at line 89 of file Renderer.h.
|
pure virtual |
Virtual method to render a FrameBuffer This method is implemented in specific engine renderers to draw the FrameBuffer.
frameBuffer | Ptr to FrameBuffer that will be drawn |
Implemented in core::engine::ospray::OSPRayRenderer, and core::engine::optix::OptiXRenderer.
|
inline |
Definition at line 132 of file Renderer.h.
|
pure virtual |
Set camera for renderer This virtual method is implemented in specific engine renderers to set the camera for rendering.
camera | CameraPtr of a camera object to set |
Implemented in core::engine::ospray::OSPRayRenderer, and core::engine::optix::OptiXRenderer.
|
inline |
Sets the _scene pointer to a specified ScenePtr.
scene | ScenePtr of the scene object to set |
Definition at line 102 of file Renderer.h.
|
inline |
Definition at line 108 of file Renderer.h.
|
inline |
The maximum number of accumulation frames before engine signals to stop continuation of rendering.
Definition at line 116 of file Renderer.h.
|
inline |
Definition at line 121 of file Renderer.h.
|
inline |
Definition at line 125 of file Renderer.h.
|
protected |
Definition at line 142 of file Renderer.h.
|
protected |
Definition at line 138 of file Renderer.h.
|
protected |
Definition at line 144 of file Renderer.h.
|
protected |
Definition at line 140 of file Renderer.h.
|
protected |
Definition at line 143 of file Renderer.h.
|
protected |
Definition at line 147 of file Renderer.h.
|
protected |
Definition at line 139 of file Renderer.h.
|
protected |
Definition at line 145 of file Renderer.h.
|
protected |
Definition at line 146 of file Renderer.h.