void Triangle::SetPoints(const Point& A, const Point& B, const Point& C) { _pointA = A.GetPosition(); _pointB = B.GetPosition(); _pointC = C.GetPosition(); CalculateDimensions(); CalculateArea(); }
Line::Line(const Point& one, const Point& two, const a2de::Color& color) : Shape(0.0, 0.0, 0, 0, color, false), _extent_one(one.GetPosition()), _extent_two(two.GetPosition()), _slope(), _length_squared(0.0) { _type = Shape::SHAPETYPE_LINE; CalculateLengthSquared(); CalculateSlope(); Shape::SetPosition(a2de::Vector2D(_extent_one.GetX() + _extent_two.GetX() / 2.0, _extent_one.GetY() + _extent_two.GetY() / 2.0)); }
bool Spline::Intersects(const Point& point) const { return Intersects(point.GetPosition()); }
double Line::GetDistance(const Point& point) const { return this->GetDistance(point.GetPosition()); }
bool Rectangle::Intersects(const Point& point) const { return Intersects(point.GetPosition()); }