Add some geometry and mesh.
This commit is contained in:
parent
1ee31596fb
commit
877d96462d
21 changed files with 126 additions and 33 deletions
|
@ -11,37 +11,24 @@ public:
|
|||
|
||||
~Point();
|
||||
|
||||
std::shared_ptr<Point> Create(double x, double y);
|
||||
static std::shared_ptr<Point> Create(double x, double y);
|
||||
|
||||
double GetX() const
|
||||
{
|
||||
return mX;
|
||||
}
|
||||
double getX() const;
|
||||
|
||||
double GetY() const
|
||||
{
|
||||
return mY;
|
||||
}
|
||||
double getY() const;
|
||||
|
||||
double GetDistance(const Point& point) const
|
||||
{
|
||||
return std::sqrt(mX*point.GetX() + mY*point.GetY());
|
||||
}
|
||||
double getDistance(const Point& point) const;
|
||||
|
||||
double GetDeltaX(const Point& point) const
|
||||
{
|
||||
return point.GetX() - mX;
|
||||
}
|
||||
double getDistance(Point* point) const;
|
||||
|
||||
double GetDeltaY(const Point& point) const
|
||||
{
|
||||
return point.GetY() - mY;
|
||||
}
|
||||
double getDeltaX(const Point& point) const;
|
||||
|
||||
double getDeltaY(const Point& point) const;
|
||||
|
||||
private:
|
||||
|
||||
double mX;
|
||||
double mY;
|
||||
double mX{0};
|
||||
double mY{0};
|
||||
double mZ{0};
|
||||
};
|
||||
|
||||
using PointPtr = std::shared_ptr<Point>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue