Back

CenterPointTopologicalMapping

The `CenterPointTopologicalMapping` component is part of the SOFA framework and resides in the `sofa::component::topology::mapping` namespace within the module `Sofa.Component.Topology.Mapping`. This component implements a topological mapping where each primitive (e.g., hexahedra) from an input topology (any MeshTopology) is mapped to a single point in an output PointSetTopology. The primary role of this component is to transform higher-dimensional primitives into points, enabling the representation and manipulation of complex geometries as simpler point sets. `CenterPointTopologicalMapping` inherits from `TopologicalMapping`, which provides methods for initializing (`init`) and updating (`updateTopologicalMappingTopDown`). The initialization method ensures that the output topology (point set) is resized based on the number of primitives in the input topology. During updates, it handles changes such as adding or removing points according to topological modifications in the input model. The component includes methods `getGlobIndex` and `getFromIndex`, which return the global index and source index respectively for a given primitive index. These methods are used for mapping indices between the input and output topologies. This component is useful when you need to simplify complex geometrical models into point sets, enabling easier interaction or visualization while preserving key structural information.

abstract
The `CenterPointTopologicalMapping` maps each primitive from an input MeshTopology onto a single point in an output PointSetTopology, simplifying complex geometrical models for easier interaction and visualization while preserving structural information.
sheet
# CenterPointTopologicalMapping ## Overview The `CenterPointTopologicalMapping` is a topological mapping component that maps each primitive from an input MeshTopology onto a single point in an output PointSetTopology. This simplification facilitates easier interaction and visualization of complex geometrical models while preserving essential structural information. The component inherits from the `TopologicalMapping` class, providing methods for initialization (`init`) and updating (`updateTopologicalMappingTopDown`). ## Parameters and Data The `CenterPointTopologicalMapping` does not expose any significant data fields or parameters that control its behavior beyond what is inherited from its parent classes. The primary functionality is provided through the mapping process, which simplifies complex geometries into point sets.
description
The `CenterPointTopologicalMapping` component is part of the SOFA framework and resides in the `sofa::component::topology::mapping` namespace within the module `Sofa.Component.Topology.Mapping`. This component implements a topological mapping where each primitive (e.g., hexahedra) from an input topology (any MeshTopology) is mapped to a single point in an output PointSetTopology. The primary role of this component is to transform higher-dimensional primitives into points, enabling the representation and manipulation of complex geometries as simpler point sets. `CenterPointTopologicalMapping` inherits from `TopologicalMapping`, which provides methods for initializing (`init`) and updating (`updateTopologicalMappingTopDown`). The initialization method ensures that the output topology (point set) is resized based on the number of primitives in the input topology. During updates, it handles changes such as adding or removing points according to topological modifications in the input model. The component includes methods `getGlobIndex` and `getFromIndex`, which return the global index and source index respectively for a given primitive index. These methods are used for mapping indices between the input and output topologies. This component is useful when you need to simplify complex geometrical models into point sets, enabling easier interaction or visualization while preserving key structural information.
maths
The `CenterPointTopologicalMapping` component in the SOFA framework is designed to map each primitive from an input topology (e.g., hexahedra) onto a single point in an output PointSetTopology. This mapping simplifies complex geometrical models into simpler point sets, facilitating easier interaction and visualization while retaining essential structural information. ### Mathematical Description: - **Input Topology:** The input topology is any MeshTopology which contains various primitives such as hexahedra. Each primitive can be represented mathematically by its vertices and connectivity data. - A hexahedron, for example, consists of 8 vertices: \(v_0, v_1, v_2, v_3, v_4, v_5, v_6, v_7\). - **Output Topology:** The output topology is a PointSetTopology where each primitive from the input topology is mapped to a single point. - For example, if there are \(N\) hexahedra in the input topology, the output topology will contain \(N\) points. Each of these points corresponds to one primitive in the input topology. ### Physical Description: - **Mapping Process:** - During initialization (`init`), the component determines the number of primitives (e.g., hexahedra) in the input topology and resizes the output PointSetTopology accordingly. If there are \(N\) hexahedra, the point set will be resized to contain exactly \(N\) points. - The `updateTopologicalMappingTopDown` method ensures that the output topology is updated based on any changes in the input topology (e.g., adding or removing primitives). - **Index Mapping:** - `getGlobIndex(Index ind)` and `getFromIndex(Index ind)` methods provide a way to map between global indices and source indices. These methods ensure that each primitive index in the input topology can be correctly mapped to its corresponding point in the output topology. ### Use Case: - **Simplification:** The primary use case is simplifying complex geometries into point sets, making them easier to manipulate or visualize. This is particularly useful for applications where a coarse representation of the geometry is sufficient, such as in certain types of simulations or visualizations. - **Preservation of Structure:** While the geometric complexity is reduced, the structural relationships and key information from the original topology are preserved through this mapping. In summary, `CenterPointTopologicalMapping` enables the transformation of complex mesh topologies into simpler point sets while maintaining essential structural details. This simplification can be beneficial for various computational tasks where a lower-dimensional representation suffices.
{
  "name": "CenterPointTopologicalMapping",
  "main": {
    "name": "CenterPointTopologicalMapping",
    "namespace": "sofa::component::topology::mapping",
    "module": "Sofa.Component.Topology.Mapping",
    "include": "sofa/component/topology/mapping/CenterPointTopologicalMapping.h",
    "doc": "Topological mapping where each primitive in the input topology will be mapped to a point in the output topology.\n\nThis class, called CenterPointTopologicalMapping, is a specific implementation of the interface TopologicalMapping where :\nINPUT TOPOLOGY = any MeshTopology\nOUTPUT TOPOLOGY = A PointSetTopologie, as the boundary of the INPUT TOPOLOGY\nEach primitive in the input Topology will be mapped to a point in the output topology.\nCenterPointTopologicalMapping class is templated by the pair (INPUT TOPOLOGY, OUTPUT TOPOLOGY)",
    "inherits": [
      "TopologicalMapping"
    ],
    "templates": [],
    "data_fields": [],
    "links": [],
    "methods": [
      {
        "name": "init",
        "return_type": "void",
        "params": [],
        "is_virtual": true,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "updateTopologicalMappingTopDown",
        "return_type": "void",
        "params": [],
        "is_virtual": true,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "getGlobIndex",
        "return_type": "int",
        "params": [
          {
            "name": "ind",
            "type": "int"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "getFromIndex",
        "return_type": "int",
        "params": [
          {
            "name": "ind",
            "type": "int"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      }
    ]
  },
  "desc": {
    "description": "The `CenterPointTopologicalMapping` component is part of the SOFA framework and resides in the `sofa::component::topology::mapping` namespace within the module `Sofa.Component.Topology.Mapping`. This component implements a topological mapping where each primitive (e.g., hexahedra) from an input topology (any MeshTopology) is mapped to a single point in an output PointSetTopology. The primary role of this component is to transform higher-dimensional primitives into points, enabling the representation and manipulation of complex geometries as simpler point sets.\n\n`CenterPointTopologicalMapping` inherits from `TopologicalMapping`, which provides methods for initializing (`init`) and updating (`updateTopologicalMappingTopDown`). The initialization method ensures that the output topology (point set) is resized based on the number of primitives in the input topology. During updates, it handles changes such as adding or removing points according to topological modifications in the input model.\n\nThe component includes methods `getGlobIndex` and `getFromIndex`, which return the global index and source index respectively for a given primitive index. These methods are used for mapping indices between the input and output topologies.\n\nThis component is useful when you need to simplify complex geometrical models into point sets, enabling easier interaction or visualization while preserving key structural information."
  },
  "maths": {
    "maths": "The `CenterPointTopologicalMapping` component in the SOFA framework is designed to map each primitive from an input topology (e.g., hexahedra) onto a single point in an output PointSetTopology. This mapping simplifies complex geometrical models into simpler point sets, facilitating easier interaction and visualization while retaining essential structural information.\n\n### Mathematical Description:\n- **Input Topology:** The input topology is any MeshTopology which contains various primitives such as hexahedra. Each primitive can be represented mathematically by its vertices and connectivity data.\n  - A hexahedron, for example, consists of 8 vertices: \\(v_0, v_1, v_2, v_3, v_4, v_5, v_6, v_7\\).\n- **Output Topology:** The output topology is a PointSetTopology where each primitive from the input topology is mapped to a single point.\n  - For example, if there are \\(N\\) hexahedra in the input topology, the output topology will contain \\(N\\) points. Each of these points corresponds to one primitive in the input topology.\n\n### Physical Description:\n- **Mapping Process:**\n  - During initialization (`init`), the component determines the number of primitives (e.g., hexahedra) in the input topology and resizes the output PointSetTopology accordingly. If there are \\(N\\) hexahedra, the point set will be resized to contain exactly \\(N\\) points.\n  - The `updateTopologicalMappingTopDown` method ensures that the output topology is updated based on any changes in the input topology (e.g., adding or removing primitives).\n- **Index Mapping:**\n  - `getGlobIndex(Index ind)` and `getFromIndex(Index ind)` methods provide a way to map between global indices and source indices. These methods ensure that each primitive index in the input topology can be correctly mapped to its corresponding point in the output topology.\n\n### Use Case:\n- **Simplification:** The primary use case is simplifying complex geometries into point sets, making them easier to manipulate or visualize. This is particularly useful for applications where a coarse representation of the geometry is sufficient, such as in certain types of simulations or visualizations.\n- **Preservation of Structure:** While the geometric complexity is reduced, the structural relationships and key information from the original topology are preserved through this mapping.\n\nIn summary, `CenterPointTopologicalMapping` enables the transformation of complex mesh topologies into simpler point sets while maintaining essential structural details. This simplification can be beneficial for various computational tasks where a lower-dimensional representation suffices."
  },
  "summary": {
    "abstract": "The `CenterPointTopologicalMapping` maps each primitive from an input MeshTopology onto a single point in an output PointSetTopology, simplifying complex geometrical models for easier interaction and visualization while preserving structural information.",
    "sheet": "# CenterPointTopologicalMapping\n\n## Overview\n\nThe `CenterPointTopologicalMapping` is a topological mapping component that maps each primitive from an input MeshTopology onto a single point in an output PointSetTopology. This simplification facilitates easier interaction and visualization of complex geometrical models while preserving essential structural information. The component inherits from the `TopologicalMapping` class, providing methods for initialization (`init`) and updating (`updateTopologicalMappingTopDown`).\n\n## Parameters and Data\n\nThe `CenterPointTopologicalMapping` does not expose any significant data fields or parameters that control its behavior beyond what is inherited from its parent classes. The primary functionality is provided through the mapping process, which simplifies complex geometries into point sets."
  }
}