Fire Core  8.0.0.alpha
GIS framework per tutti gli usi
 Tutto Classi Namespace Funzioni Variabili Ridefinizioni di tipo (typedef) Tipi enumerati (enum) Valori del tipo enumerato Friend
Utility.hpp
1 // Copyright 2015 GEOSYSTEMS SRL
2 // All Rights Reserved.
3 
4 #ifndef FIRE_GEAR_TRANSFORM_UTILITY_HPP_INCLUDED
5 #define FIRE_GEAR_TRANSFORM_UTILITY_HPP_INCLUDED
6 
7 #include <vector>
8 
9 #include "fire/export.hpp"
10 
11 namespace fire {
12 namespace gear {
13 class Group;
14 } // namespace gear
15 } // namespace fire
16 
17 namespace fire {
18 namespace gear {
19 namespace geom {
20 class Geometry;
21 class Coordinate;
22 class CoordinateSequence;
23 } // namespace geom
24 } // namespace gear
25 } // namespace fire
26 
27 namespace fire {
28 namespace gear {
29 namespace transform {
30 class ZeroWasteTriangle;
31 } // namespace transform
32 } // namespace gear
33 } // namespace fire
34 
39 namespace fire {
44 namespace gear {
49 namespace transform {
56  FIRE_XYZ,
57  FIRE_XZY,
58  FIRE_YXZ,
59  FIRE_YZX,
60  FIRE_ZXY,
61  FIRE_ZYX
62 };
67 class FIRE_ENGINE_DLL Utility {
68  static const int DIMENSION_2D;
69  static const int DIMENSION_3D;
70  static const int PARAM_NUMBER_2D;
71  static const int PARAM_NUMBER_3D;
72 
73  public:
78  Utility() {};
108  static void adjust(geom::Geometry& geometry, const int& precision);
118  static void adjust(const std::vector< geom::Geometry* >& geometries, const int& precision);
164  static void adjust(Group & group, const int& precision);
203  static void project(fire::gear::geom::Geometry& geometry, const int& srid);
220  static void project(const std::vector< fire::gear::geom::Geometry* >& geometries, const int& srid);
237  static void project(Group & group, const int& srid);
303  static void affine(fire::gear::geom::Geometry& geometry, const std::vector< double >& parametries);
315  static void affine(const std::vector< fire::gear::geom::Geometry* >& geometries, const std::vector< double >& parametries);
327  static void affine(Group & group, const std::vector< double >& parametries);
366  static void shift(fire::gear::geom::Geometry& geometry, const double& x, const double& y, const double& z);
378  static void shift(const std::vector< fire::gear::geom::Geometry* >& geometries, const double& x, const double& y, const double& z);
390  static void shift(Group & group, const double& x, const double& y, const double& z);
454  static void rotate(fire::gear::geom::Geometry& geometry, const fire::gear::geom::Coordinate& pivot, const double& x, const double& y, const double& z, RotationOrder en_priority = FIRE_XYZ);
553  static void rotate(const std::vector< fire::gear::geom::Geometry* >& geometries, const fire::gear::geom::Coordinate& pivot, const double& x, const double& y, const double& z, RotationOrder en_priority = FIRE_XYZ);
573  static void rotate(Group & group, const fire::gear::geom::Coordinate& pivot, const double& x, const double& y, const double& z, RotationOrder en_priority = FIRE_XYZ);
585  static void scale(fire::gear::geom::Geometry& geometry, const double& x, const double& y, const double& z);
597  static void scale(const std::vector< fire::gear::geom::Geometry* >& geometries, const double& x, const double& y, const double& z);
677  static void scale(Group & group, const double& x, const double& y, const double& z);
688  static void reverse(fire::gear::geom::Geometry& geometry);
699  static void reverse(const std::vector< fire::gear::geom::Geometry* >& geometries);
733  static void reverse(Group & group);
750  static void zerowaste(const std::vector< fire::gear::geom::Geometry* >& geometries, const std::vector< fire::gear::transform::ZeroWasteTriangle* >& triangles);
767  static void zerowaste(Group & group, const std::vector< fire::gear::transform::ZeroWasteTriangle* >& triangles);
768 
769  private:
770  std::vector< std::vector<double> > m_vectMatrix;
771  unsigned int m_vectMatrixDim;
772 
773  std::vector <fire::gear::geom::CoordinateSequence* >* getAllCoordinateSequences(const fire::gear::geom::Geometry& geometry);
774 
775  void loadMatrix(std::vector<double> parametries);
776  bool isValidParamAffine(const std::vector<double>& parametries);
777  void createShiftingVect(std::vector<double> & vectIn, double offsetX, double offsetY, double offsetZ);
778  void createShiftingVect(std::vector<double> & vectIn, double offsetX, double offsetY);
779  void createScalingVect(std::vector<double> & vectIn, double deltaX, double deltaY, double deltaZ);
780  void createScalingVect(std::vector<double> & vectIn, double deltaX, double deltaY);
781  void createRXvect(std::vector<double> & vectIn, double radians);
782  void createRYvect(std::vector<double> & vectIn, double radians);
783  void createRZvect(std::vector<double> & vectIn, double radians, int dimension = DIMENSION_3D);
784 };
785 } // namespace transform
786 } // namespace gear
787 } // namespace fire
788 
789 #endif
Definition: Coordinate.hpp:48
Definition: Group.hpp:48
Utility()
costruttore di default della classe
Definition: Utility.hpp:78
Definition: Geometry.hpp:69
classe che implementa le operazioni di trasformazione delle geoemtrie
Definition: Utility.hpp:67
RotationOrder
enum RotationOrder che definisce l' ordine di rotazione es: FIRE_YXZ indica di specificare le rotazio...
Definition: Utility.hpp:55
Definition: ZeroWasteTriangle.hpp:38