OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::Line3 Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Line.hpp>

Collaboration diagram for Slic3r::Line3:

Public Types

using Scalar = coord_t

Public Member Functions

 Line3 ()
 Line3 (const Point3 &_a, const Point3 &_b)
 Line3 (const Vec3crd &_a, const Vec3crd &_b)
double length () const
Point3 vector () const
Point3 midpoint () const
Line to_line () const

Static Public Member Functions

static double distance_to_squared (const Point3 &point, const Point3 &a, const Point3 &b)

Public Attributes

Point3 a
Point3 b

Static Public Attributes

static const constexpr int Dim = 3

Detailed Description

Member Typedef Documentation

◆ Scalar

Constructor & Destructor Documentation

◆ Line3() [1/3]

Slic3r::Line3::Line3 ( )
inline
230: a(Point3()), b(Point3()) {}
Point3 b
Definition Line.hpp:248
Point3 a
Definition Line.hpp:247

References a, and b.

Referenced by distance_to_squared().

Here is the caller graph for this function:

◆ Line3() [2/3]

Slic3r::Line3::Line3 ( const Point3 & _a,
const Point3 & _b )
inline
231: a(_a), b(_b) {}

References a, and b.

◆ Line3() [3/3]

Slic3r::Line3::Line3 ( const Vec3crd & _a,
const Vec3crd & _b )
inline
233: a(Point3(_a)), b(Point3(_b)) {}

References a, and b.

Member Function Documentation

◆ distance_to_squared()

double Slic3r::Line3::distance_to_squared ( const Point3 & point,
const Point3 & a,
const Point3 & b )
inlinestatic
243 {
245 }
Line3()
Definition Line.hpp:230
double distance_to_squared(const L &line, const Vec< Dim< L >, Scalar< L > > &point, Vec< Dim< L >, Scalar< L > > *nearest_point)
Definition Line.hpp:46
Mat< N, 1, T > Vec
Definition Point.hpp:48

References Line3(), a, b, and Slic3r::line_alg::distance_to_squared().

Referenced by Slic3r::MultiPoint3::_douglas_peucker().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ length()

double Slic3r::Line3::length ( ) const
inline
235{ return (this->a - this->b).cast<double>().norm(); }

References a, and b.

Referenced by Slic3r::Point3::projection_onto(), and Slic3r::thick_lines_to_geometry().

Here is the caller graph for this function:

◆ midpoint()

Point3 Slic3r::Line3::midpoint ( ) const
inline
237{ return Point3((this->a.x() + this->b.x()) / 2, (this->a.y() + this->b.y()) / 2, (this->a.z() + this->b.z()) / 2); }

References a.

◆ to_line()

Line Slic3r::Line3::to_line ( ) const
inline
240{ return Line(this->a.to_point(), this->b.to_point()); }

References a.

◆ vector()

Point3 Slic3r::Line3::vector ( ) const
inline
236{ Vec3crd v = this->b - this->a; return Point3(v.x(), v.y(), v.z()); }
Eigen::Matrix< coord_t, 3, 1, Eigen::DontAlign > Vec3crd
Definition Point.hpp:53

References a, and b.

Referenced by Slic3r::thick_lines_to_geometry().

Here is the caller graph for this function:

Member Data Documentation

◆ a

◆ b

◆ Dim

const constexpr int Slic3r::Line3::Dim = 3
staticconstexpr

The documentation for this class was generated from the following file:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Line.hpp