My Project
Grid2dRepresentation.h
1 /*-----------------------------------------------------------------------
2 Copyright F2I-CONSULTING, (2014-2017)
3 
4 philippe.verney@f2i-consulting.com
5 
6 This software is a computer program whose purpose is to access to data formatted using Energistics standards.
7 
8 This software is governed by the CeCILL-B license under French law and
9 abiding by the rules of distribution of free software. You can use,
10 modify and/ or redistribute the software under the terms of the CeCILL-B
11 license as circulated by CEA, CNRS and INRIA at the following URL
12 "http://www.cecill.info".
13 
14 As a counterpart to the access to the source code and rights to copy,
15 modify and redistribute granted by the license, users are provided only
16 with a limited warranty and the software's author, the holder of the
17 economic rights, and the successive licensors have only limited
18 liability.
19 
20 In this respect, the user's attention is drawn to the risks associated
21 with loading, using, modifying and/or developing or reproducing the
22 software by the user in light of its specific status of free software,
23 that may mean that it is complicated to manipulate, and that also
24 therefore means that it is reserved for developers and experienced
25 professionals having in-depth computer knowledge. Users are therefore
26 encouraged to load and test the software's suitability as regards their
27 requirements in conditions enabling the security of their systems and/or
28 data to be ensured and, more generally, to use and operate it in the
29 same conditions as regards security.
30 
31 The fact that you are presently reading this means that you have had
32 knowledge of the CeCILL-B license and that you accept its terms.
33 -----------------------------------------------------------------------*/
34 #pragma once
35 
36 #include "resqml2_0_1/Grid2dSetRepresentation.h"
37 
38 namespace resqml2_0_1
39 {
40  class DLL_IMPORT_OR_EXPORT Grid2dRepresentation : public AbstractSurfaceRepresentation
41  {
42  private :
43  gsoap_resqml2_0_1::resqml2__PointGeometry* getPointGeometry2_0_1(const unsigned int & patchIndex) const;
44  gsoap_resqml2_0_1::resqml2__Point3dLatticeArray* getArrayLatticeOfPoints3d() const;
45 
51  void setSupportingRepresentation(Grid2dRepresentation * supportingRep);
52 
53  public:
54 
58  Grid2dRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : AbstractSurfaceRepresentation(partialObject) {}
59 
68  const std::string & guid, const std::string & title);
69 
73  Grid2dRepresentation(gsoap_resqml2_0_1::_resqml2__Grid2dRepresentation* fromGsoap): AbstractSurfaceRepresentation(fromGsoap), supportingRepresentation(nullptr) {}
74 
79 
80  static const char* XML_TAG;
81  virtual std::string getXmlTag() const {return XML_TAG;}
82 
83  std::string getHdfProxyUuid() const;
84 
88  ULONG64 getNodeCountAlongIAxis() const;
89 
93  ULONG64 getNodeCountAlongJAxis() const;
94 
98  ULONG64 getXyzPointCountOfPatch(const unsigned int & patchIndex) const;
99 
105  void getXyzPointsOfPatch(const unsigned int & patchIndex, double * xyzPoints) const;
106 
112  void getZValues(double * values) const;
113 
119  void getZValuesInGlobalCrs(double * values) const;
120 
126  double getXOrigin() const;
127 
133  double getYOrigin() const;
134 
140  double getXOriginInGlobalCrs() const;
141 
147  double getYOriginInGlobalCrs() const;
148 
154  double getXJOffset() const;
155 
161  double getYJOffset() const;
162 
168  double getXJOffsetInGlobalCrs() const;
169 
175  double getYJOffsetInGlobalCrs() const;
176 
182  double getXIOffset() const;
183 
189  double getYIOffset() const;
190 
196  double getXIOffsetInGlobalCrs() const;
197 
203  double getYIOffsetInGlobalCrs() const;
204 
208  bool isJSpacingConstant() const;
209 
213  bool isISpacingConstant() const;
214 
219  double getJSpacing() const;
220 
226  void getJSpacing(double* const jSpacings) const;
227 
232  double getISpacing() const;
233 
239  void getISpacing(double* const iSpacings) const;
240 
245  void setGeometryAsArray2dOfLatticePoints3d(
246  const unsigned int & numPointsInFastestDirection, const unsigned int & numPointsInSlowestDirection,
247  const double & xOrigin, const double & yOrigin, const double & zOrigin,
248  const double & xOffsetInFastestDirection, const double & yOffsetInFastestDirection, const double & zOffsetInFastestDirection,
249  const double & xOffsetInSlowestDirection, const double & yOffsetInSlowestDirection, const double & zOffsetInSlowestDirection,
250  const double & spacingInFastestDirection, const double & spacingInSlowestDirection);
251 
256  void setGeometryAsArray2dOfExplicitZ(
257  double * zValues,
258  const unsigned int & numI, const unsigned int & numJ, common::AbstractHdfProxy* proxy,
259  Grid2dRepresentation * supportingGrid2dRepresentation,
260  const unsigned int & startIndexI = 0, const unsigned int & startIndexJ = 0,
261  const int & indexIncrementI = 1, const int & indexIncrementJ = 1);
262 
267  void setGeometryAsArray2dOfExplicitZ(
268  double * zValues,
269  const unsigned int & numI, const unsigned int & numJ, common::AbstractHdfProxy* proxy,
270  const double & originX, const double & originY, const double & originZ,
271  const double & offsetIX, const double & offsetIY, const double & offsetIZ, const double & spacingI,
272  const double & offsetJX, const double & offsetJY, const double & offsetJZ, const double & spacingJ);
273 
278  std::string getSupportingRepresentationUuid() const;
279 
283  Grid2dRepresentation* getSupportingRepresentation() {return supportingRepresentation;}
284 
289  int getIndexOriginOnSupportingRepresentation() const;
290 
294  int getIndexOriginOnSupportingRepresentation(const unsigned int & dimension) const;
295 
299  int getNodeCountOnSupportingRepresentation(const unsigned int & dimension) const;
300 
304  int getIndexOffsetOnSupportingRepresentation(const unsigned int & dimension) const;
305 
306  unsigned int getPatchCount() const {return 1;}
307 
308  private:
309  std::vector<epc::Relationship> getAllEpcRelationships() const;
310  void importRelationshipSetFromEpc(common::EpcDocument* epcDoc);
311 
312  // Forward relationships
313  Grid2dRepresentation * supportingRepresentation;
314 
315  // Backward relationships
316  std::vector<AbstractRepresentation *> supportedRepresentationSet;
317 
319  double * zValues,
320  const unsigned int & numI, const unsigned int & numJ, common::AbstractHdfProxy* proxy,
321  Grid2dRepresentation * supportingGrid2dRepresentation,
322  const unsigned int & startIndexI, const unsigned int & startIndexJ,
323  const int & indexIncrementI, const int & indexIncrementJ);
324  };
325 }
Grid2dRepresentation(gsoap_resqml2_0_1::_resqml2__Grid2dRepresentation *fromGsoap)
Definition: Grid2dRepresentation.h:73
virtual std::string getXmlTag() const
Definition: Grid2dRepresentation.h:81
Definition: AbstractSurfaceRepresentation.h:40
Definition: AbstractLocal3dCrs.h:40
Grid2dRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: Grid2dRepresentation.h:58
Definition: Grid2dRepresentation.h:40
Definition: EpcDocument.h:78
Definition: EpcDocument.h:168
~Grid2dRepresentation()
Definition: Grid2dRepresentation.h:78
void pushBackGeometryPatch(double *zValues, const unsigned int &numI, const unsigned int &numJ, common::AbstractHdfProxy *proxy, Grid2dRepresentation *supportingGrid2dRepresentation, const unsigned int &startIndexI=0, const unsigned int &startIndexJ=0, const int &indexIncrementI=1, const int &indexIncrementJ=1)
Definition: Grid2dSetRepresentation.cpp:138
Definition: AbstractHdfProxy.h:45
Definition: AbstractFeatureInterpretation.h:45
Grid2dRepresentation * getSupportingRepresentation()
Definition: Grid2dRepresentation.h:283