MarkupPartFixedSizeGlyph.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: Visualization
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2014, 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 "CeeVisualization/MarkupPart.h"
18 #include "CeeCore/Vec3d.h"
19 #include "CeeCore/PtrRef.h"
20 
21 #include <vector>
22 
23 namespace cee {
24 class BoundingBox;
25 class Image;
26 
27 namespace vis {
28 
29 //==================================================================================================
30 //
31 //
32 //
33 //==================================================================================================
34 class CEE_VIS_EXPORT MarkupPartFixedSizeGlyph : public MarkupPart
35 {
36 public:
38  MarkupPartFixedSizeGlyph(Image* image, const Vec3d& position, unsigned int pixelSizeLongestEdge);
39  virtual ~MarkupPartFixedSizeGlyph();
40 
41  virtual PartType type() const;
42  virtual BoundingBox boundingBox() const;
43 
44  virtual void setPriority(int priority);
45  virtual int priority() const;
46 
47  virtual const Mat4d& transformation() const;
48  virtual void setTransformation(const Mat4d& matrix);
49 
50  const Image* image() const;
51  void setImage(Image* image);
52 
53  Vec3d position() const;
54  void setPosition(const Vec3d& position);
55 
56  unsigned int pixelSizeLongestEdge() const;
57  void setPixelSizeLongestEdge(unsigned int pixelSize);
58 
59 protected:
60  virtual bool internal_preRenderUpdatePart(bool forceUpdate, cvf::OpenGLContext* cvfContext, MarkupClippingData* clippingData);
61  virtual cvf::Part* internal_cvfPart();
62  virtual cvf::Part* internal_cvfOverlayPart();
63  virtual cvf::Transform* internal_cvfTransform();
64 
65 private:
66  CEE_PRIVATE_IMPL(MarkupPartFixedSizeGlyph);
67  CEE_DISALLOW_COPY_AND_ASSIGN(MarkupPartFixedSizeGlyph);
68 };
69 
70 } // namespace vis
71 } // namespace cee
Stores an RGBA image with 8 bits per pixel.
Definition: Image.h:25
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
A MarkupModel part for drawing a fixed size glyph (2d billboard).
Definition: MarkupPartFixedSizeGlyph.h:34
PartType
Enum specifying the type of MarkupPart.
Definition: MarkupPart.h:39
Base class for MarkupModel Parts.
Definition: MarkupPart.h:35
Axis-aligned bounding box.
Definition: BoundingBox.h:27
Vector class for a 3D double vector.
Definition: Vec3d.h:26
4 dimensional matrix.
Definition: Mat4d.h:26