MarkupPart.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: Visualization
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2011, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeVisualization/Base.h"
16 #include "CeeCore/RefCountedObject.h"
17 #include "CeeCore/BoundingBox.h"
18 
19 namespace cvf {
20 class Part;
21 class Transform;
22 class OpenGLContext;
23 }
24 
25 namespace cee {
26 namespace vis {
27 class MarkupClippingData;
28 
29 
30 //==================================================================================================
31 //
32 // Base class for MarkupModel parts
33 //
34 //==================================================================================================
35 class CEE_VIS_EXPORT MarkupPart : public RefCountedObject
36 {
37 public:
39  enum PartType
40  {
50  FIXED_SIZE_IMAGE_GLYPH
51  };
52 
53 public:
54  MarkupPart();
55  virtual ~MarkupPart();
56 
57  virtual PartType type() const = 0;
58  virtual BoundingBox boundingBox() const = 0;
59 
60  bool visible() const;
61  void setVisible(bool visible);
62 
63  virtual int priority() const = 0;
64  virtual void setPriority(int priority) = 0;
65 
66  virtual const Mat4d& transformation() const = 0;
67  virtual void setTransformation(const Mat4d& matrix) = 0;
68 
69 private:
70  virtual bool internal_preRenderUpdatePart(bool forceUpdate, cvf::OpenGLContext* cvfContext, MarkupClippingData* clippingData) = 0;
71  virtual cvf::Part* internal_cvfPart() = 0;
72  virtual cvf::Part* internal_cvfOverlayPart();
73  virtual cvf::Part* internal_cvfOverlayDetectVisiblePart();
74  virtual cvf::Transform* internal_cvfTransform();
75  bool internal_checkAndClearVisibilityChanged();
76 
77 private:
78  CEE_PRIVATE_F(MarkupModel);
79  CEE_PRIVATE_IMPL(MarkupPart);
80 };
81 
82 } // namespace vis
83 } // namespace cee
Definition: LogEvent.h:19
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
Model used for drawing labels, arrows, lines, points, triangles and glyphs.
Definition: MarkupModel.h:31
Arrows part: MarkupPartArrows.
Definition: MarkupPart.h:47
Fixed size sphere part: MarkupPartFixedSizeSphere.
Definition: MarkupPart.h:49
PartType
Enum specifying the type of MarkupPart.
Definition: MarkupPart.h:39
3d text: MarkupPartText3d
Definition: MarkupPart.h:42
Triangles part: MarkupPartTriangles.
Definition: MarkupPart.h:43
Base class for MarkupModel Parts.
Definition: MarkupPart.h:35
Base class for all reference counted objects with built-in support for intrusive reference counting...
Definition: RefCountedObject.h:34
Axis-aligned bounding box.
Definition: BoundingBox.h:27
Fixed size arrow part: MarkupPartFixedSizeArrow.
Definition: MarkupPart.h:48
Labels part: MarkupPartLabels.
Definition: MarkupPart.h:41
Lines part: MarkupPartLines.
Definition: MarkupPart.h:45
Instanced Triangles part: MarkupPartInstancedGeometry.
Definition: MarkupPart.h:44
Points part: MarkupPartPoints.
Definition: MarkupPart.h:46
4 dimensional matrix.
Definition: Mat4d.h:26