MCPcopy Create free account
hub / github.com/avaxman/Directional / update_directional_field

Function update_directional_field

tutorial/202_Sampling/main.cpp:29–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28
29void update_directional_field()
30{
31 using namespace Eigen;
32 using namespace std;
33 VectorXd rotationAngles;
34 Eigen::VectorXi presSingIndices;
35 presSingIndices=VectorXi::Zero(field.tb->cycles.rows());
36 for (int i=0;i<singVertices.size();i++)
37 presSingIndices(singVertices[i])=singIndices[i];
38
39 double IPError;
40 Eigen::VectorXi currIndices;
41 directional::index_prescription(presSingIndices,N,globalRotation, field, rotationAngles, IPError);
42
43 if (viewingMode==TRIVIAL_PRINCIPAL_MATCHING)
44 directional::principal_matching(field);
45
46 if (viewingMode==IMPLICIT_FIELD){
47 bc.conservativeResize(b.rows(),3);
48 for (int i=0;i<b.size();i++)
49 bc.row(i)<<field.extField.block(b(i),0,1,3).normalized();
50
51 directional::CartesianField powerField;
52 directional::power_field(ftb, b, bc, Eigen::VectorXd::Constant(b.size(),-1), N,powerField);
53 directional::power_to_raw(powerField, N, field,true);
54 directional::principal_matching(field);
55 }
56
57 viewer.set_cartesian_field(field);
58
59 if (viewingMode==TRIVIAL_ONE_SING)
60 viewer.set_singularities(field, singVertices, singIndices);
61
62 if ((viewingMode==TRIVIAL_PRINCIPAL_MATCHING)||(viewingMode==IMPLICIT_FIELD))
63 viewer.set_singularities(field, field.singLocalCycles, field.singIndices);
64
65}
66
67
68void callbackFunc() {

Callers 2

callbackFuncFunction · 0.85
mainFunction · 0.85

Calls 13

index_prescriptionFunction · 0.85
principal_matchingFunction · 0.85
power_fieldFunction · 0.85
power_to_rawFunction · 0.85
set_cartesian_fieldMethod · 0.80
bFunction · 0.50
rowsMethod · 0.45
sizeMethod · 0.45
conservativeResizeMethod · 0.45
rowMethod · 0.45
normalizedMethod · 0.45
blockMethod · 0.45

Tested by

no test coverage detected