Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::MultiPoint3 Class Reference

#include <src/libslic3r/MultiPoint.hpp>

+ Inheritance diagram for Slic3r::MultiPoint3:
+ Collaboration diagram for Slic3r::MultiPoint3:

Public Member Functions

void append (const Vec3crd &point)
 
void translate (double x, double y)
 
void translate (const Point &vector)
 
bool is_valid () const
 
BoundingBox3 bounding_box () const
 
bool remove_duplicate_points ()
 

Public Attributes

Points3 points
 

Detailed Description

Member Function Documentation

◆ append()

void Slic3r::MultiPoint3::append ( const Vec3crd point)
inline
100{ this->points.push_back(point); }
Points3 points
Definition MultiPoint.hpp:98

◆ bounding_box()

BoundingBox3 Slic3r::MultiPoint3::bounding_box ( ) const
334{
335 return BoundingBox3(points);
336}

References points.

◆ is_valid()

bool Slic3r::MultiPoint3::is_valid ( ) const
inline
104{ return this->points.size() >= 2; }

◆ remove_duplicate_points()

bool Slic3r::MultiPoint3::remove_duplicate_points ( )
339{
340 size_t j = 0;
341 for (size_t i = 1; i < points.size(); ++i) {
342 if (points[j] == points[i]) {
343 // Just increase index i.
344 } else {
345 ++ j;
346 if (j < i)
347 points[j] = points[i];
348 }
349 }
350
351 if (++j < points.size())
352 {
353 points.erase(points.begin() + j, points.end());
354 return true;
355 }
356
357 return false;
358}

References points.

◆ translate() [1/2]

void Slic3r::MultiPoint3::translate ( const Point vector)
329{
330 this->translate(vector(0), vector(1));
331}
void translate(double x, double y)
Definition MultiPoint.cpp:320

References translate().

+ Here is the call graph for this function:

◆ translate() [2/2]

void Slic3r::MultiPoint3::translate ( double  x,
double  y 
)
321{
322 for (Vec3crd &p : points) {
323 p(0) += coord_t(x);
324 p(1) += coord_t(y);
325 }
326}
int32_t coord_t
Definition libslic3r.h:39
Eigen::Matrix< coord_t, 3, 1, Eigen::DontAlign > Vec3crd
Definition Point.hpp:38

References points.

Referenced by translate().

+ Here is the caller graph for this function:

Member Data Documentation

◆ points


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