![]() |
Blue Brain BioExplorer
|
A class representing an instance of a 3D model. More...
#include <Model.h>
Public Member Functions | |
PLATFORM_API | ModelInstance ()=default |
Default constructor. More... | |
PLATFORM_API | ModelInstance (const bool visible, const bool boundingBox, const Transformation &transformation) |
Constructor with parameters. More... | |
PLATFORM_API bool | getVisible () const |
Get the value of _visible. More... | |
PLATFORM_API void | setVisible (const bool visible) |
Set the value of _visible. More... | |
PLATFORM_API bool | getBoundingBox () const |
Get the value of _boundingBox. More... | |
PLATFORM_API void | setBoundingBox (const bool enabled) |
Set the value of _boundingBox. More... | |
PLATFORM_API const Transformation & | getTransformation () const |
Get the value of _transformation. More... | |
PLATFORM_API void | setTransformation (const Transformation &transformation) |
Set the value of _transformation. More... | |
PLATFORM_API void | setModelID (const size_t id) |
Set the value of _modelID. More... | |
PLATFORM_API size_t | getModelID () const |
Get the value of _modelID. More... | |
PLATFORM_API void | setInstanceID (const size_t id) |
Set the value of _instanceID. More... | |
PLATFORM_API size_t | getInstanceID () const |
Get the value of _instanceID. 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 () |
Protected Attributes | |
size_t | _modelID {0} |
size_t | _instanceID {0} |
bool | _visible {true} |
bool | _boundingBox {false} |
Transformation | _transformation |
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) |
|
default |
Default constructor.
|
inline |
Constructor with parameters.
visible | A boolean indicating if the model instance is visible |
boundingBox | A boolean indicating if the model instance has a bounding box |
transformation | A Transformation object representing the model's transformation |
|
inline |
|
inline |
|
inline |
|
inline |
Get the value of _transformation.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Set the value of _transformation.
transformation | A Transformation object representing the model's transformation |
|
inline |
|
protected |