DataElementSetGenerator.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: UnstructGrid
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 "CeeUnstructGrid/Base.h"
16 #include "CeeUnstructGrid/UnstructGridModel.h"
17 #include "CeeUnstructGrid/DataElementSet.h"
18 
19 #include "CeeVisualization/View.h"
20 #include "CeeCore/Plane.h"
21 #include "CeeCore/Vec2f.h"
22 
23 namespace cee {
24 namespace ug {
25 
26 //==================================================================================================
27 //
28 //
29 //
30 //==================================================================================================
31 class CEE_UG_EXPORT DataElementSetGenerator
32 {
33 public:
37  {
38  FRONT = 0x01,
39  ON = 0x02,
40  BACK = 0x04
41  };
42 
44 
45 public:
46  DataElementSetGenerator(const UnstructGridModel& model, size_t frameIndex);
48 
49  PtrRef<DataElementSet> createFromRegion(int setId, int x, int y, unsigned int width, unsigned int height, const vis::View& view, bool includePartiallyContainedElements);
50  PtrRef<DataElementSet> createFromPolygon(int setId, const std::vector<Vec2f>& polygonInWindowCoordinates, const vis::View& view, bool includePartiallyContainedElements);
51  PtrRef<DataElementSet> createFromPlane(int setId, const Plane& plane, ElementPositionCriteria criteria);
52  PtrRef<DataElementSet> createFromPlanes(int setId, const std::vector<Plane>& planes, ElementPositionCriteria criteria);
53  PtrRef<DataElementSet> createAllVisibleElements(int setId);
54  PtrRef<DataElementSet> createAllElementsInPart(int setId, size_t geometryIndex, int partId);
55 
56 
57 private:
58  CEE_PRIVATE_IMPL(DataElementSetGenerator);
59  CEE_DISALLOW_COPY_AND_ASSIGN(DataElementSetGenerator);
60 };
61 
62 } // namespace ug
63 } // namespace cee
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
int ElementPositionCriteria
Bit-mask made up of ElementPositionCriterion which specifies which elements will be accepted based on...
Definition: DataElementSetGenerator.h:43
Smart pointer class used for handling reference counted objects (that derive from Object)...
Definition: PtrRef.h:26
Class defining a plane in space.
Definition: Plane.h:27
Provides a render area in the user control/widget to enable visualization of the current model data a...
Definition: View.h:40
This class is used to generate DataElementSets from the current DataSource of an UnstructGridModel.
Definition: DataElementSetGenerator.h:31
ElementPositionCriterion
Bit-mask used to specify which elements to include with regards to the plane. These values are then c...
Definition: DataElementSetGenerator.h:36
UnstructGridModel is a subclass of Model which adds specific model structure and functionality for re...
Definition: UnstructGridModel.h:72