Mercurial > hg > orthanc-stone
diff Framework/Scene2D/ColorSceneLayer.h @ 632:500c3f70b6c2
- Added a ClearAllChains method to PolylineSceneLayer --> revision must change
when calling it ==> BumpRevision has been added to base class
- Added some docs
= Added GetMinDepth + GetMaxDepth to Scene2D (to alleviate the need for app-
specific "Z depth registry" : clients may simply add a new layer on top or at
the bottom of the existing layer set.
- Added the line tracker measurement tools, commands and trackers. Generic base
classes + Line measure
- started work on the line measure handles
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Thu, 09 May 2019 10:41:31 +0200 |
parents | 434ceeb0bcab |
children | f0008c55e5f7 |
line wrap: on
line diff
--- a/Framework/Scene2D/ColorSceneLayer.h Thu May 02 18:58:46 2019 +0200 +++ b/Framework/Scene2D/ColorSceneLayer.h Thu May 09 10:41:31 2019 +0200 @@ -22,6 +22,7 @@ #pragma once #include "ISceneLayer.h" +#include <Core/Enumerations.h> #include <stdint.h> @@ -33,7 +34,13 @@ uint8_t red_; uint8_t green_; uint8_t blue_; - + uint64_t revision_; + protected: + void BumpRevision() + { + // this is *not* thread-safe!!! + revision_++; + } public: ColorSceneLayer() : red_(255), @@ -42,6 +49,11 @@ { } + virtual uint64_t GetRevision() const ORTHANC_OVERRIDE + { + return revision_; + } + void SetColor(uint8_t red, uint8_t green, uint8_t blue) @@ -49,6 +61,7 @@ red_ = red; green_ = green; blue_ = blue; + BumpRevision(); } uint8_t GetRed() const