AcPointCloudExtractedCylinder.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. #pragma once
  11. #include <memory>
  12. class AcPointCloudExtractedCylinderImp;
  13. /// <summary>
  14. /// This class wrap the data structure of a cylinder which is extracted
  15. /// from point cloud segment and it is used for preview
  16. /// </summary>
  17. class ACDB_PORT AcPointCloudExtractedCylinder
  18. {
  19. public:
  20. AcPointCloudExtractedCylinder();
  21. AcPointCloudExtractedCylinder(double radius, double height, AcGeVector3d axis = AcGeVector3d::kZAxis, AcGePoint3d origin = AcGePoint3d::kOrigin);
  22. virtual ~AcPointCloudExtractedCylinder();
  23. AcPointCloudExtractedCylinder(const AcPointCloudExtractedCylinder& o);
  24. bool operator == (const AcPointCloudExtractedCylinder& o) const;
  25. bool operator != (const AcPointCloudExtractedCylinder& o) const;
  26. AcPointCloudExtractedCylinder& operator = (const AcPointCloudExtractedCylinder& o);
  27. const static AcPointCloudExtractedCylinder kInvalid;
  28. public:
  29. /// <summary>
  30. /// Checks if the current extracted cylinder object is valid
  31. /// </summary>
  32. /// <returns>
  33. /// Returns true if it is valid, otherwise return false.
  34. /// </returns>
  35. bool isValid() const;
  36. /// <summary>
  37. /// Clears all the data of the cylinder.
  38. /// after calling it, the cylinder is set to AcPointCloudExtractedCylinder::kInvalid
  39. /// </summary>
  40. void clear();
  41. /// <summary>
  42. /// Gets center line's vector of the cylinder
  43. /// </summary>
  44. /// <returns>
  45. /// Returns axis of cylinder
  46. /// </returns>
  47. AcGeVector3d getAxis() const;
  48. /// <summary>
  49. /// Sets center line's vector of the cylinder
  50. /// </summary>
  51. /// <param name="axis">
  52. /// Value of axis
  53. /// </param>
  54. void setAxis(AcGeVector3d axis);
  55. /// <summary>
  56. /// Gets origin point which locates on the bottom of the cylinder
  57. /// </summary>
  58. /// <returns>
  59. /// Returns value of origin point.
  60. /// </returns>
  61. AcGePoint3d getOrigin() const;
  62. /// <summary>
  63. /// Sets origin point which locates on the bottom of the cylinder.
  64. /// </summary>
  65. /// <param name="origin">
  66. /// Value of origin point
  67. /// </param>
  68. void setOrigin(AcGePoint3d origin);
  69. /// <summary>
  70. /// Gets the height of the cylinder.
  71. /// </summary>
  72. /// <returns>
  73. /// Returns value of the height.
  74. /// </returns>
  75. double getHeight() const;
  76. /// <summary>
  77. /// Sets the height of the cylinder.
  78. /// </summary>
  79. /// <param name="height">
  80. /// Value of height
  81. /// </param>
  82. void setHeight(double height);
  83. /// <summary>
  84. /// Gets the radius of the cylinder.
  85. /// </summary>
  86. /// <returns>
  87. /// Returns the value of radius.
  88. /// </returns>
  89. double getRadius() const;
  90. /// <summary>
  91. /// Sets the radius of the cylinder.
  92. /// </summary>
  93. /// <param name="radius">
  94. /// Value of radius
  95. /// </param>
  96. void setRadius(double radius);
  97. private:
  98. std::unique_ptr<AcPointCloudExtractedCylinderImp> m_pImp;
  99. };