Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
libnest2d::_Circle< P > Class Template Reference

#include <src/libnest2d/include/libnest2d/geometry_traits.hpp>

Public Types

using Tag = CircleTag
 
using PointType = P
 

Public Member Functions

 _Circle ()=default
 
 _Circle (const P &center, double r)
 
const P & center () const BP2D_NOEXCEPT
 
void center (const P &c)
 
double radius () const BP2D_NOEXCEPT
 
void radius (double r)
 
double area () const BP2D_NOEXCEPT
 

Private Attributes

center_
 
double radius_ = 0
 

Detailed Description

template<class P>
class libnest2d::_Circle< P >

Member Typedef Documentation

◆ PointType

template<class P >
using libnest2d::_Circle< P >::PointType = P

◆ Tag

template<class P >
using libnest2d::_Circle< P >::Tag = CircleTag

Constructor & Destructor Documentation

◆ _Circle() [1/2]

template<class P >
libnest2d::_Circle< P >::_Circle ( )
default

◆ _Circle() [2/2]

template<class P >
libnest2d::_Circle< P >::_Circle ( const P &  center,
double  r 
)
inline
225: center_(center), radius_(r) {}
const P & center() const BP2D_NOEXCEPT
Definition geometry_traits.hpp:227
double radius_
Definition geometry_traits.hpp:218
P center_
Definition geometry_traits.hpp:217

Member Function Documentation

◆ area()

template<class P >
double libnest2d::_Circle< P >::area ( ) const
inline
233 {
234 return Pi_2 * radius_ * radius_;
235 }
const double BP2D_CONSTEXPR Pi_2
Definition common.hpp:98

References libnest2d::Pi_2, and libnest2d::_Circle< P >::radius_.

Referenced by libnest2d::shapelike::area().

+ Here is the caller graph for this function:

◆ center() [1/2]

template<class P >
const P & libnest2d::_Circle< P >::center ( ) const
inline
227{ return center_; }

References libnest2d::_Circle< P >::center_.

Referenced by libnest2d::shapelike::boundingBox().

+ Here is the caller graph for this function:

◆ center() [2/2]

template<class P >
void libnest2d::_Circle< P >::center ( const P &  c)
inline

◆ radius() [1/2]

template<class P >
double libnest2d::_Circle< P >::radius ( ) const
inline
230{ return radius_; }

References libnest2d::_Circle< P >::radius_.

Referenced by libnest2d::shapelike::boundingBox(), libnest2d::placers::_NofitPolyPlacer< RawShape, TBin >::overfit(), and libnest2d::placers::_NofitPolyPlacer< RawShape, TBin >::overfit().

+ Here is the caller graph for this function:

◆ radius() [2/2]

template<class P >
void libnest2d::_Circle< P >::radius ( double  r)
inline
231{ radius_ = r; }

References libnest2d::_Circle< P >::radius_.

Member Data Documentation

◆ center_

template<class P >
P libnest2d::_Circle< P >::center_
private

◆ radius_

template<class P >
double libnest2d::_Circle< P >::radius_ = 0
private

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