#include <TriangleSetTopologyAlgorithms.h>


Public Types | |
| typedef DataTypes::VecCoord | VecCoord |
| typedef DataTypes::Real | Real |
| typedef DataTypes::Coord | Coord |
Public Member Functions | |
| TriangleSetTopologyAlgorithms () | |
| virtual | ~TriangleSetTopologyAlgorithms () |
| virtual void | init () |
| Initialization method called at graph modification, during bottom-up traversal. | |
| bool | Suture2Points (unsigned int ind_ta, unsigned int ind_tb, unsigned int &ind1, unsigned int &ind2) |
| Moves and fixes the two closest points of two triangles to their median point. | |
| bool | InciseAlongPointsList (bool is_first_cut, const sofa::defaulttype::Vec< 3, double > &a, const sofa::defaulttype::Vec< 3, double > &b, const unsigned int ind_ta, const unsigned int ind_tb, unsigned int &a_last, sofa::helper::vector< unsigned int > &a_p12_last, sofa::helper::vector< unsigned int > &a_i123_last, unsigned int &b_last, sofa::helper::vector< unsigned int > &b_p12_last, sofa::helper::vector< unsigned int > &b_i123_last, sofa::helper::vector< sofa::helper::vector< unsigned int > > &new_points, sofa::helper::vector< sofa::helper::vector< unsigned int > > &closest_vertices) |
| Incises along the list of points (ind_edge,coord) intersected by the vector from point a to point b and the triangular mesh. | |
| void | RemoveAlongTrianglesList (const sofa::defaulttype::Vec< 3, double > &a, const sofa::defaulttype::Vec< 3, double > &b, const unsigned int ind_ta, const unsigned int ind_tb) |
| Removes triangles along the list of points (ind_edge,coord) intersected by the vector from point a to point b and the triangular mesh. | |
| void | InciseAlongLinesList (const sofa::helper::vector< sofa::defaulttype::Vec< 3, double > > &input_points, const sofa::helper::vector< unsigned int > &input_triangles) |
| Incises along the list of points (ind_edge,coord) intersected by the sequence of input segments (list of input points) and the triangular mesh. | |
| virtual int | InciseAlongEdge (unsigned int edge) |
| Duplicates the given edge. | |
Private Attributes | |
| TriangleSetTopologyContainer * | m_container |
| TriangleSetTopologyModifier * | m_modifier |
| TriangleSetGeometryAlgorithms < DataTypes > * | m_geometryAlgorithms |
Definition at line 55 of file TriangleSetTopologyAlgorithms.h.
| typedef DataTypes::Coord sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::Coord |
Definition at line 60 of file TriangleSetTopologyAlgorithms.h.
| typedef DataTypes::Real sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::Real |
Reimplemented in sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >.
Definition at line 59 of file TriangleSetTopologyAlgorithms.h.
| typedef DataTypes::VecCoord sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::VecCoord |
Definition at line 58 of file TriangleSetTopologyAlgorithms.h.
| sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::TriangleSetTopologyAlgorithms | ( | ) | [inline] |
Definition at line 62 of file TriangleSetTopologyAlgorithms.h.
| virtual sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::~TriangleSetTopologyAlgorithms | ( | ) | [inline, virtual] |
Definition at line 66 of file TriangleSetTopologyAlgorithms.h.
| int sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::InciseAlongEdge | ( | unsigned int | edge | ) | [inline, virtual] |
Duplicates the given edge.
Only works of at least one of its points is adjacent to a border.
force the creation of TriangleEdgeShellArray
force the creation of TriangleVertexShellArray
Definition at line 1663 of file TriangleSetTopologyAlgorithms.inl.
References sofa::component::topology::TriangleSetTopologyModifier::addPointsProcess(), sofa::component::topology::PointSetTopologyModifier::addPointsWarning(), sofa::component::topology::TriangleSetTopologyModifier::addTrianglesProcess(), sofa::component::topology::TriangleSetTopologyModifier::addTrianglesWarning(), sofa::core::componentmodel::topology::BaseMeshTopology::getEdge(), sofa::core::componentmodel::topology::BaseMeshTopology::getTriangle(), sofa::component::topology::TriangleSetTopologyContainer::getTriangleArray(), sofa::component::topology::TriangleSetTopologyContainer::getTriangleEdge(), sofa::component::topology::TriangleSetTopologyContainer::getTriangleEdgeShell(), sofa::component::topology::TriangleSetTopologyContainer::getTriangleEdgeShellArray(), sofa::component::topology::TriangleSetTopologyContainer::getTriangleVertexShellArray(), sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::m_container, sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::m_modifier, and sofa::component::topology::TriangleSetTopologyModifier::removeTriangles().
| void sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::InciseAlongLinesList | ( | const sofa::helper::vector< sofa::defaulttype::Vec< 3, double > > & | input_points, | |
| const sofa::helper::vector< unsigned int > & | input_triangles | |||
| ) | [inline] |
Incises along the list of points (ind_edge,coord) intersected by the sequence of input segments (list of input points) and the triangular mesh.
force the creation of TriangleEdgeShellArray
force the creation of TriangleVertexShellArray
Register the creation of point a
Register the creation of triangles incident to point a
Register the removal of triangles incident to point a
VERTEX 0
VERTEX 1
VERTEX 2
Register the creation of triangles incident to point indexed by ind_a
Register the creation of the two points (say current "duplicated points") localized on the current interected edge
VERTEX 0
VERTEX 1
Register the removal of the current triangle
Register the creation of triangles incident to the current "duplicated points" and to the previous "duplicated points"
Register the creation of point b
Register the creation of triangles incident to point b
Register the removal of triangles incident to point b
VERTEX 0
VERTEX 1
VERTEX 2
Register the creation of triangles incident to point indexed by ind_b
Definition at line 1060 of file TriangleSetTopologyAlgorithms.inl.
References sofa::component::topology::TriangleSetTopologyModifier::addPointsProcess(), sofa::component::topology::PointSetTopologyModifier::addPointsWarning(), sofa::component::topology::TriangleSetTopologyModifier::addTrianglesProcess(), sofa::component::topology::TriangleSetTopologyModifier::addTrianglesWarning(), sofa::core::componentmodel::topology::BaseMeshTopology::getTriangle(), sofa::component::topology::TriangleSetTopologyContainer::getTriangleArray(), sofa::component::topology::TriangleSetTopologyContainer::getTriangleEdgeShellArray(), sofa::component::topology::TriangleSetTopologyContainer::getTriangleVertexShellArray(), sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::m_container, sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::m_geometryAlgorithms, sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::m_modifier, sofa::component::topology::TriangleSetTopologyModifier::removeTriangles(), sofa::component::topology::snapping_test_edge(), and sofa::component::topology::snapping_test_triangle().
| bool sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::InciseAlongPointsList | ( | bool | is_first_cut, | |
| const sofa::defaulttype::Vec< 3, double > & | a, | |||
| const sofa::defaulttype::Vec< 3, double > & | b, | |||
| const unsigned int | ind_ta, | |||
| const unsigned int | ind_tb, | |||
| unsigned int & | a_last, | |||
| sofa::helper::vector< unsigned int > & | a_p12_last, | |||
| sofa::helper::vector< unsigned int > & | a_i123_last, | |||
| unsigned int & | b_last, | |||
| sofa::helper::vector< unsigned int > & | b_p12_last, | |||
| sofa::helper::vector< unsigned int > & | b_i123_last, | |||
| sofa::helper::vector< sofa::helper::vector< unsigned int > > & | new_points, | |||
| sofa::helper::vector< sofa::helper::vector< unsigned int > > & | closest_vertices | |||
| ) | [inline] |
Incises along the list of points (ind_edge,coord) intersected by the vector from point a to point b and the triangular mesh.
force the creation of TriangleEdgeShellArray
force the creation of TriangleVertexShellArray
Register the creation of point a
Register the creation of triangles incident to point a
Register the removal of triangles incident to point a
VERTEX 0
VERTEX 1
VERTEX 2
Register the creation of triangles incident to point indexed by ind_a
Register the creation of the two points (say current "duplicated points") localized on the current interected edge
VERTEX 0
VERTEX 1
Register the removal of the current triangle
Register the creation of triangles incident to the current "duplicated points" and to the previous "duplicated points"
Register the creation of point b
Register the creation of triangles incident to point b
Register the removal of triangles incident to point b
VERTEX 0
VERTEX 1
VERTEX 2
Register the creation of triangles incident to point indexed by ind_b
Definition at line 91 of file TriangleSetTopologyAlgorithms.inl.
References sofa::component::topology::TriangleSetTopologyModifier::addPointsProcess(), sofa::component::topology::PointSetTopologyModifier::addPointsWarning(), sofa::component::topology::TriangleSetTopologyModifier::addTrianglesProcess(), sofa::component::topology::TriangleSetTopologyModifier::addTrianglesWarning(), sofa::core::componentmodel::topology::BaseMeshTopology::getTriangle(), sofa::component::topology::TriangleSetTopologyContainer::getTriangleArray(), sofa::component::topology::TriangleSetTopologyContainer::getTriangleEdgeShellArray(), sofa::component::topology::TriangleSetTopologyContainer::getTriangleVertexShellArray(), sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::m_container, sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::m_geometryAlgorithms, sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::m_modifier, sofa::component::topology::TriangleSetTopologyModifier::removeTriangles(), sofa::component::topology::snapping_test_edge(), and sofa::component::topology::snapping_test_triangle().
Referenced by sofa::component::collision::TopologicalChangeManager::incisionTriangleSetTopology().
| void sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::init | ( | void | ) | [inline, virtual] |
Initialization method called at graph modification, during bottom-up traversal.
Reimplemented from sofa::component::topology::EdgeSetTopologyAlgorithms< DataTypes >.
Reimplemented in sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >.
Definition at line 48 of file TriangleSetTopologyAlgorithms.inl.
References sofa::core::objectmodel::BaseContext::get(), sofa::core::objectmodel::BaseObject::getContext(), sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::m_container, sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::m_geometryAlgorithms, and sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::m_modifier.
| void sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::RemoveAlongTrianglesList | ( | const sofa::defaulttype::Vec< 3, double > & | a, | |
| const sofa::defaulttype::Vec< 3, double > & | b, | |||
| const unsigned int | ind_ta, | |||
| const unsigned int | ind_tb | |||
| ) | [inline] |
Removes triangles along the list of points (ind_edge,coord) intersected by the vector from point a to point b and the triangular mesh.
Definition at line 1019 of file TriangleSetTopologyAlgorithms.inl.
References sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::m_geometryAlgorithms, sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::m_modifier, and sofa::component::topology::TriangleSetTopologyModifier::removeTriangles().
| bool sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::Suture2Points | ( | unsigned int | ind_ta, | |
| unsigned int | ind_tb, | |||
| unsigned int & | ind1, | |||
| unsigned int & | ind2 | |||
| ) | [inline] |
Moves and fixes the two closest points of two triangles to their median point.
TODO:Cast into a MechanicalObject ?
Definition at line 58 of file TriangleSetTopologyAlgorithms.inl.
References sofa::component::MechanicalObject< DataTypes >::forcePointPosition(), and sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::m_geometryAlgorithms.
TriangleSetTopologyContainer* sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::m_container [private] |
Reimplemented from sofa::component::topology::EdgeSetTopologyAlgorithms< DataTypes >.
Reimplemented in sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >.
Definition at line 104 of file TriangleSetTopologyAlgorithms.h.
Referenced by sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::InciseAlongEdge(), sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::InciseAlongLinesList(), sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::InciseAlongPointsList(), and sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::init().
TriangleSetGeometryAlgorithms< DataTypes >* sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::m_geometryAlgorithms [private] |
Reimplemented from sofa::component::topology::EdgeSetTopologyAlgorithms< DataTypes >.
Reimplemented in sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >.
Definition at line 106 of file TriangleSetTopologyAlgorithms.h.
Referenced by sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::InciseAlongLinesList(), sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::InciseAlongPointsList(), sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::init(), sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::RemoveAlongTrianglesList(), and sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::Suture2Points().
TriangleSetTopologyModifier* sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::m_modifier [private] |
Reimplemented from sofa::component::topology::EdgeSetTopologyAlgorithms< DataTypes >.
Reimplemented in sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >.
Definition at line 105 of file TriangleSetTopologyAlgorithms.h.
Referenced by sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::InciseAlongEdge(), sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::InciseAlongLinesList(), sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::InciseAlongPointsList(), sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::init(), and sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::RemoveAlongTrianglesList().
1.5.7.1