Back

BarycentricMapperQuadSetTopology

sofa::component::mapping::linear::BarycentricMapperQuadSetTopology
BarycentricMapperTopologyContainer
Doc (from source)

Class allowing barycentric mapping computation on a QuadSetTopology

Abstract (AI generated)

The `BarycentricMapperQuadSetTopology` class facilitates barycentric mapping computations on quad-based topologies in SOFA simulations, managing barycentric coordinates within a specified topology.

Metadata
module
Sofa.Component.Mapping.Linear
namespace
sofa::component::mapping::linear
include
sofa/component/mapping/linear/BarycentricMappers/BarycentricMapperQuadSetTopology.h
inherits
  • BarycentricMapperTopologyContainer
templates
  • sofa::sofa::defaulttype::Vec3Types, sofa::sofa::defaulttype::Vec3Types
description
No maths data.
Methods
int addPointInQuad (const int index, const SReal * baryCoords)
int createPointInQuad (const typename Out::Coord & p, int index, const typename In::VecCoord * points)
int getElements ()
int getBarycentricCoefficients (const int & barycentricCoordinates)
void computeBase (Mat3x3 & base, const typename In::VecCoord & in, const Quad & element)
void computeCenter (Vec3 & center, const typename In::VecCoord & in, const Quad & element)
void computeDistance (SReal & d, const Vec3 & v)
void addPointInElement (const int elementIndex, const SReal * baryCoords)
{
  "name": "BarycentricMapperQuadSetTopology",
  "namespace": "sofa::component::mapping::linear",
  "module": "Sofa.Component.Mapping.Linear",
  "include": "sofa/component/mapping/linear/BarycentricMappers/BarycentricMapperQuadSetTopology.h",
  "doc": "Class allowing barycentric mapping computation on a QuadSetTopology",
  "inherits": [
    "BarycentricMapperTopologyContainer"
  ],
  "templates": [
    "sofa::sofa::defaulttype::Vec3Types, sofa::sofa::defaulttype::Vec3Types"
  ],
  "data_fields": [],
  "links": [],
  "methods": [
    {
      "name": "addPointInQuad",
      "return_type": "int",
      "params": [
        {
          "name": "index",
          "type": "const int"
        },
        {
          "name": "baryCoords",
          "type": "const SReal *"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "createPointInQuad",
      "return_type": "int",
      "params": [
        {
          "name": "p",
          "type": "const typename Out::Coord &"
        },
        {
          "name": "index",
          "type": "int"
        },
        {
          "name": "points",
          "type": "const typename In::VecCoord *"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "getElements",
      "return_type": "int",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "getBarycentricCoefficients",
      "return_type": "int",
      "params": [
        {
          "name": "barycentricCoordinates",
          "type": "const int &"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "computeBase",
      "return_type": "void",
      "params": [
        {
          "name": "base",
          "type": "Mat3x3 &"
        },
        {
          "name": "in",
          "type": "const typename In::VecCoord &"
        },
        {
          "name": "element",
          "type": "const Quad &"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "computeCenter",
      "return_type": "void",
      "params": [
        {
          "name": "center",
          "type": "Vec3 &"
        },
        {
          "name": "in",
          "type": "const typename In::VecCoord &"
        },
        {
          "name": "element",
          "type": "const Quad &"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "computeDistance",
      "return_type": "void",
      "params": [
        {
          "name": "d",
          "type": "SReal &"
        },
        {
          "name": "v",
          "type": "const Vec3 &"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    },
    {
      "name": "addPointInElement",
      "return_type": "void",
      "params": [
        {
          "name": "elementIndex",
          "type": "const int"
        },
        {
          "name": "baryCoords",
          "type": "const SReal *"
        }
      ],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "protected"
    }
  ],
  "description": "The `BarycentricMapperQuadSetTopology` class in the SOFA framework is part of the mapping module and facilitates barycentric mapping computations on quad-based topologies (i.e., Quadrilateral sets). This component inherits from `BarycentricMapperTopologyContainer`, indicating its role in managing barycentric coordinates within a specified topology. It is designed to map points between different representations of geometric models, specifically where the source and target representations are defined by quads (4-sided polygons).\n\nThe class provides methods for adding points inside quadrilaterals (`addPointInQuad`), creating new points based on given positions (`createPointInQuad`), computing the base vectors for transformation matrices (`computeBase`), calculating distances (`computeDistance`), and retrieving elements from a quad set topology container (`getElements`). The `BarycentricMapperQuadSetTopology` class is template-based, allowing flexibility in handling different types of coordinate representations.\n\nThis component interacts with other SOFA components through its inherited methods and interfaces. It typically works alongside topology containers to handle the mapping operations efficiently, supporting multi-resolution models or reduced models that coexist with collision or visualization meshes.",
  "abstract": "The `BarycentricMapperQuadSetTopology` class facilitates barycentric mapping computations on quad-based topologies in SOFA simulations, managing barycentric coordinates within a specified topology.",
  "sheet": "# BarycentricMapperQuadSetTopology\n\n## Overview\nThe `BarycentricMapperQuadSetTopology` is part of the mapping module in SOFA and facilitates barycentric mapping computations on quad-based topologies. It inherits from `BarycentricMapperTopologyContainer`, indicating its role in managing barycentric coordinates within a specified topology.\n\n## Dependencies and Connections\nThis component typically works alongside topology containers to handle mapping operations efficiently, supporting multi-resolution models or reduced models that coexist with collision or visualization meshes.\n\n## Practical Notes\nThe `BarycentricMapperQuadSetTopology` class provides methods for adding points inside quadrilaterals (`addPointInQuad`) and creating new points based on given positions (`createPointInQuad`). It also includes methods to compute base vectors for transformation matrices (`computeBase`), calculate distances (`computeDistance`), and retrieve elements from a quad set topology container (`getElements`)."
}