cc2DViewportObject.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //##########################################################################
  2. //# #
  3. //# CLOUDCOMPARE #
  4. //# #
  5. //# This program is free software; you can redistribute it and/or modify #
  6. //# it under the terms of the GNU General Public License as published by #
  7. //# the Free Software Foundation; version 2 or later of the License. #
  8. //# #
  9. //# This program is distributed in the hope that it will be useful, #
  10. //# but WITHOUT ANY WARRANTY; without even the implied warranty of #
  11. //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
  12. //# GNU General Public License for more details. #
  13. //# #
  14. //# COPYRIGHT: EDF R&D / TELECOM ParisTech (ENST-TSI) #
  15. //# #
  16. //##########################################################################
  17. #ifndef CC_2D_VIEWPORT_OBJECT_HEADER
  18. #define CC_2D_VIEWPORT_OBJECT_HEADER
  19. //Local
  20. #include "ccHObject.h"
  21. #include "ccGenericGLDisplay.h"
  22. //! 2D viewport object
  23. class QCC_DB_LIB_API cc2DViewportObject : public ccHObject
  24. {
  25. public:
  26. //! Default constructor
  27. cc2DViewportObject(QString name = QString());
  28. //! Copy constructor
  29. cc2DViewportObject(const cc2DViewportObject& viewport);
  30. //inherited from ccHObject
  31. virtual CC_CLASS_ENUM getClassID() const override { return CC_TYPES::VIEWPORT_2D_OBJECT; }
  32. virtual bool isSerializable() const override { return true; }
  33. //! Sets perspective view state
  34. void setParameters(const ccViewportParameters& params) { m_params = params; }
  35. //! Gets parameters
  36. const ccViewportParameters& getParameters() const { return m_params; }
  37. protected:
  38. //inherited from ccHObject
  39. bool toFile_MeOnly(QFile& out, short dataVersion) const override;
  40. bool fromFile_MeOnly(QFile& in, short dataVersion, int flags, LoadedIDMap& oldToNewIDMap) override;
  41. short minimumFileVersion_MeOnly() const override;
  42. //! Viewport parameters
  43. ccViewportParameters m_params;
  44. };
  45. #endif //CC_2D_VIEWPORT_OBJECT_HEADER