Mercurial > hg > orthanc-stone
diff Framework/Scene2D/Scene2D.h @ 602:03c4b998fcd0
display scene positions in the basic sample
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 29 Apr 2019 14:40:01 +0200 |
parents | 6129b1e5ba42 |
children | d9c0a66304cb |
line wrap: on
line diff
--- a/Framework/Scene2D/Scene2D.h Sat Apr 27 12:38:25 2019 +0200 +++ b/Framework/Scene2D/Scene2D.h Mon Apr 29 14:40:01 2019 +0200 @@ -39,21 +39,25 @@ } virtual void Visit(const ISceneLayer& layer, + uint64_t layerIdentifier, int depth) = 0; }; private: - typedef std::map<int, ISceneLayer*> Content; + class Item; + + typedef std::map<int, Item*> Content; - Content content_; - + Content content_; AffineTransform2D sceneToCanvas_; AffineTransform2D canvasToScene_; + uint64_t layerCounter_; Scene2D(const Scene2D& other); public: - Scene2D() + Scene2D() : + layerCounter_(0) { } @@ -69,6 +73,10 @@ void DeleteLayer(int depth); + bool HasLayer(int depth) const; + + ISceneLayer& GetLayer(int depth) const; + void Apply(IVisitor& visitor) const; const AffineTransform2D& GetSceneToCanvasTransform() const