SDLPP: get/set id in visitor

This commit is contained in:
zvon 2021-05-02 14:03:43 +02:00
parent e84284e613
commit 34324d3054
2 changed files with 5 additions and 2 deletions

View File

@ -113,7 +113,7 @@ Scene::getCollisions( RenderObject &r ) {
}
void Scene::visitCollisions( RenderObject &r, Visitor &v ) {
for ( auto &collision : getCollisions( r ) ) {
v.fromId( collision.first );
v.setFromId( collision.first );
collision.second->visit( v );
}
}

View File

@ -11,7 +11,10 @@ class SDLPPSCOPE Visitor {
public:
Visitor() {}
virtual void visit( const RenderObject &obj ) = 0;
virtual void fromId( uint64_t id ) = 0;
virtual void setFromId( uint64_t id ) = 0;
virtual uint64_t getFromId() = 0;
virtual void setVisitorType( uint64_t type ) = 0;
virtual uint64_t getVisitorType() = 0;
};
} // namespace SDLPP