Locus No Pilotus
Project of four first grade MIPT DAFE/RSE students (for engineering practical work in the second semester) in Qt C++
Loading...
Searching...
No Matches
math::CircleObstacle Class Reference

Круговое препятствие More...

#include <obstacles.h>

Collaboration diagram for math::CircleObstacle:

Public Member Functions

 CircleObstacle ()
 
 CircleObstacle (Point center, double radius)
 Инициализирует экземпляр CircleObstacle.
 
void AddTangentPoint (const Point &tangent_point)
 
Point GetCenter () const
 
double GetRadius () const
 
std::vector< PointGetTangentPoints ()
 
bool operator!= (const CircleObstacle &other)
 
bool operator== (const CircleObstacle &other)
 

Private Attributes

Point center_
 
double radius_
 
std::vector< Pointtangent_points_
 

Detailed Description

Круговое препятствие

Constructor & Destructor Documentation

◆ CircleObstacle() [1/2]

math::CircleObstacle::CircleObstacle ( Point center,
double radius )
inline

Инициализирует экземпляр CircleObstacle.

Parameters
centerцентр круга
radiusрадиус круга
66 : center_{center}, radius_{radius} {}
Point center_
Definition obstacles.h:91
double radius_
Definition obstacles.h:93

◆ CircleObstacle() [2/2]

math::CircleObstacle::CircleObstacle ( )
inline
68: center_{0, 0}, radius_{0} {}

Member Function Documentation

◆ AddTangentPoint()

void math::CircleObstacle::AddTangentPoint ( const Point & tangent_point)
inline
76 {
77 tangent_points_.push_back(tangent_point);
78 }
std::vector< Point > tangent_points_
Definition obstacles.h:96

◆ GetCenter()

Point math::CircleObstacle::GetCenter ( ) const
inline
70{ return center_; }
Here is the caller graph for this function:

◆ GetRadius()

double math::CircleObstacle::GetRadius ( ) const
inline
72{ return radius_; }
Here is the caller graph for this function:

◆ GetTangentPoints()

std::vector< Point > math::CircleObstacle::GetTangentPoints ( )
inline
74{ return tangent_points_; }

◆ operator!=()

bool math::CircleObstacle::operator!= ( const CircleObstacle & other)
inline
85 {
86 return (center_ != other.center_ ||
87 std::abs(radius_ - other.radius_) >= precision);
88 }

◆ operator==()

bool math::CircleObstacle::operator== ( const CircleObstacle & other)
inline
80 {
81 return (center_ == other.center_ &&
82 std::abs(radius_ - other.radius_) < precision);
83 }

Member Data Documentation

◆ center_

Point math::CircleObstacle::center_
private

◆ radius_

double math::CircleObstacle::radius_
private

◆ tangent_points_

std::vector<Point> math::CircleObstacle::tangent_points_
private

The documentation for this class was generated from the following file: