![]() |
Blue Brain BioExplorer
|
#include <OSPRayScene.h>
Public Member Functions | |
OSPRayScene (AnimationParameters &animationParameters, GeometryParameters &geometryParameters, VolumeParameters &volumeParameters, FieldParameters &fieldParameters) | |
~OSPRayScene () | |
void | commit () final |
Called after scene-related changes have been made before rendering the scene. More... | |
bool | commitLights () final |
Commits lights to renderers. More... | |
bool | supportsConcurrentSceneUpdates () const final |
ModelPtr | createModel () const final |
Factory method to create an engine-specific model. More... | |
OSPModel | getModel () |
OSPData | lightData () |
ModelDescriptorPtr | getSimulatedModel () |
![]() | |
PLATFORM_API | Scene (AnimationParameters &animationParameters, GeometryParameters &geometryParameters, VolumeParameters &volumeParameters, FieldParameters &fieldParameters) |
Creates a scene object responsible for handling models, simulations and light sources. More... | |
PLATFORM_API const Boxd & | getBounds () const |
Returns the bounding box of the scene. More... | |
PLATFORM_API LightManager & | getLightManager () |
Gets the light manager. More... | |
PLATFORM_API size_t | addModel (ModelDescriptorPtr model) |
Adds a model to the scene. More... | |
PLATFORM_API bool | removeModel (const size_t id) |
Removes a model from the scene. More... | |
PLATFORM_API const ModelDescriptors & | getModelDescriptors () const |
Get all model descriptors. More... | |
PLATFORM_API ModelDescriptorPtr | getModel (const size_t id) const |
Get a model descriptor given its ID. More... | |
PLATFORM_API void | buildDefault () |
Builds a default scene made of a Cornell box, a reflective cube, and a transparent sphere. More... | |
PLATFORM_API bool | empty () const |
Checks whether the scene is empty. More... | |
PLATFORM_API size_t | addClipPlane (const Plane &plane) |
Add a clip plane to the scene. More... | |
PLATFORM_API ClipPlanePtr | getClipPlane (const size_t id) const |
Get a clip plane by its ID. More... | |
PLATFORM_API void | removeClipPlane (const size_t id) |
Remove a clip plane by its ID, or no-op if not found. More... | |
PLATFORM_API const ClipPlanes & | getClipPlanes () const |
Get all clip planes in the scene. More... | |
PLATFORM_API size_t | getSizeInBytes () const |
Get the current size in bytes of the loaded geometry. More... | |
PLATFORM_API size_t | getNumModels () const |
Get the current number of models in the scene. More... | |
PLATFORM_API void | setMaterialsColorMap (MaterialsColorMap colorMap) |
Initializes materials for all models in the scene. More... | |
PLATFORM_API bool | setEnvironmentMap (const std::string &envMap) |
Set a new environment map as the background image. More... | |
PLATFORM_API const std::string & | getEnvironmentMap () const |
Get the current environment map texture file, or empty if no environment is set. More... | |
PLATFORM_API bool | hasEnvironmentMap () const |
Check if an environment map is currently set in the scene. More... | |
PLATFORM_API MaterialPtr | getBackgroundMaterial () const |
Get the background material. More... | |
PLATFORM_API ModelDescriptorPtr | loadModel (Blob &&blob, const ModelParams ¶ms, LoaderProgress cb) |
Load a model from the given blob. More... | |
PLATFORM_API ModelDescriptorPtr | loadModel (const std::string &path, const ModelParams ¶ms, LoaderProgress cb) |
Load a model from the given file. More... | |
PLATFORM_API void | visitModels (const std::function< void(Model &)> &functor) |
Apply the given functor to every model in the scene. More... | |
PLATFORM_API LoaderRegistry & | getLoaderRegistry () |
Get the registry for all supported loaders of this scene. More... | |
PLATFORM_API auto | acquireReadAccess () const |
PLATFORM_API void | copyFrom (const Scene &rhs) |
Copy the scene from another scene. More... | |
PLATFORM_API void | computeBounds () |
Compute the bounds of the geometry handled by the scene. More... | |
![]() | |
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 () |
Additional Inherited Members | |
![]() | |
using | ModifiedCallback = std::function< void(const BaseObject &)> |
![]() | |
void | _loadIBLMaps (const std::string &envMap) |
![]() | |
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) |
![]() | |
AnimationParameters & | _animationParameters |
GeometryParameters & | _geometryParameters |
VolumeParameters & | _volumeParameters |
FieldParameters & | _fieldParameters |
MaterialPtr | _backgroundMaterial {nullptr} |
std::string | _environmentMap |
size_t | _modelID {0} |
ModelDescriptors | _modelDescriptors |
std::shared_timed_mutex | _modelMutex |
LightManager | _lightManager |
ClipPlanes | _clipPlanes |
LoaderRegistry | _loaderRegistry |
Boxd | _bounds |
OSPRay specific scene
This object is the OSPRay specific implementation of a scene
Definition at line 43 of file OSPRayScene.h.
core::engine::ospray::OSPRayScene::OSPRayScene | ( | AnimationParameters & | animationParameters, |
GeometryParameters & | geometryParameters, | ||
VolumeParameters & | volumeParameters, | ||
FieldParameters & | fieldParameters | ||
) |
Definition at line 46 of file OSPRayScene.cpp.
core::engine::ospray::OSPRayScene::~OSPRayScene | ( | ) |
Definition at line 55 of file OSPRayScene.cpp.
|
finalvirtual |
Called after scene-related changes have been made before rendering the scene.
Reimplemented from core::Scene.
Definition at line 71 of file OSPRayScene.cpp.
|
finalvirtual |
Commits lights to renderers.
Implements core::Scene.
Definition at line 177 of file OSPRayScene.cpp.
|
finalvirtual |
Factory method to create an engine-specific model.
Implements core::Scene.
Definition at line 285 of file OSPRayScene.cpp.
|
inline |
Definition at line 60 of file OSPRayScene.h.
ModelDescriptorPtr core::engine::ospray::OSPRayScene::getSimulatedModel | ( | ) |
Definition at line 291 of file OSPRayScene.cpp.
|
inline |
Definition at line 61 of file OSPRayScene.h.
|
inlinefinalvirtual |
Reimplemented from core::Scene.
Definition at line 57 of file OSPRayScene.h.