MarkupModel.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/Model.h"
16 #include "CeeVisualization/MarkupModelHitItem.h"
17 #include "CeeVisualization/MarkupModelHitItemCollection.h"
18 
19 namespace cee {
20 class Ray;
21 
22 namespace vis {
23 class MarkupPart;
24 class View;
25 
26 //==================================================================================================
27 //
28 //
29 //
30 //==================================================================================================
31 class CEE_VIS_EXPORT MarkupModel : public Model
32 {
33 public:
34  MarkupModel();
35  virtual ~MarkupModel();
36 
37  size_t partCount() const;
38  size_t partIndex(MarkupPart* part) const;
39  MarkupPart* part(size_t index);
40  const MarkupPart* part(size_t index) const;
41  void addPart(MarkupPart* part);
42  void removePart(MarkupPart* part);
43  void removeAllParts();
44 
45  virtual BoundingBox boundingBox();
46  virtual Str modelInfo() const;
47  size_t rayIntersect(const Ray& ray, const View& view);
48  bool rayIntersect(const Ray& ray, const View& view, MarkupModelHitItem* hitItem);
49  bool rayIntersectAllHits(const Ray& ray, const View& view, MarkupModelHitItemCollection* hitItems);
50 
51  bool isViewClippingIgnored() const;
52  void setIgnoreViewClipping(bool ignore);
53 
54 private:
55  virtual cvf::Model* internal_cvfModel();
56  virtual cvf::Model* internal_cvfModelForOverlayParts();
57  virtual cvf::Model* internal_cvfModelForOverlayDetectVisibleParts();
58  virtual void internal_setViewCapabilities(const cvf::OpenGLCapabilities& capabilities, bool viewDoesHighlighting);
59  virtual bool internal_canAddToViewWithCapabilities(const cvf::OpenGLCapabilities& viewCapabilities) const;
60  virtual NotifyAction internal_detectAndConfigureViewClippingInModel(const vis::View& triggeringView, cvf::OpenGLContext* cvfContext);
61  virtual void internal_applyViewClippingPlanesBeforeRendering(const cvf::ClipPlaneSet* viewClipPlaneSet, const cvf::Plane* dropShadowClipPlane);
62  virtual void internal_applyCameraTransformationToClippingPlanes(const cvf::Camera& camera);
63  virtual NotifyAction internal_preRenderUpdateModel(const View& triggeringView, cvf::OpenGLContext* cvfContext);
64 
65 private:
66  CEE_PRIVATE_IMPL(MarkupModel);
67  CEE_DISALLOW_COPY_AND_ASSIGN(MarkupModel);
68 };
69 
70 } // namespace vis
71 } // namespace cee
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
A general unicode based string class.
Definition: Str.h:28
Model used for drawing labels, arrows, lines, points, triangles and glyphs.
Definition: MarkupModel.h:31
A ray that can be used for intersection testing.
Definition: Ray.h:27
Model holds information which is to be gathered to constitute a view.
Definition: Model.h:43
Base class for MarkupModel Parts.
Definition: MarkupPart.h:35
Axis-aligned bounding box.
Definition: BoundingBox.h:27
Provides a render area in the user control/widget to enable visualization of the current model data a...
Definition: View.h:40
A collection of MarkupModelHitItem objects.
Definition: MarkupModelHitItemCollection.h:28
NotifyAction
Notification sent to the view.
Definition: Model.h:59
Small class containing the data for a hit of an intersection between a ray and a part in an MarkupMod...
Definition: MarkupModelHitItem.h:26