24 #include <boost/core/ignore_unused.hpp>
25 #include <sofa/helper/system/glut.h>
26 #include <sofa/component/init.h>
27 #include <sofa/core/ObjectFactory.h>
28 #include <sofa/core/visual/VisualParams.h>
29 #include <sofa/simulation/common/xml/initXml.h>
34 glutInit(&argc, NULL);
36 sofa::component::init();
37 sofa::simulation::xml::initXml();
39 sofa::core::visual::VisualParams::defaultInstance()->setSupported(sofa::core::visual::API_OpenGL);
44 using sofa::core::ObjectFactory;
45 using sofa::core::RegisterObject;
49 boost::ignore_unused(IndexROIClass, VtkModelClass);
51 ObjectFactory::AddAlias(
"VisualModel",
"VtkModel",
true);
52 ObjectFactory::AddAlias(
"OglModel",
"VtkModel",
true);
55 mitk::SimulationObjectFactory::SimulationObjectFactory()
61 mitk::SimulationObjectFactory::~SimulationObjectFactory()
69 if (dynamic_cast<Simulation*>(node->
GetData()) != NULL)
80 if (mapper.IsNotNull())
81 mapper->SetDataNode(node);
89 return "Simulation Object Factory";
117 if (dynamic_cast<Simulation*>(node->
GetData()) != NULL)
126 static bool alreadyRegistered =
false;
128 if (!alreadyRegistered)
131 alreadyRegistered =
true;
static void InitializeSofa()
std::multimap< std::string, std::string > MultimapType
static void SetDefaultProperties(DataNode *node, BaseRenderer *renderer=NULL, bool overwrite=false)
Mapper::Pointer CreateMapper(DataNode *node, MapperSlotId slotId) override
static Pointer GetInstance()
void SetDefaultProperties(DataNode *node) override
const char * GetDescription() const override
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
MultimapType GetSaveFileExtensionsMap() override
const char * GetFileExtensions() override
MultimapType GetFileExtensionsMap() override
const char * GetSaveFileExtensions() override
static void RegisterSofaClasses()
MITKSIMULATION_EXPORT void RegisterSimulationObjectFactory()
unsigned int MapperSlotId
std::multimap< std::string, std::string > MultimapType
static void SetDefaultProperties(DataNode *node, BaseRenderer *renderer=NULL, bool overwrite=false)
Class for nodes of the DataTree.