Back

AttachProjectiveConstraint

The `AttachProjectiveConstraint` is a projective constraint component in the SOFA framework, designed to attach pairs of particles by projecting the positions of one set of particles onto another. This component inherits from `PairInteractionProjectiveConstraintSet`, allowing it to handle interactions between two different models or mechanical states. It supports various data types including rigid and vector types for 2D and 3D spaces. The `AttachProjectiveConstraint` interacts with other SOFA components by utilizing the API methods inherited from its base class, such as `projectJacobianMatrix`, `applyConstraint`, `draw`, and others. These methods enable it to integrate seamlessly into a larger simulation setup where constraints need to be applied between pairs of particles. The component includes several data fields for configuration: - `f_twoWay`: Controls whether the constraint is applied bidirectionally or only from one set to another. - `f_freeRotations`, `f_lastFreeRotation`, and `f_restRotations`: Control the rotational behavior, particularly useful for rigid DOFs. - `f_lastPos` and `f_lastDir`: Define conditions under which the constraint becomes inactive based on positional criteria. - `f_clamp` and `f_minDistance`: Determine how constraints are applied or released based on distance thresholds. - Factors like `d_positionFactor`, `d_velocityFactor`, and `d_responseFactor` adjust the degree of projection for position, velocity, and response (force/acceleration) respectively. The component is initialized with specific mechanical states (`mm1` and `mm2`) and indices for both sets of particles. It reinitializes based on changes in index sizes and enforces constraints using methods like `projectPosition`, `projectVelocity`, and `projectResponse`. These methods ensure that the positions, velocities, and forces are appropriately adjusted according to the specified constraints. Overall, this component is useful for simulating scenarios where precise control over particle interactions is necessary, such as in biomechanical simulations or soft tissue modeling.

abstract
The `AttachProjectiveConstraint` component attaches pairs of particles by projecting positions, velocities, and forces from one set onto another, with configurable bidirectional or unidirectional constraints.
sheet
# AttachProjectiveConstraint ## Overview The `AttachProjectiveConstraint` is a projective constraint component that attaches pairs of particles by projecting the positions, velocities, and forces from one set onto another. It inherits from `PairInteractionProjectiveConstraintSet`, allowing it to handle interactions between two different models or mechanical states. ## Parameters and Data - **f_twoWay**: Controls whether the constraint is applied bidirectionally (`true`) or only from object1 to object2 (`false`). Default: `false`. - **f_freeRotations**: Keeps rotations free for rigid DOFs. Default: `false`. - **f_lastFreeRotation**: Keeps rotation of the last attached point free for rigid DOFs. Default: `false`. - **f_restRotations**: Uses rest rotations local offsets for rigid DOFs. Default: `false`. - **f_lastPos**: Position at which the attach constraint should become inactive. Type: `type::Vec3`. - **f_lastDir**: Direction from `lastPos` at which the attach constraint should become inactive. Type: `type::Vec3`. - **f_clamp**: Clamps particles at `lastPos` instead of freeing them. Default: `false`. - **f_minDistance**: The constraint becomes inactive if the distance between attached points exceeds this value. Type: `Real`. - **d_positionFactor**: Factor applied to projection of position. Type: `Real`. - **d_velocityFactor**: Factor applied to projection of velocity. Type: `Real`. - **d_responseFactor**: Factor applied to projection of force/acceleration. Type: `Real`.
description
The `AttachProjectiveConstraint` is a projective constraint component in the SOFA framework, designed to attach pairs of particles by projecting the positions of one set of particles onto another. This component inherits from `PairInteractionProjectiveConstraintSet`, allowing it to handle interactions between two different models or mechanical states. It supports various data types including rigid and vector types for 2D and 3D spaces. The `AttachProjectiveConstraint` interacts with other SOFA components by utilizing the API methods inherited from its base class, such as `projectJacobianMatrix`, `applyConstraint`, `draw`, and others. These methods enable it to integrate seamlessly into a larger simulation setup where constraints need to be applied between pairs of particles. The component includes several data fields for configuration: - `f_twoWay`: Controls whether the constraint is applied bidirectionally or only from one set to another. - `f_freeRotations`, `f_lastFreeRotation`, and `f_restRotations`: Control the rotational behavior, particularly useful for rigid DOFs. - `f_lastPos` and `f_lastDir`: Define conditions under which the constraint becomes inactive based on positional criteria. - `f_clamp` and `f_minDistance`: Determine how constraints are applied or released based on distance thresholds. - Factors like `d_positionFactor`, `d_velocityFactor`, and `d_responseFactor` adjust the degree of projection for position, velocity, and response (force/acceleration) respectively. The component is initialized with specific mechanical states (`mm1` and `mm2`) and indices for both sets of particles. It reinitializes based on changes in index sizes and enforces constraints using methods like `projectPosition`, `projectVelocity`, and `projectResponse`. These methods ensure that the positions, velocities, and forces are appropriately adjusted according to the specified constraints. Overall, this component is useful for simulating scenarios where precise control over particle interactions is necessary, such as in biomechanical simulations or soft tissue modeling.
answer
<h2>Mathematical and Physical Description of AttachProjectiveConstraint Component</h2> <h3>1. Overview:</h3> The `AttachProjectiveConstraint` is a key component in the SOFA (Simulation Open-Framework Architecture) framework designed to impose constraints between pairs of particles by projecting one set of particle positions onto another. This allows for precise control over interactions and can be used in various simulations, such as biomechanical models or soft tissue modeling. <h3>2. Core Mathematical Principles:</h3> The component operates based on the following key mathematical principles: <h4>a. Position Projection:</h4> - The primary goal is to align the position of one particle set (say, Set B) with another set (Set A). - Mathematically, this involves projecting each particle in Set B onto its corresponding particle in Set A. Let \( extbf{x}_{1,i}^t \) and \( extbf{x}_{2,j}^t \) be the positions of particles from Set A and Set B at time step t. The projection process is defined as: \[ extbf{x}_{1,i}^{t+1} = extbf{x}_{1,i}^t + rac{ ext{positionFactor}}{2} ( extbf{x}_{2,j}^t - extbf{x}_{1,i}^t) \] \[ extbf{x}_{2,j}^{t+1} = extbf{x}_{2,j}^t - rac{ ext{positionFactor}}{2} ( extbf{x}_{2,j}^t - extbf{x}_{1,i}^t) \] Here, `positionFactor` is a scaling factor that determines the degree of projection. <h4>b. Velocity Projection:</h4> - To ensure smooth dynamics, velocities are also adjusted to maintain consistency with the position changes. Let \( extbf{v}_{1,i}^t \) and \( extbf{v}_{2,j}^t \) be the velocities of particles from Set A and Set B at time step t. The projection process for velocities is: \[ extbf{v}_{1,i}^{t+1} = extbf{v}_{1,i}^t + rac{ ext{velocityFactor}}{2} ( extbf{v}_{2,j}^t - extbf{v}_{1,i}^t) \] \[ extbf{v}_{2,j}^{t+1} = extbf{v}_{2,j}^t - rac{ ext{velocityFactor}}{2} ( extbf{v}_{2,j}^t - extbf{v}_{1,i}^t) \] Here, `velocityFactor` is a scaling factor that determines the degree of velocity adjustment. <h4>c. Response (Force/Acceleration) Projection:</h4> - Ensures that forces or accelerations applied to particles are consistent with the positional and velocity changes. Let \( extbf{f}_{1,i}^t \) and \( extbf{f}_{2,j}^t \) be the forces acting on particles from Set A and Set B at time step t. The projection process for responses is: \[ extbf{f}_{1,i}^{t+1} = extbf{f}_{1,i}^t + rac{ ext{responseFactor}}{2} ( extbf{f}_{2,j}^t - extbf{f}_{1,i}^t) \] \[ extbf{f}_{2,j}^{t+1} = extbf{f}_{2,j}^t - rac{ ext{responseFactor}}{2} ( extbf{f}_{2,j}^t - extbf{f}_{1,i}^t) \] Here, `responseFactor` is a scaling factor that determines the degree of response adjustment. <h3>3. Physical Interpretation:</h3> The physical interpretation of these operations can be seen as imposing constraints on the system such that particles in Set B are forced to move closer to their corresponding partners in Set A over time. This constraint enforcement ensures that the relative positions, velocities, and forces between paired particles remain consistent. <h4>a. Two-Way vs One-Way Constraints:</h4> The `f_twoWay` parameter controls whether these constraints are bidirectional (both sets of particles influence each other) or unidirectional (only Set B is adjusted to match Set A). <h4>b. Rotational Degrees of Freedom:</h4> For rigid bodies, the component also allows control over rotational degrees of freedom through parameters like `f_freeRotations`, which can enable or disable rotations around specific axes. <h4>c. Activation Criteria:</h4> The constraints can be activated or deactivated based on positional criteria defined by `f_lastPos` and `f_lastDir`. This is useful for simulations where certain conditions trigger the constraint application. <h3>4. Summary:</h3> The `AttachProjectiveConstraint` component provides a flexible mechanism to enforce constraints between paired particles, ensuring consistency in position, velocity, and response. Its mathematical formulation allows precise control over these interactions, making it an essential tool for various simulation scenarios in SOFA.
{
  "name": "AttachProjectiveConstraint",
  "main": {
    "name": "AttachProjectiveConstraint",
    "namespace": "sofa::component::constraint::projective",
    "module": "Sofa.Component.Constraint.Projective",
    "include": "sofa/component/constraint/projective/AttachProjectiveConstraint.h",
    "doc": "Attach given pair of particles, projecting the positions of the second particles to the first ones.",
    "inherits": [
      "PairInteractionProjectiveConstraintSet"
    ],
    "templates": [
      "sofa::defaulttype::Rigid2Types",
      "sofa::defaulttype::Rigid3Types",
      "sofa::defaulttype::Vec3Types"
    ],
    "data_fields": [
      {
        "name": "f_twoWay",
        "type": "bool",
        "xmlname": "twoWay",
        "help": "if true, projects the constraint vertices of both object1 and object2 towards their average degrees of freedom and derivatives. If false, the position of the object1 are projected onto the object2. Therefore, object2 only follows object1 without affecting the motion of object1"
      },
      {
        "name": "f_freeRotations",
        "type": "bool",
        "xmlname": "freeRotations",
        "help": "true to keep rotations free (only used for Rigid DOFs)"
      },
      {
        "name": "f_lastFreeRotation",
        "type": "bool",
        "xmlname": "lastFreeRotation",
        "help": "true to keep rotation of the last attached point free (only used for Rigid DOFs)"
      },
      {
        "name": "f_restRotations",
        "type": "bool",
        "xmlname": "restRotations",
        "help": "true to use rest rotations local offsets (only used for Rigid DOFs)"
      },
      {
        "name": "f_lastPos",
        "type": "type::Vec3",
        "xmlname": "lastPos",
        "help": "position at which the attach constraint should become inactive"
      },
      {
        "name": "f_lastDir",
        "type": "type::Vec3",
        "xmlname": "lastDir",
        "help": "direction from lastPos at which the attach coustraint should become inactive"
      },
      {
        "name": "f_clamp",
        "type": "bool",
        "xmlname": "clamp",
        "help": "true to clamp particles at lastPos instead of freeing them."
      },
      {
        "name": "f_minDistance",
        "type": "Real",
        "xmlname": "minDistance",
        "help": "the constraint become inactive if the distance between the points attached is bigger than minDistance."
      },
      {
        "name": "d_positionFactor",
        "type": "Real",
        "xmlname": "positionFactor",
        "help": "IN: Factor applied to projection of position"
      },
      {
        "name": "d_velocityFactor",
        "type": "Real",
        "xmlname": "velocityFactor",
        "help": "IN: Factor applied to projection of velocity"
      },
      {
        "name": "d_responseFactor",
        "type": "Real",
        "xmlname": "responseFactor",
        "help": "IN: Factor applied to projection of force/acceleration"
      }
    ],
    "links": [],
    "methods": [
      {
        "name": "init",
        "return_type": "void",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "reinit",
        "return_type": "void",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "draw",
        "return_type": "void",
        "params": [
          {
            "name": "vparams",
            "type": "const core::visual::VisualParams *"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "projectJacobianMatrix",
        "return_type": "void",
        "params": [
          {
            "name": "mparams",
            "type": "const core::MechanicalParams *"
          },
          {
            "name": "cId",
            "type": "core::MultiMatrixDerivId"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "projectResponse",
        "return_type": "void",
        "params": [
          {
            "name": "mparams",
            "type": "const core::MechanicalParams *"
          },
          {
            "name": "dx1",
            "type": "DataVecDeriv &"
          },
          {
            "name": "dx2",
            "type": "DataVecDeriv &"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "projectVelocity",
        "return_type": "void",
        "params": [
          {
            "name": "mparams",
            "type": "const core::MechanicalParams *"
          },
          {
            "name": "v1",
            "type": "DataVecDeriv &"
          },
          {
            "name": "v2",
            "type": "DataVecDeriv &"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "projectPosition",
        "return_type": "void",
        "params": [
          {
            "name": "mparams",
            "type": "const core::MechanicalParams *"
          },
          {
            "name": "x1",
            "type": "DataVecCoord &"
          },
          {
            "name": "x2",
            "type": "DataVecCoord &"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "applyConstraint",
        "return_type": "void",
        "params": [
          {
            "name": "mparams",
            "type": "const core::MechanicalParams *"
          },
          {
            "name": "matrix",
            "type": "const sofa::core::behavior::MultiMatrixAccessor *"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "applyConstraint",
        "return_type": "void",
        "params": [
          {
            "name": "mparams",
            "type": "const core::MechanicalParams *"
          },
          {
            "name": "vector",
            "type": "linearalgebra::BaseVector *"
          },
          {
            "name": "matrix",
            "type": "const sofa::core::behavior::MultiMatrixAccessor *"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "applyConstraint",
        "return_type": "void",
        "params": [
          {
            "name": "matrix",
            "type": "sofa::core::behavior::ZeroDirichletCondition *"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "reinitIfChanged",
        "return_type": "void",
        "params": [],
        "is_virtual": true,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "templateName",
        "return_type": "int",
        "params": [
          {
            "name": "ptr",
            "type": "const T *"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": true,
        "access": "public"
      },
      {
        "name": "getConstraintFactor",
        "return_type": "const Real",
        "params": [
          {
            "name": "index",
            "type": "const int"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "doProjectPosition",
        "return_type": "void",
        "params": [
          {
            "name": "x1",
            "type": "Coord &"
          },
          {
            "name": "x2",
            "type": "Coord &"
          },
          {
            "name": "freeRotations",
            "type": "bool"
          },
          {
            "name": "index",
            "type": "unsigned int"
          },
          {
            "name": "positionFactor",
            "type": "Real"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "doProjectVelocity",
        "return_type": "void",
        "params": [
          {
            "name": "x1",
            "type": "Deriv &"
          },
          {
            "name": "x2",
            "type": "Deriv &"
          },
          {
            "name": "freeRotations",
            "type": "bool"
          },
          {
            "name": "index",
            "type": "unsigned int"
          },
          {
            "name": "velocityFactor",
            "type": "Real"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "doProjectResponse",
        "return_type": "void",
        "params": [
          {
            "name": "dx1",
            "type": "Deriv &"
          },
          {
            "name": "dx2",
            "type": "Deriv &"
          },
          {
            "name": "freeRotations",
            "type": "bool"
          },
          {
            "name": "twoway",
            "type": "bool"
          },
          {
            "name": "index",
            "type": "unsigned int"
          },
          {
            "name": "responseFactor",
            "type": "Real"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "calcRestRotations",
        "return_type": "void",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "protected"
      },
      {
        "name": "DerivConstrainedSize",
        "return_type": "unsigned int",
        "params": [
          {
            "name": "freeRotations",
            "type": "bool"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": true,
        "access": "protected"
      }
    ]
  },
  "desc": {
    "description": "The `AttachProjectiveConstraint` is a projective constraint component in the SOFA framework, designed to attach pairs of particles by projecting the positions of one set of particles onto another. This component inherits from `PairInteractionProjectiveConstraintSet`, allowing it to handle interactions between two different models or mechanical states. It supports various data types including rigid and vector types for 2D and 3D spaces.\n\nThe `AttachProjectiveConstraint` interacts with other SOFA components by utilizing the API methods inherited from its base class, such as `projectJacobianMatrix`, `applyConstraint`, `draw`, and others. These methods enable it to integrate seamlessly into a larger simulation setup where constraints need to be applied between pairs of particles.\n\nThe component includes several data fields for configuration:\n- `f_twoWay`: Controls whether the constraint is applied bidirectionally or only from one set to another.\n- `f_freeRotations`, `f_lastFreeRotation`, and `f_restRotations`: Control the rotational behavior, particularly useful for rigid DOFs.\n- `f_lastPos` and `f_lastDir`: Define conditions under which the constraint becomes inactive based on positional criteria.\n- `f_clamp` and `f_minDistance`: Determine how constraints are applied or released based on distance thresholds.\n- Factors like `d_positionFactor`, `d_velocityFactor`, and `d_responseFactor` adjust the degree of projection for position, velocity, and response (force/acceleration) respectively.\n\nThe component is initialized with specific mechanical states (`mm1` and `mm2`) and indices for both sets of particles. It reinitializes based on changes in index sizes and enforces constraints using methods like `projectPosition`, `projectVelocity`, and `projectResponse`. These methods ensure that the positions, velocities, and forces are appropriately adjusted according to the specified constraints.\n\nOverall, this component is useful for simulating scenarios where precise control over particle interactions is necessary, such as in biomechanical simulations or soft tissue modeling."
  },
  "maths": {
    "answer": "<h2>Mathematical and Physical Description of AttachProjectiveConstraint Component</h2>\n\n<h3>1. Overview:</h3>\nThe `AttachProjectiveConstraint` is a key component in the SOFA (Simulation Open-Framework Architecture) framework designed to impose constraints between pairs of particles by projecting one set of particle positions onto another. This allows for precise control over interactions and can be used in various simulations, such as biomechanical models or soft tissue modeling.\n\n<h3>2. Core Mathematical Principles:</h3>\nThe component operates based on the following key mathematical principles:\n\n<h4>a. Position Projection:</h4>\n- The primary goal is to align the position of one particle set (say, Set B) with another set (Set A).\n- Mathematically, this involves projecting each particle in Set B onto its corresponding particle in Set A.\n\nLet \\( \textbf{x}_{1,i}^t \\) and \\( \textbf{x}_{2,j}^t \\) be the positions of particles from Set A and Set B at time step t. The projection process is defined as:\n\\[\n    \textbf{x}_{1,i}^{t+1} = \textbf{x}_{1,i}^t + \frac{\text{positionFactor}}{2} (\textbf{x}_{2,j}^t - \textbf{x}_{1,i}^t)\n\\]\n\\[\n    \textbf{x}_{2,j}^{t+1} = \textbf{x}_{2,j}^t - \frac{\text{positionFactor}}{2} (\textbf{x}_{2,j}^t - \textbf{x}_{1,i}^t)\n\\]\n\nHere, `positionFactor` is a scaling factor that determines the degree of projection.\n\n<h4>b. Velocity Projection:</h4>\n- To ensure smooth dynamics, velocities are also adjusted to maintain consistency with the position changes.\n\nLet \\( \textbf{v}_{1,i}^t \\) and \\( \textbf{v}_{2,j}^t \\) be the velocities of particles from Set A and Set B at time step t. The projection process for velocities is:\n\\[\n    \textbf{v}_{1,i}^{t+1} = \textbf{v}_{1,i}^t + \frac{\text{velocityFactor}}{2} (\textbf{v}_{2,j}^t - \textbf{v}_{1,i}^t)\n\\]\n\\[\n    \textbf{v}_{2,j}^{t+1} = \textbf{v}_{2,j}^t - \frac{\text{velocityFactor}}{2} (\textbf{v}_{2,j}^t - \textbf{v}_{1,i}^t)\n\\]\n\nHere, `velocityFactor` is a scaling factor that determines the degree of velocity adjustment.\n\n<h4>c. Response (Force/Acceleration) Projection:</h4>\n- Ensures that forces or accelerations applied to particles are consistent with the positional and velocity changes.\n\nLet \\( \textbf{f}_{1,i}^t \\) and \\( \textbf{f}_{2,j}^t \\) be the forces acting on particles from Set A and Set B at time step t. The projection process for responses is:\n\\[\n    \textbf{f}_{1,i}^{t+1} = \textbf{f}_{1,i}^t + \frac{\text{responseFactor}}{2} (\textbf{f}_{2,j}^t - \textbf{f}_{1,i}^t)\n\\]\n\\[\n    \textbf{f}_{2,j}^{t+1} = \textbf{f}_{2,j}^t - \frac{\text{responseFactor}}{2} (\textbf{f}_{2,j}^t - \textbf{f}_{1,i}^t)\n\\]\n\nHere, `responseFactor` is a scaling factor that determines the degree of response adjustment.\n\n<h3>3. Physical Interpretation:</h3>\nThe physical interpretation of these operations can be seen as imposing constraints on the system such that particles in Set B are forced to move closer to their corresponding partners in Set A over time. This constraint enforcement ensures that the relative positions, velocities, and forces between paired particles remain consistent.\n\n<h4>a. Two-Way vs One-Way Constraints:</h4>\nThe `f_twoWay` parameter controls whether these constraints are bidirectional (both sets of particles influence each other) or unidirectional (only Set B is adjusted to match Set A).\n\n<h4>b. Rotational Degrees of Freedom:</h4>\nFor rigid bodies, the component also allows control over rotational degrees of freedom through parameters like `f_freeRotations`, which can enable or disable rotations around specific axes.\n\n<h4>c. Activation Criteria:</h4>\nThe constraints can be activated or deactivated based on positional criteria defined by `f_lastPos` and `f_lastDir`. This is useful for simulations where certain conditions trigger the constraint application.\n\n<h3>4. Summary:</h3>\nThe `AttachProjectiveConstraint` component provides a flexible mechanism to enforce constraints between paired particles, ensuring consistency in position, velocity, and response. Its mathematical formulation allows precise control over these interactions, making it an essential tool for various simulation scenarios in SOFA."
  },
  "summary": {
    "abstract": "The `AttachProjectiveConstraint` component attaches pairs of particles by projecting positions, velocities, and forces from one set onto another, with configurable bidirectional or unidirectional constraints.",
    "sheet": "\n# AttachProjectiveConstraint\n\n## Overview\n\nThe `AttachProjectiveConstraint` is a projective constraint component that attaches pairs of particles by projecting the positions, velocities, and forces from one set onto another. It inherits from `PairInteractionProjectiveConstraintSet`, allowing it to handle interactions between two different models or mechanical states.\n\n## Parameters and Data\n\n- **f_twoWay**: Controls whether the constraint is applied bidirectionally (`true`) or only from object1 to object2 (`false`). Default: `false`.\n- **f_freeRotations**: Keeps rotations free for rigid DOFs. Default: `false`.\n- **f_lastFreeRotation**: Keeps rotation of the last attached point free for rigid DOFs. Default: `false`.\n- **f_restRotations**: Uses rest rotations local offsets for rigid DOFs. Default: `false`.\n- **f_lastPos**: Position at which the attach constraint should become inactive. Type: `type::Vec3`.\n- **f_lastDir**: Direction from `lastPos` at which the attach constraint should become inactive. Type: `type::Vec3`.\n- **f_clamp**: Clamps particles at `lastPos` instead of freeing them. Default: `false`.\n- **f_minDistance**: The constraint becomes inactive if the distance between attached points exceeds this value. Type: `Real`.\n- **d_positionFactor**: Factor applied to projection of position. Type: `Real`.\n- **d_velocityFactor**: Factor applied to projection of velocity. Type: `Real`.\n- **d_responseFactor**: Factor applied to projection of force/acceleration. Type: `Real`."
  }
}