Blue Brain BioExplorer
core::ModelParams Class Reference

The ModelParams class represents the parameters needed for initializing a model instance. More...

#include <Model.h>

Inheritance diagram for core::ModelParams:
Collaboration diagram for core::ModelParams:

Public Member Functions

PLATFORM_API ModelParams ()=default
 
PLATFORM_API ModelParams (const std::string &path)
 Constructor to create ModelParams object from a given path. More...
 
PLATFORM_API ModelParams (const std::string &name, const std::string &path)
 Constructor to create ModelParams object with a given name and path. More...
 
PLATFORM_API ModelParams (const std::string &name, const std::string &path, const PropertyMap &loaderProperties)
 Constructor to create ModelParams object with a given name, path and loader properties. More...
 
PLATFORM_API ModelParams (ModelParams &&rhs)=default
 
PLATFORM_API ModelParamsoperator= (ModelParams &&rhs)=default
 
PLATFORM_API ModelParams (const ModelParams &rhs)=default
 
PLATFORM_API ModelParamsoperator= (const ModelParams &rhs)=default
 
PLATFORM_API void setName (const std::string &name)
 setName sets the name of the model More...
 
PLATFORM_API const std::string & getName () const
 getName gets the name of the model More...
 
PLATFORM_API void setPath (const std::string &path)
 setPath sets the path of the model More...
 
PLATFORM_API const std::string & getPath () const
 getPath gets the path of the model More...
 
PLATFORM_API void setLoaderName (const std::string &loaderName)
 setLoaderName sets the loader name of the model More...
 
PLATFORM_API const std::string & getLoaderName () const
 getLoaderName gets the loader name of the model More...
 
PLATFORM_API const PropertyMapgetLoaderProperties () const
 getLoaderProperties gets the loader properties of the model More...
 
PLATFORM_API void setLoaderProperties (const PropertyMap &pm)
 setLoaderProperties sets the loader properties of the model More...
 
- Public Member Functions inherited from core::ModelInstance
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 TransformationgetTransformation () 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...
 
- 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 ()
 

Protected Attributes

std::string _name
 
std::string _path
 
std::string _loaderName
 
PropertyMap _loaderProperties
 
- Protected Attributes inherited from core::ModelInstance
size_t _modelID {0}
 
size_t _instanceID {0}
 
bool _visible {true}
 
bool _boundingBox {false}
 
Transformation _transformation
 

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)
 

Detailed Description

The ModelParams class represents the parameters needed for initializing a model instance.

Definition at line 177 of file Model.h.

Constructor & Destructor Documentation

◆ ModelParams() [1/6]

PLATFORM_API core::ModelParams::ModelParams ( )
default

◆ ModelParams() [2/6]

core::ModelParams::ModelParams ( const std::string &  path)

Constructor to create ModelParams object from a given path.

Parameters
pathpath of the model

Definition at line 59 of file Model.cpp.

◆ ModelParams() [3/6]

core::ModelParams::ModelParams ( const std::string &  name,
const std::string &  path 
)

Constructor to create ModelParams object with a given name and path.

Parameters
namename of the model
pathpath of the model

Definition at line 65 of file Model.cpp.

◆ ModelParams() [4/6]

core::ModelParams::ModelParams ( const std::string &  name,
const std::string &  path,
const PropertyMap loaderProperties 
)

Constructor to create ModelParams object with a given name, path and loader properties.

Parameters
namename of the model
pathpath of the model
loaderPropertiesloader properties of the model

Definition at line 71 of file Model.cpp.

◆ ModelParams() [5/6]

PLATFORM_API core::ModelParams::ModelParams ( ModelParams &&  rhs)
default

Move constructor

◆ ModelParams() [6/6]

PLATFORM_API core::ModelParams::ModelParams ( const ModelParams rhs)
default

Copy constructor

Member Function Documentation

◆ getLoaderName()

PLATFORM_API const std::string& core::ModelParams::getLoaderName ( ) const
inline

getLoaderName gets the loader name of the model

Returns
loader name of the model

Definition at line 250 of file Model.h.

◆ getLoaderProperties()

PLATFORM_API const PropertyMap& core::ModelParams::getLoaderProperties ( ) const
inline

getLoaderProperties gets the loader properties of the model

Returns
loader properties of the model

Definition at line 256 of file Model.h.

◆ getName()

PLATFORM_API const std::string& core::ModelParams::getName ( ) const
inline

getName gets the name of the model

Returns
name of the model

Definition at line 226 of file Model.h.

◆ getPath()

PLATFORM_API const std::string& core::ModelParams::getPath ( ) const
inline

getPath gets the path of the model

Returns
path of the model

Definition at line 238 of file Model.h.

◆ operator=() [1/2]

PLATFORM_API ModelParams& core::ModelParams::operator= ( const ModelParams rhs)
default

Copy assignment operator

◆ operator=() [2/2]

PLATFORM_API ModelParams& core::ModelParams::operator= ( ModelParams &&  rhs)
default

Move assignment operator

◆ setLoaderName()

PLATFORM_API void core::ModelParams::setLoaderName ( const std::string &  loaderName)
inline

setLoaderName sets the loader name of the model

Parameters
loaderNameloader name of the model

Definition at line 244 of file Model.h.

◆ setLoaderProperties()

PLATFORM_API void core::ModelParams::setLoaderProperties ( const PropertyMap pm)
inline

setLoaderProperties sets the loader properties of the model

Parameters
pmloader properties of the model

Definition at line 262 of file Model.h.

◆ setName()

PLATFORM_API void core::ModelParams::setName ( const std::string &  name)
inline

setName sets the name of the model

Parameters
namename of the model

Definition at line 220 of file Model.h.

◆ setPath()

PLATFORM_API void core::ModelParams::setPath ( const std::string &  path)
inline

setPath sets the path of the model

Parameters
pathpath of the model

Definition at line 232 of file Model.h.

Member Data Documentation

◆ _loaderName

std::string core::ModelParams::_loaderName
protected

Definition at line 267 of file Model.h.

◆ _loaderProperties

PropertyMap core::ModelParams::_loaderProperties
protected

Definition at line 268 of file Model.h.

◆ _name

std::string core::ModelParams::_name
protected

Definition at line 265 of file Model.h.

◆ _path

std::string core::ModelParams::_path
protected

Definition at line 266 of file Model.h.


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