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

Coordinate frame. More...

+ Collaboration diagram for Slic3r::SeamPlacerImpl::Frame:

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 Vec3fbinormal () const
 
const Vec3ftangent () const
 
const Vec3fnormal () const
 

Private Attributes

Vec3f mX
 
Vec3f mY
 
Vec3f mZ
 

Detailed Description

Coordinate frame.

Constructor & Destructor Documentation

◆ Frame() [1/2]

Slic3r::SeamPlacerImpl::Frame::Frame ( )
inline
65 {
66 mX = Vec3f(1, 0, 0);
67 mY = Vec3f(0, 1, 0);
68 mZ = Vec3f(0, 0, 1);
69 }
Vec3f mZ
Definition SeamPlacer.cpp:104
Vec3f mX
Definition SeamPlacer.cpp:104
Vec3f mY
Definition SeamPlacer.cpp:104
Eigen::Matrix< float, 3, 1, Eigen::DontAlign > Vec3f
Definition Point.hpp:49

References mX, mY, and mZ.

◆ Frame() [2/2]

Slic3r::SeamPlacerImpl::Frame::Frame ( const Vec3f x,
const Vec3f y,
const Vec3f z 
)
inline
71 :
72 mX(x), mY(y), mZ(z) {
73 }

Member Function Documentation

◆ binormal()

const Vec3f & Slic3r::SeamPlacerImpl::Frame::binormal ( ) const
inline
91 {
92 return mX;
93 }

References mX.

◆ normal()

const Vec3f & Slic3r::SeamPlacerImpl::Frame::normal ( ) const
inline
99 {
100 return mZ;
101 }

References mZ.

◆ set_from_z()

void Slic3r::SeamPlacerImpl::Frame::set_from_z ( const Vec3f z)
inline
75 {
76 mZ = z.normalized();
77 Vec3f tmpZ = mZ;
78 Vec3f tmpX = (std::abs(tmpZ.x()) > 0.99f) ? Vec3f(0, 1, 0) : Vec3f(1, 0, 0);
79 mY = (tmpZ.cross(tmpX)).normalized();
80 mX = mY.cross(tmpZ);
81 }

References mX, mY, and mZ.

◆ tangent()

const Vec3f & Slic3r::SeamPlacerImpl::Frame::tangent ( ) const
inline
95 {
96 return mY;
97 }

References mY.

◆ to_local()

Vec3f Slic3r::SeamPlacerImpl::Frame::to_local ( const Vec3f a) const
inline
87 {
88 return Vec3f(mX.dot(a), mY.dot(a), mZ.dot(a));
89 }

References mX, mY, and mZ.

◆ to_world()

Vec3f Slic3r::SeamPlacerImpl::Frame::to_world ( const Vec3f a) const
inline
83 {
84 return a.x() * mX + a.y() * mY + a.z() * mZ;
85 }

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: