SDLPP: get/set id in visitor
This commit is contained in:
parent
e84284e613
commit
34324d3054
@ -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 );
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user