Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
igl::CombLine< DerivedV, DerivedF > Class Template Reference
+ Collaboration diagram for igl::CombLine< DerivedV, DerivedF >:

Public Member Functions

 CombLine (const Eigen::PlainObjectBase< DerivedV > &_V, const Eigen::PlainObjectBase< DerivedF > &_F, const Eigen::PlainObjectBase< DerivedV > &_PD1)
 
void comb (Eigen::PlainObjectBase< DerivedV > &PD1out)
 

Public Attributes

const Eigen::PlainObjectBase< DerivedV > & V
 
const Eigen::PlainObjectBase< DerivedF > & F
 
const Eigen::PlainObjectBase< DerivedV > & PD1
 
DerivedV N
 

Static Private Member Functions

static double Sign (double a)
 
static Eigen::Matrix< typename DerivedV::Scalar, 3, 1 > K_PI_line (const Eigen::Matrix< typename DerivedV::Scalar, 3, 1 > &a, const Eigen::Matrix< typename DerivedV::Scalar, 3, 1 > &b)
 

Private Attributes

DerivedF TT
 
DerivedF TTi
 

Detailed Description

template<typename DerivedV, typename DerivedF>
class igl::CombLine< DerivedV, DerivedF >

Constructor & Destructor Documentation

◆ CombLine()

template<typename DerivedV , typename DerivedF >
igl::CombLine< DerivedV, DerivedF >::CombLine ( const Eigen::PlainObjectBase< DerivedV > &  _V,
const Eigen::PlainObjectBase< DerivedF > &  _F,
const Eigen::PlainObjectBase< DerivedV > &  _PD1 
)
inline
62 :
63 V(_V),
64 F(_F),
65 PD1(_PD1)
66 {
69 }
const Eigen::PlainObjectBase< DerivedF > & F
Definition comb_line_field.cpp:26
DerivedF TTi
Definition comb_line_field.cpp:33
DerivedV N
Definition comb_line_field.cpp:28
const Eigen::PlainObjectBase< DerivedV > & PD1
Definition comb_line_field.cpp:27
const Eigen::PlainObjectBase< DerivedV > & V
Definition comb_line_field.cpp:25
DerivedF TT
Definition comb_line_field.cpp:32
IGL_INLINE void per_face_normals(const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, const Eigen::MatrixBase< DerivedZ > &Z, Eigen::PlainObjectBase< DerivedN > &N)
Definition per_face_normals.cpp:13
IGL_INLINE void triangle_triangle_adjacency(const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedTT > &TT, Eigen::PlainObjectBase< DerivedTTi > &TTi)
Definition triangle_triangle_adjacency.cpp:116

References igl::CombLine< DerivedV, DerivedF >::F, igl::CombLine< DerivedV, DerivedF >::N, igl::per_face_normals(), igl::triangle_triangle_adjacency(), igl::CombLine< DerivedV, DerivedF >::TT, igl::CombLine< DerivedV, DerivedF >::TTi, and igl::CombLine< DerivedV, DerivedF >::V.

+ Here is the call graph for this function:

Member Function Documentation

◆ comb()

template<typename DerivedV , typename DerivedF >
void igl::CombLine< DerivedV, DerivedF >::comb ( Eigen::PlainObjectBase< DerivedV > &  PD1out)
inline
72 {
73 PD1out.setZero(F.rows(),3);PD1out<<PD1;
74
75 Eigen::VectorXi mark = Eigen::VectorXi::Constant(F.rows(),false);
76
77 std::deque<int> d;
78
79 d.push_back(0);
80 mark(0) = true;
81
82 while (!d.empty())
83 {
84 int f0 = d.at(0);
85 d.pop_front();
86 for (int k=0; k<3; k++)
87 {
88 int f1 = TT(f0,k);
89 if (f1==-1) continue;
90 if (mark(f1)) continue;
91
96
98 dir0Rot.normalize();
100
101 PD1out.row(f1) = targD;
102 //PD2out.row(f1) = n1.cross(targD).normalized();
103
104 mark(f1) = true;
105 d.push_back(f1);
106
107 }
108 }
109
110 // everything should be marked
111 for (int i=0; i<F.rows(); i++)
112 {
113 assert(mark(i));
114 }
115 }
The matrix class, also used for vectors and row-vectors.
Definition Matrix.h:180
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rows() const
Definition PlainObjectBase.h:151
EIGEN_DEVICE_FUNC Derived & setZero(Index size)
Definition CwiseNullaryOp.h:515
static Eigen::Matrix< typename DerivedV::Scalar, 3, 1 > K_PI_line(const Eigen::Matrix< typename DerivedV::Scalar, 3, 1 > &a, const Eigen::Matrix< typename DerivedV::Scalar, 3, 1 > &b)
Definition comb_line_field.cpp:46
IGL_INLINE Eigen::Matrix< Scalar, 3, 3 > rotation_matrix_from_directions(const Eigen::Matrix< Scalar, 3, 1 > v0, const Eigen::Matrix< Scalar, 3, 1 > v1)
Definition rotation_matrix_from_directions.cpp:14

References igl::CombLine< DerivedV, DerivedF >::F, igl::CombLine< DerivedV, DerivedF >::K_PI_line(), igl::CombLine< DerivedV, DerivedF >::N, igl::CombLine< DerivedV, DerivedF >::PD1, igl::rotation_matrix_from_directions(), Eigen::PlainObjectBase< Derived >::rows(), Eigen::PlainObjectBase< Derived >::setZero(), and igl::CombLine< DerivedV, DerivedF >::TT.

Referenced by igl::comb_line_field().

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

◆ K_PI_line()

template<typename DerivedV , typename DerivedF >
static Eigen::Matrix< typename DerivedV::Scalar, 3, 1 > igl::CombLine< DerivedV, DerivedF >::K_PI_line ( const Eigen::Matrix< typename DerivedV::Scalar, 3, 1 > &  a,
const Eigen::Matrix< typename DerivedV::Scalar, 3, 1 > &  b 
)
inlinestaticprivate
48 {
49 typename DerivedV::Scalar scorea = a.dot(b);
50 if (scorea<0)
51 return -a;
52 else
53 return a;
54 }

Referenced by igl::CombLine< DerivedV, DerivedF >::comb().

+ Here is the caller graph for this function:

◆ Sign()

template<typename DerivedV , typename DerivedF >
static double igl::CombLine< DerivedV, DerivedF >::Sign ( double  a)
inlinestaticprivate
39{return (double)((a>0)?+1:-1);}

Member Data Documentation

◆ F

template<typename DerivedV , typename DerivedF >
const Eigen::PlainObjectBase<DerivedF>& igl::CombLine< DerivedV, DerivedF >::F

◆ N

template<typename DerivedV , typename DerivedF >
DerivedV igl::CombLine< DerivedV, DerivedF >::N

◆ PD1

template<typename DerivedV , typename DerivedF >
const Eigen::PlainObjectBase<DerivedV>& igl::CombLine< DerivedV, DerivedF >::PD1

◆ TT

template<typename DerivedV , typename DerivedF >
DerivedF igl::CombLine< DerivedV, DerivedF >::TT
private

◆ TTi

template<typename DerivedV , typename DerivedF >
DerivedF igl::CombLine< DerivedV, DerivedF >::TTi
private

◆ V

template<typename DerivedV , typename DerivedF >
const Eigen::PlainObjectBase<DerivedV>& igl::CombLine< DerivedV, DerivedF >::V

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