OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::SeamPlacerImpl::Frame Class Reference

Coordinate frame. More...

Public Member Functions

 Frame ()
 Frame (const Vec3f &x, const Vec3f &y, const Vec3f &z)
void set_from_z (const Vec3f &z)
Vec3f to_world (const Vec3f &a) const
Vec3f to_local (const Vec3f &a) const
const Vec3f & binormal () const
const Vec3f & tangent () const
const Vec3f & normal () const

Private Attributes

Vec3f mX
Vec3f mY
Vec3f mZ

Detailed Description

Coordinate frame.

Constructor & Destructor Documentation

◆ Frame() [1/2]

Slic3r::SeamPlacerImpl::Frame::Frame ( )
inline
95 {
96 mX = Vec3f(1, 0, 0);
97 mY = Vec3f(0, 1, 0);
98 mZ = Vec3f(0, 0, 1);
99 }
Vec3f mZ
Definition SeamPlacer.cpp:134
Vec3f mX
Definition SeamPlacer.cpp:134
Vec3f mY
Definition SeamPlacer.cpp:134
Eigen::Matrix< float, 3, 1, Eigen::DontAlign > Vec3f
Definition Point.hpp:65

References mX, mY, and mZ.

◆ Frame() [2/2]

Slic3r::SeamPlacerImpl::Frame::Frame ( const Vec3f & x,
const Vec3f & y,
const Vec3f & z )
inline
101 :
102 mX(x), mY(y), mZ(z) {
103 }

References mX, mY, and mZ.

Member Function Documentation

◆ binormal()

const Vec3f & Slic3r::SeamPlacerImpl::Frame::binormal ( ) const
inline
121 {
122 return mX;
123 }

References mX.

◆ normal()

const Vec3f & Slic3r::SeamPlacerImpl::Frame::normal ( ) const
inline
129 {
130 return mZ;
131 }

References mZ.

◆ set_from_z()

void Slic3r::SeamPlacerImpl::Frame::set_from_z ( const Vec3f & z)
inline
105 {
106 mZ = z.normalized();
107 Vec3f tmpZ = mZ;
108 Vec3f tmpX = (std::abs(tmpZ.x()) > 0.99f) ? Vec3f(0, 1, 0) : Vec3f(1, 0, 0);
109 mY = (tmpZ.cross(tmpX)).normalized();
110 mX = mY.cross(tmpZ);
111 }

References mX, mY, and mZ.

◆ tangent()

const Vec3f & Slic3r::SeamPlacerImpl::Frame::tangent ( ) const
inline
125 {
126 return mY;
127 }

References mY.

◆ to_local()

Vec3f Slic3r::SeamPlacerImpl::Frame::to_local ( const Vec3f & a) const
inline
117 {
118 return Vec3f(mX.dot(a), mY.dot(a), mZ.dot(a));
119 }

References mX, mY, and mZ.

◆ to_world()

Vec3f Slic3r::SeamPlacerImpl::Frame::to_world ( const Vec3f & a) const
inline
113 {
114 return a.x() * mX + a.y() * mY + a.z() * mZ;
115 }

References mX, mY, and mZ.

Member Data Documentation

◆ mX

Vec3f Slic3r::SeamPlacerImpl::Frame::mX
private

◆ mY

Vec3f Slic3r::SeamPlacerImpl::Frame::mY
private

◆ mZ

Vec3f Slic3r::SeamPlacerImpl::Frame::mZ
private

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