libslic3r
Library for generating gcode from 3d models
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Slic3r::Point Class Reference

#include <Point.hpp>

Inheritance diagram for Slic3r::Point:
Slic3r::IntersectionPoint Slic3r::Point3 Slic3r::SLAPrint::SupportPillar

Public Member Functions

constexpr Point (coord_t _x=0, coord_t _y=0)
 
constexpr Point (int _x, int _y)
 
constexpr Point (long long _x, long long _y)
 
 Point (double x, double y)
 
bool operator== (const Point &rhs) const
 
bool operator!= (const Point &rhs) const
 
std::string wkt () const
 
std::string dump_perl () const
 
void scale (double factor)
 
void translate (double x, double y)
 
void translate (const Vector &vector)
 
void rotate (double angle)
 
void rotate (double angle, const Point &center)
 
Point rotated (double angle) const
 
Point rotated (double angle, const Point &center) const
 
bool coincides_with (const Point &point) const
 
bool coincides_with_epsilon (const Point &point) const
 
int nearest_point_index (const Points &points) const
 
int nearest_point_index (const PointConstPtrs &points) const
 
int nearest_point_index (const PointPtrs &points) const
 
size_t nearest_waypoint_index (const Points &points, const Point &point) const
 
bool nearest_point (const Points &points, Point *point) const
 
bool nearest_waypoint (const Points &points, const Point &dest, Point *point) const
 
double distance_to (const Point &point) const
 
double distance_to (const Line &line) const
 
double perp_distance_to (const Line &line) const
 
double ccw (const Point &p1, const Point &p2) const
 
double ccw (const Line &line) const
 
double ccw_angle (const Point &p1, const Point &p2) const
 
Point projection_onto (const MultiPoint &poly) const
 
Point projection_onto (const Line &line) const
 
Point negative () const
 
Vector vector_to (const Point &point) const
 
void align_to_grid (const Point &spacing, const Point &base=Point(0, 0))
 

Static Public Member Functions

static constexpr Point new_scale (coordf_t x, coordf_t y)
 
static Point new_scale (Pointf p)
 Scale and create a Point from a Pointf. More...
 

Public Attributes

coord_t x
 
coord_t y
 

Constructor & Destructor Documentation

◆ Point() [1/4]

constexpr Slic3r::Point::Point ( coord_t  _x = 0,
coord_t  _y = 0 
)
inline

◆ Point() [2/4]

constexpr Slic3r::Point::Point ( int  _x,
int  _y 
)
inline

◆ Point() [3/4]

constexpr Slic3r::Point::Point ( long long  _x,
long long  _y 
)
inline

◆ Point() [4/4]

Slic3r::Point::Point ( double  x,
double  y 
)

Member Function Documentation

◆ align_to_grid()

void Slic3r::Point::align_to_grid ( const Point spacing,
const Point base = Point(0,0) 
)

◆ ccw() [1/2]

double Slic3r::Point::ccw ( const Point p1,
const Point p2 
) const

◆ ccw() [2/2]

double Slic3r::Point::ccw ( const Line line) const

◆ ccw_angle()

double Slic3r::Point::ccw_angle ( const Point p1,
const Point p2 
) const

◆ coincides_with()

bool Slic3r::Point::coincides_with ( const Point point) const
inline

◆ coincides_with_epsilon()

bool Slic3r::Point::coincides_with_epsilon ( const Point point) const

◆ distance_to() [1/2]

double Slic3r::Point::distance_to ( const Point point) const

◆ distance_to() [2/2]

double Slic3r::Point::distance_to ( const Line line) const

◆ dump_perl()

std::string Slic3r::Point::dump_perl ( ) const

◆ nearest_point()

bool Slic3r::Point::nearest_point ( const Points points,
Point point 
) const

◆ nearest_point_index() [1/3]

int Slic3r::Point::nearest_point_index ( const Points points) const

◆ nearest_point_index() [2/3]

int Slic3r::Point::nearest_point_index ( const PointConstPtrs points) const

◆ nearest_point_index() [3/3]

int Slic3r::Point::nearest_point_index ( const PointPtrs points) const

◆ nearest_waypoint()

bool Slic3r::Point::nearest_waypoint ( const Points points,
const Point dest,
Point point 
) const

◆ nearest_waypoint_index()

size_t Slic3r::Point::nearest_waypoint_index ( const Points points,
const Point point 
) const

◆ negative()

Point Slic3r::Point::negative ( ) const

◆ new_scale() [1/2]

static constexpr Point Slic3r::Point::new_scale ( coordf_t  x,
coordf_t  y 
)
inlinestatic

◆ new_scale() [2/2]

Point Slic3r::Point::new_scale ( Pointf  p)
static

Scale and create a Point from a Pointf.

◆ operator!=()

bool Slic3r::Point::operator!= ( const Point rhs) const
inline

◆ operator==()

bool Slic3r::Point::operator== ( const Point rhs) const

◆ perp_distance_to()

double Slic3r::Point::perp_distance_to ( const Line line) const

◆ projection_onto() [1/2]

Point Slic3r::Point::projection_onto ( const MultiPoint poly) const

◆ projection_onto() [2/2]

Point Slic3r::Point::projection_onto ( const Line line) const

◆ rotate() [1/2]

void Slic3r::Point::rotate ( double  angle)

◆ rotate() [2/2]

void Slic3r::Point::rotate ( double  angle,
const Point center 
)

◆ rotated() [1/2]

Point Slic3r::Point::rotated ( double  angle) const
inline

◆ rotated() [2/2]

Point Slic3r::Point::rotated ( double  angle,
const Point center 
) const
inline

◆ scale()

void Slic3r::Point::scale ( double  factor)

◆ translate() [1/2]

void Slic3r::Point::translate ( double  x,
double  y 
)

◆ translate() [2/2]

void Slic3r::Point::translate ( const Vector vector)

◆ vector_to()

Vector Slic3r::Point::vector_to ( const Point point) const

◆ wkt()

std::string Slic3r::Point::wkt ( ) const

Member Data Documentation

◆ x

coord_t Slic3r::Point::x

◆ y

coord_t Slic3r::Point::y

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