Program Listing for File polar2d.hpp

Return to documentation for file (include/tuw_geometry/polar2d.hpp)

#ifndef TUW_GEOMETRY__POLAR2D_HPP
#define TUW_GEOMETRY__POLAR2D_HPP

#include <memory>
#include <tuw_geometry/point2d.hpp>

namespace tuw
{
class Polar2D;
using Polar2DPtr = std::shared_ptr<Polar2D>;
using Polar2DConstPtr = std::shared_ptr<Polar2D const>;

class Polar2D : public Point2D
{
public:
  Polar2D();
  Polar2D(const Point2D & p);
  Polar2D(double alpha, double rho);
  Polar2D(double alpha, double rho, double h);

  const double & alpha() const;
  double & alpha();
  const double & rho() const;
  double & rho();
  Point2D point() const;

private:
  using Point2D::angle;
  using Point2D::radius;
  using Point2D::x;
  using Point2D::y;
};
using Polars2D = std::vector<Polar2D>;
using Polars2DPtr = std::shared_ptr<Polars2D>;
using Polars2DConstPtr = std::shared_ptr<Polars2D const>;

}  // namespace tuw
#endif  //TUW_GEOMETRY__POLAR2D_HPP