9 #include "imstkEntity.h" 10 #include "imstkMacros.h" 30 SceneObject(
const std::string& name =
"SceneObject");
44 void setVisualGeometry(std::shared_ptr<Geometry> geometry);
49 std::shared_ptr<VisualModel>
getVisualModel(
const int index)
const;
50 void addVisualModel(std::shared_ptr<VisualModel> visualModel);
51 void removeVisualModel(std::shared_ptr<VisualModel> visualModel);
56 std::shared_ptr<TaskNode>
getUpdateNode()
const {
return m_updateNode; }
91 virtual void reset() { }
97 virtual void initGraphEdges(std::shared_ptr<TaskNode> source, std::shared_ptr<TaskNode> sink);
108 std::shared_ptr<TaskNode> m_updateNode =
nullptr;
109 std::shared_ptr<TaskNode> m_updateGeometryNode =
nullptr;
virtual void visualUpdate()
Update the visuals, called before render.
std::shared_ptr< Geometry > getVisualGeometry() const
Sets the visual geometry, adds (sets the first) VisualModel.
std::shared_ptr< TaskNode > getUpdateNode() const
Returns the computational node for updating.
virtual void updateGeometries()
Update the geometries.
std::shared_ptr< TaskNode > getUpdateGeometryNode() const
Returns the computational node for updating geometry.
std::shared_ptr< TaskGraph > getTaskGraph() const
Get the computational graph.
std::shared_ptr< VisualModel > getVisualModel(const int index) const
Get/add visual model.
virtual bool initialize()
Initialize the scene object.
Top-level class for entities. Entities contain a collection of components which define how to be used...
virtual void update()
Update the SceneObject, called during scene update.
Base class for all scene objects. A scene object can optionally be visible and collide with other sce...
std::shared_ptr< TaskGraph > m_taskGraph
Computational Graph.
void initGraphEdges()
Initializes the edges of the SceneObject's computational graph.
virtual void postModifiedAll()
Posts modified for all geometries.