|
ShapeOp
0.1.0
|
Angle range constraint. Constrains the angle between the two lines formed by three points to a range. See [3] for more details. More...
#include <Constraint.h>
Public Member Functions | |
| AngleConstraint (const std::vector< int > &idI, Scalar weight, const Matrix3X &positions, Scalar minAngle=0.0, Scalar maxAngle=M_PI) | |
| Constraint constructor. More... | |
| virtual void | project (const Matrix3X &positions, Matrix3X &projections) const overridefinal |
| Find the closest configuration from the input positions that satisfy the angle constraint. | |
| virtual void | addConstraint (std::vector< Triplet > &triplets, int &idO) const overridefinal |
| Add the constraint to the linear system. | |
| void | setMinAngle (Scalar minAngle) |
| Set a new minimum angle (in radian). | |
| void | setMaxAngle (Scalar maxAngle) |
| Set a new maximum angle (in radian). | |
Public Member Functions inherited from ShapeOp::Constraint | |
| 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. | |
Additional Inherited Members | |
Static Public Member Functions inherited from ShapeOp::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... | |
Protected Attributes inherited from ShapeOp::Constraint | |
| 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. | |
Angle range constraint. Constrains the angle between the two lines formed by three points to a range. See [3] for more details.
| SHAPEOP_INLINE ShapeOp::AngleConstraint::AngleConstraint | ( | const std::vector< int > & | idI, |
| Scalar | weight, | ||
| const Matrix3X & | positions, | ||
| Scalar | minAngle = 0.0, |
||
| Scalar | maxAngle = M_PI |
||
| ) |
Constraint constructor.
| idI | are three indices of the vertices [v0,v1,v2]. The constrained angle is the one spanned between v1-v0 and v2-v0: | id0 | | / | | | / | | | id1 id2 | |
| 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. |
| minAngle | The minimum angle (in radian, between 0 and PI). |
| maxAngle | The maximum angle (in radian, between 0 and PI). |
1.8.9.1