iMSTK
Interactive Medical Simulation Toolkit
imstkRenderDelegateObjectFactory.h
1 /*
2 ** This file is part of the Interactive Medical Simulation Toolkit (iMSTK)
3 ** iMSTK is distributed under the Apache License, Version 2.0.
4 ** See accompanying NOTICE for details.
5 */
6 
7 #pragma once
8 
9 #include "imstkFactory.h"
10 
11 #include <functional>
12 #include <memory>
13 #include <string>
14 #include <unordered_map>
15 
16 namespace imstk
17 {
18 class VisualModel;
19 class VTKRenderDelegate;
20 
44 class VTKRenderDelegate;
45 
46 class RenderDelegateObjectFactory : public ObjectFactory<std::shared_ptr<VTKRenderDelegate>>
47 {
48 public:
52  static std::shared_ptr<VTKRenderDelegate> makeRenderDelegate(std::shared_ptr<VisualModel> visualModel);
53 };
54 
57 template<typename T>
59 
60 #define IMSTK_REGISTER_RENDERDELEGATE(geomType, objType) RenderDelegateRegistrar<objType> _imstk_registerrenderdelegate ## geomType(#geomType);
61 } // namespace imstk
Generic Factory class that can take objects with constructor parameters.
Definition: imstkFactory.h:24
Compound Geometry.
static std::shared_ptr< VTKRenderDelegate > makeRenderDelegate(std::shared_ptr< VisualModel > visualModel)
attempt to create a delegate for the given visual model
Manages and generates the VTKRenderdelegates for all VisualModels.
Templated class that can add to the object factory with objects that will be generated via std::make_...
Definition: imstkFactory.h:87