-
Notifications
You must be signed in to change notification settings - Fork 1
/
TetStrainConstraint.h
47 lines (37 loc) · 1.24 KB
/
TetStrainConstraint.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// Created by Josh Wolper on 3/22/18.
//
#ifndef QUIKDEFORM_TETSTRAINCONSTRAINT_H
#define QUIKDEFORM_TETSTRAINCONSTRAINT_H
#include "Eigen/Eigen"
#include "Constraint.h"
#include "SVD.h"
#include <vector>
#include <iostream>
class TetStrainConstraint : public Constraint{
public:
TetStrainConstraint(double weight,
Eigen::MatrixXd sMatrix,
Eigen::VectorXd p,
Eigen::MatrixXd aMatrix,
Eigen::MatrixXd bMatrix,
std::vector<int> indeces,
double volume,
Eigen::MatrixXd dminv)
{
//Set our variables
setW(weight * volume); //now when we multiply by weight we are actually multiplying by weight * volume!! Which is correct I think
setS(sMatrix);
setP(p);
setVolume(volume); //store volume anyway just in case
setIndeces(indeces);
setA(aMatrix);
setB(bMatrix);
setDmInv(dminv);
};
~TetStrainConstraint(){};
// This function should calculate a set of constraint satisfying points in the P matrix
void projectConstraint(Eigen::VectorXd qN_1);
private:
};
#endif //QUIKDEFORM_TETSTRAINCONSTRAINT_H