Blender V4.3
slim_matrix_transfer.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include <memory>
12#include <vector>
13
14namespace slim {
15
16struct SLIMData;
17
18typedef std::unique_ptr<SLIMData> SLIMDataPtr;
19
25 int verts_num = 0;
26 int faces_num = 0;
29 int edges_num = 0;
30
32 bool succeeded = false;
33
35 std::vector<double> v_matrices;
37 std::vector<double> uv_matrices;
39 std::vector<double> pp_matrices;
41 std::vector<double> el_vectors;
43 std::vector<float> w_vectors;
44
46 std::vector<int> f_matrices;
48 std::vector<int> p_matrices;
50 std::vector<int> e_matrices;
52 std::vector<int> b_vectors;
53
55
58
61
63
64 void try_slim_solve(int iter_num);
72 void transfer_uvs_blended(float blend);
73 void free_slim_data();
74};
75
77 std::vector<int> pinned_vertex_indices;
78 std::vector<double> pinned_vertex_positions_2D;
79 std::vector<int> selected_pins;
80};
81
83 bool fixed_boundary = false;
84 bool use_weights = false;
85 double weight_influence = 0.0;
87 int n_iterations = 0;
88 bool skip_initialization = false;
89 bool is_minimize_stretch = false;
90
91 std::vector<MatrixTransferChart> charts;
92
95
97 MatrixTransfer(const MatrixTransfer &) = delete;
100
101 void parametrize();
102
105
107 void setup_slim_data(MatrixTransferChart &chart) const;
108};
109
110} // namespace slim
std::unique_ptr< SLIMData > SLIMDataPtr
MatrixTransferChart & operator=(const MatrixTransferChart &)=delete
std::vector< float > w_vectors
std::vector< double > el_vectors
std::vector< double > v_matrices
std::vector< double > uv_matrices
MatrixTransferChart(const MatrixTransferChart &)=delete
MatrixTransferChart(MatrixTransferChart &&)
std::vector< double > pp_matrices
void transfer_uvs_blended(float blend)
void try_slim_solve(int iter_num)
MatrixTransfer(const MatrixTransfer &)=delete
void setup_slim_data(MatrixTransferChart &chart) const
std::vector< MatrixTransferChart > charts
MatrixTransfer & operator=(const MatrixTransfer &)=delete
PinnedVertexData pinned_vertex_data
void parametrize_live(MatrixTransferChart &chart, const PinnedVertexData &pinned_vertex_data)
std::vector< int > selected_pins
std::vector< int > pinned_vertex_indices
std::vector< double > pinned_vertex_positions_2D