7 #include "imstkLinearProjectionConstraint.h" 11 LinearProjectionConstraint::
12 LinearProjectionConstraint(
const size_t& nodeId,
13 const bool isFixed ) :
14 m_isFixedConstraint(false),
15 m_projection(Mat3d::Identity()),
16 m_value(Vec3d(0., 0., 0.))
21 m_projection = Mat3d::Zero();
22 m_isFixedConstraint =
true;
30 m_projection = Mat3d::Identity() - p * p.transpose() - q * q.transpose();
37 auto v = p / p.norm();
38 m_projection = v * v.transpose();
45 m_projection = Mat3d::Zero();
46 m_isFixedConstraint =
true;
53 m_projection = Mat3d::Identity();
54 m_value = Vec3d(0.0, 0.0, 0.0);
void setProjectionToLine(const size_t &nodeId, const Vec3d &p)
Form the projection.
void setProjectorToDirichlet(const size_t &nodeId)
Set the projector to simulate Dirichlet conditions.
void setProjection(const size_t &nodeId, const Vec3d &p, const Vec3d &q=Vec3d::Zero())
Form the projection.
void reset()
Reset the linear projector.