1#include "adaptive_skinned_mesh.h"
2#include <cgv/math/ftransform.h>
11 rotation_matrices.clear();
12 for (
const auto& p : pose) {
14 rotation_matrices.push_back(rotate3s(p));
21 joint_locations.resize(joint_regressors.size());
22 std::fill(joint_locations.begin(), joint_locations.end(),
vec3_type(0.0f));
23 for (
unsigned vi = 0; vi < P.size(); ++vi) {
24 for (
size_t ji = 0; ji < joint_regressors.size(); ++ji)
25 joint_locations[ji] += joint_regressors[ji][vi] * P[vi];
32 alternative_joint_regressors.resize(joint_regressors.size());
45 for (
unsigned ji = 1; ji < rotation_matrices.size(); ++ji) {
46 mat3_type PC = rotation_matrices[ji] - cgv::math::identity3<T>();
48 for (
unsigned i = 0; i < 9; ++i)
57 this->apply_blend_shapes(shape, 0,
false, use_parallel_implementation);
58 shaped_positions = this->positions;
59 compute_joint_locations(shaped_positions);
65 std::vector<mat3_type> rotation_matrices;
66 compute_rotation_matrices(pose, rotation_matrices);
68 this->positions = shaped_positions;
69 if (apply_pose_correction)
70 this->apply_blend_shapes(compute_pose_correction_vector(rotation_matrices), nr_shapes,
true, use_parallel_implementation);
72 this->lbs(this->compute_joint_transformations(this->joint_locations, translation, rotation_matrices), lbs_source_mode::position);
73 this->compute_vertex_normals(use_parallel_implementation);
matrix of fixed size dimensions