VisualizationPartQuery.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: UnstructGrid
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2012, 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 "CeeCore/Vec3d.h"
17 
18 #include <vector>
19 
20 namespace cee {
21  class Image;
22  class Vec2f;
23 
24 namespace ug {
25 class UnstructGridModel;
26 
27 //==================================================================================================
28 //
29 //
30 //
31 //==================================================================================================
32 class CEE_UG_EXPORT VisualizationPartQuery
33 {
34 public:
35  VisualizationPartQuery(const UnstructGridModel* model, size_t frameIndex, size_t geometryIndex, int partId);
37 
38  void visibleNodes(std::vector<size_t>* visibleNodes);
39  void visibleElements(std::vector<size_t>* elementIndices);
40  void visibleElementSurfaces(std::vector<size_t>* elementIndices, std::vector<unsigned char>* surfaceIndices);
41 
42  void visibleTriangles(std::vector<unsigned int>* indices);
43  void outlineEdges(std::vector<unsigned int>* edgeSegmentsNodeIndices);
44 
45  void visibleIndexedTriangles(std::vector<unsigned int>* indices, std::vector<cee::Vec3d>* nodes);
46  void visibleIndexedLines(std::vector<unsigned int>* indices, std::vector<cee::Vec3d>* nodes);
47  void visiblePoints(std::vector<cee::Vec3d>* points);
48 
49  void visibleNodesNormals(std::vector<cee::Vec3d>* normals);
50 
51  void visibleNodesTextureCoordinates(std::vector<cee::Vec2f>* textureCoordinates);
52  void fringesLegendTextureImage(Image* image);
53 
54  bool hasTriangles() const;
55  bool hasLines() const;
56  bool hasPoints() const;
57 
58 private:
59  CEE_PRIVATE_IMPL(VisualizationPartQuery);
60  CEE_DISALLOW_COPY_AND_ASSIGN(VisualizationPartQuery);
61 };
62 
63 } // namespace ug
64 } // 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
Query for visible nodes, elements or triangles for a given part.
Definition: VisualizationPartQuery.h:32
UnstructGridModel is a subclass of Model which adds specific model structure and functionality for re...
Definition: UnstructGridModel.h:72