Similarity or Rigid constraint. Perserves the relative location of a set of vertices. See [1] for more details.
More...
#include <Constraint.h>
|
| | SimilarityConstraint (const std::vector< int > &idI, Scalar weight, const Matrix3X &positions, bool scaling=true, bool rotate=true, bool flip=true) |
| | Constraint constructor. By default the shape to match is given by the initial positions of the vertices involved. More...
|
| |
|
virtual void | project (const Matrix3X &positions, Matrix3X &projections) const overridefinal |
| | Find the closest configuration from the input positions that satisfy the constraint.
|
| |
|
virtual void | addConstraint (std::vector< Triplet > &triplets, int &idO) const overridefinal |
| | Add the constraint to the linear system.
|
| |
| void | setShapes (const std::vector< Matrix3X > &shapes) |
| | A set of new shapes to match to. The SimilarityConstraint will choose and project onto the closest. More...
|
| |
| | Constraint (const std::vector< int > &idI, Scalar weight) |
| | Constraint constructor. More...
|
| |
|
std::size_t | nIndices () const |
| | Number of indices of vertices involved in the constraint.
|
| |
|
| static std::shared_ptr< Constraint > | shapeConstraintFactory (const std::string &ConstraintType, const std::vector< int > &idI, Scalar weight, const Matrix3X &positions) |
| | Creates a constraint from a string type, a number of indices, a weight and the initial point positions. More...
|
| |
|
std::vector< int > | idI_ |
| | ids of the vertices involved in this constraint.
|
| |
|
Scalar | weight_ |
| | weight for the constraint.
|
| |
|
int | idO_ |
| | location of this constraint in the linear system.
|
| |
Similarity or Rigid constraint. Perserves the relative location of a set of vertices. See [1] for more details.
| SHAPEOP_INLINE ShapeOp::SimilarityConstraint::SimilarityConstraint |
( |
const std::vector< int > & |
idI, |
|
|
Scalar |
weight, |
|
|
const Matrix3X & |
positions, |
|
|
bool |
scaling = true, |
|
|
bool |
rotate = true, |
|
|
bool |
flip = true |
|
) |
| |
Constraint constructor. By default the shape to match is given by the initial positions of the vertices involved.
- Parameters
-
| idI | A vector of indices of the vertices to be constrained. |
| weight | The weight of the constraint to be added relative to the other constraints. |
| positions | The positions of all the n vertices stacked in a 3 by n matrix. |
| scaling | If true, the matching is only up to scale, if false not. |
| rotate | If true the constraint minimizes over all possible rotations of the matchings. |
| flip | If true the constraint minimizes by also flipping the matchings. |
A set of new shapes to match to. The SimilarityConstraint will choose and project onto the closest.
- Parameters
-
| shapes | a vector of shapes. Each shape consists of a 3*nIndices() Matrix representing a set of points. |
The documentation for this class was generated from the following files: