Back

BarycentricContactMapper

The `BarycentricContactMapper` is a base class for all contact mappers using BarycentricMapping in the SOFA framework. It inherits from `BaseContactMapper` and specializes in handling collision models involving lines and triangles. This mapper is designed to map mechanical states between different levels of detail or resolutions, typically used in simulations where high-resolution collision detection needs to be mapped onto lower-resolution mechanical models for computational efficiency. The component interacts with other SOFA components through its API methods: - `setCollisionModel`: Sets the collision model that this mapper will use. - `cleanup`: Cleans up resources associated with the mapping, such as detaching and deleting child nodes in the scenegraph. - `createMapping`: Creates a new mechanical state for contact points. - `resize`, `update`, `updateXfree`, `updateX0`: Update methods that handle the transformation of positions, velocities, and rest positions between different levels of detail. The component is used in conjunction with collision models like `LineCollisionModel` and `TriangleCollisionModel`. It ensures that contact points are correctly mapped to the underlying mechanical states using barycentric coordinates. The mapper supports both triangles and quads for more complex geometries, providing methods for adding contact points based on geometric properties.

abstract
The BarycentricContactMapper maps mechanical states between different levels of detail or resolutions using barycentric coordinates for collision models involving lines and triangles.
sheet
# BarycentricContactMapper ## Overview The `BarycentricContactMapper` is a base class for all contact mappers that use BarycentricMapping in the SOFA framework. It specializes in handling collision models involving lines and triangles, mapping mechanical states between different levels of detail or resolutions to ensure computational efficiency while maintaining accurate contact detection. ## Dependencies and Connections The `BarycentricContactMapper` typically requires a collision model (e.g., `LineCollisionModel`, `TriangleCollisionModel`) and interacts with other SOFA components through its API methods. It is used in conjunction with these models to map contact points correctly using barycentric coordinates, ensuring that the mechanical states are accurately transformed between different levels of detail.
description
The `BarycentricContactMapper` is a base class for all contact mappers using BarycentricMapping in the SOFA framework. It inherits from `BaseContactMapper` and specializes in handling collision models involving lines and triangles. This mapper is designed to map mechanical states between different levels of detail or resolutions, typically used in simulations where high-resolution collision detection needs to be mapped onto lower-resolution mechanical models for computational efficiency. The component interacts with other SOFA components through its API methods: - `setCollisionModel`: Sets the collision model that this mapper will use. - `cleanup`: Cleans up resources associated with the mapping, such as detaching and deleting child nodes in the scenegraph. - `createMapping`: Creates a new mechanical state for contact points. - `resize`, `update`, `updateXfree`, `updateX0`: Update methods that handle the transformation of positions, velocities, and rest positions between different levels of detail. The component is used in conjunction with collision models like `LineCollisionModel` and `TriangleCollisionModel`. It ensures that contact points are correctly mapped to the underlying mechanical states using barycentric coordinates. The mapper supports both triangles and quads for more complex geometries, providing methods for adding contact points based on geometric properties.
response
The `BarycentricContactMapper` is a sophisticated tool within the SOFA (Simulation Open-Framework Architecture) framework used primarily to manage interactions between collision detection and mechanical models in simulations, particularly focusing on mapping barycentric coordinates from high-resolution geometries onto lower-resolution mechanical representations. This process is essential for maintaining computational efficiency while ensuring accurate physical simulation behavior.
{
  "name": "BarycentricContactMapper",
  "main": {
    "name": "BarycentricContactMapper",
    "namespace": "sofa::component::collision::response::mapper",
    "module": "Sofa.Component.Collision.Response.Mapper",
    "include": "sofa/component/collision/response/mapper/BarycentricContactMapper.h",
    "doc": "Base class for all mappers using BarycentricMapping",
    "inherits": [
      "BaseContactMapper"
    ],
    "templates": [],
    "data_fields": [],
    "links": [],
    "methods": [
      {
        "name": "setCollisionModel",
        "return_type": "void",
        "params": [
          {
            "name": "model",
            "type": "MCollisionModel *"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "cleanup",
        "return_type": "void",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "createMapping",
        "return_type": "MMechanicalState *",
        "params": [
          {
            "name": "name",
            "type": "const char *"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "resize",
        "return_type": "void",
        "params": [
          {
            "name": "size",
            "type": "int"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "update",
        "return_type": "void",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "updateXfree",
        "return_type": "void",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "updateX0",
        "return_type": "void",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      }
    ]
  },
  "desc": {
    "description": "The `BarycentricContactMapper` is a base class for all contact mappers using BarycentricMapping in the SOFA framework. It inherits from `BaseContactMapper` and specializes in handling collision models involving lines and triangles. This mapper is designed to map mechanical states between different levels of detail or resolutions, typically used in simulations where high-resolution collision detection needs to be mapped onto lower-resolution mechanical models for computational efficiency.\n\nThe component interacts with other SOFA components through its API methods:\n- `setCollisionModel`: Sets the collision model that this mapper will use.\n- `cleanup`: Cleans up resources associated with the mapping, such as detaching and deleting child nodes in the scenegraph.\n- `createMapping`: Creates a new mechanical state for contact points.\n- `resize`, `update`, `updateXfree`, `updateX0`: Update methods that handle the transformation of positions, velocities, and rest positions between different levels of detail.\n\nThe component is used in conjunction with collision models like `LineCollisionModel` and `TriangleCollisionModel`. It ensures that contact points are correctly mapped to the underlying mechanical states using barycentric coordinates. The mapper supports both triangles and quads for more complex geometries, providing methods for adding contact points based on geometric properties."
  },
  "maths": {
    "response": "The `BarycentricContactMapper` is a sophisticated tool within the SOFA (Simulation Open-Framework Architecture) framework used primarily to manage interactions between collision detection and mechanical models in simulations, particularly focusing on mapping barycentric coordinates from high-resolution geometries onto lower-resolution mechanical representations. This process is essential for maintaining computational efficiency while ensuring accurate physical simulation behavior."
  },
  "summary": {
    "abstract": "The BarycentricContactMapper maps mechanical states between different levels of detail or resolutions using barycentric coordinates for collision models involving lines and triangles.",
    "sheet": "\n# BarycentricContactMapper\n\n## Overview\n\nThe `BarycentricContactMapper` is a base class for all contact mappers that use BarycentricMapping in the SOFA framework. It specializes in handling collision models involving lines and triangles, mapping mechanical states between different levels of detail or resolutions to ensure computational efficiency while maintaining accurate contact detection.\n\n## Dependencies and Connections\n\nThe `BarycentricContactMapper` typically requires a collision model (e.g., `LineCollisionModel`, `TriangleCollisionModel`) and interacts with other SOFA components through its API methods. It is used in conjunction with these models to map contact points correctly using barycentric coordinates, ensuring that the mechanical states are accurately transformed between different levels of detail."
  }
}