SOFA API  99934cbc
Open source framework for multi-physics simuation
sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes > Class Template Reference

#include <TetrahedronSetTopologyAlgorithms.h>

Inheritance diagram for sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >:

Detailed Description

template<class DataTypes>
class sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >

A class that performs topology algorithms on an TetrahedronSet.

Protected Attributes

TetrahedronSetTopologyContainerm_container
 
TetrahedronSetTopologyModifierm_modifier
 
TetrahedronSetGeometryAlgorithms< DataTypes > * m_geometryAlgorithms
 
unsigned int m_intialNbPoints
 
Real m_baryLimit
 
- Protected Attributes inherited from sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >
Data< sofa::helper::vector< TriangleID > > m_listTriRemove
 Debug : Remove a triangle or a list of triangles by using their indices (only while animate). More...
 
Data< sofa::helper::vector< Triangle > > m_listTriAdd
 Debug : Add a triangle or a list of triangles by using their indices (only while animate). More...
 

Public Member Functions

 SOFA_CLASS (SOFA_TEMPLATE(TetrahedronSetTopologyAlgorithms, DataTypes), SOFA_TEMPLATE(TriangleSetTopologyAlgorithms, DataTypes))
 
void init () override
 
void removeTetra (sofa::helper::vector< TetraID > &ind_ta)
 
void subDivideTetrahedronsWithPlane (sofa::helper::vector< sofa::helper::vector< double > > &coefs, sofa::helper::vector< EdgeID > &intersectedEdgeID, Coord, Coord planeNormal)
 
void subDivideTetrahedronsWithPlane (sofa::helper::vector< Coord > &intersectedPoints, sofa::helper::vector< EdgeID > &intersectedEdgeID, Coord planePos, Coord planeNormal)
 
int subDivideTetrahedronWithPlane (TetraID tetraIdx, sofa::helper::vector< EdgeID > &intersectedEdgeID, sofa::helper::vector< PointID > &intersectedPointID, Coord planeNormal, sofa::helper::vector< Tetra > &toBeAddedTetra)
 
void subDivideRestTetrahedronsWithPlane (sofa::helper::vector< sofa::helper::vector< double > > &coefs, sofa::helper::vector< EdgeID > &intersectedEdgeID, Coord, Coord planeNormal)
 
void subDivideRestTetrahedronsWithPlane (sofa::helper::vector< Coord > &intersectedPoints, sofa::helper::vector< EdgeID > &intersectedEdgeID, Coord planePos, Coord planeNormal)
 
int subDivideRestTetrahedronWithPlane (TetraID tetraIdx, sofa::helper::vector< EdgeID > &intersectedEdgeID, sofa::helper::vector< PointID > &intersectedPointID, Coord planeNormal, sofa::helper::vector< Tetra > &toBeAddedTetra)
 
- Public Member Functions inherited from sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >
 SOFA_CLASS (SOFA_TEMPLATE(TriangleSetTopologyAlgorithms, DataTypes), SOFA_TEMPLATE(EdgeSetTopologyAlgorithms, DataTypes))
 
void init () override
 
void reinit () override
 
bool Suture2Points (TriangleID ind_ta, TriangleID ind_tb, PointID &ind1, PointID &ind2)
 Moves and fixes the two closest points of two triangles to their median point. More...
 
void RemoveAlongTrianglesList (const sofa::defaulttype::Vec< 3, double > &a, const sofa::defaulttype::Vec< 3, double > &b, const TriangleID ind_ta, const TriangleID 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. More...
 
void InciseAlongLinesList (const sofa::helper::vector< sofa::defaulttype::Vec< 3, double > > &input_points, const sofa::helper::vector< TriangleID > &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. More...
 
virtual int InciseAlongEdge (EdgeID edge, int *createdPoints=nullptr)
 Duplicates the given edge. Only works if at least one of its points is adjacent to a border. More...
 
virtual int SplitAlongPath (PointID pa, Coord &a, PointID pb, Coord &b, sofa::helper::vector< sofa::core::topology::TopologyObjectType > &topoPath_list, sofa::helper::vector< ElemID > &indices_list, sofa::helper::vector< sofa::defaulttype::Vec< 3, double > > &coords_list, sofa::helper::vector< EdgeID > &new_edges, double epsilonSnapPath=0.0, double epsilonSnapBorder=0.0)
 Split triangles to create edges along a path given as a the list of existing edges and triangles crossed by it. Each end of the path is given either by an existing point or a point inside the first/last triangle. If the first/last triangle is (TriangleID)-1, it means that to path crosses the boundary of the surface. More...
 
void SnapAlongPath (sofa::helper::vector< sofa::core::topology::TopologyObjectType > &topoPath_list, sofa::helper::vector< ElemID > &indices_list, sofa::helper::vector< sofa::defaulttype::Vec< 3, double > > &coords_list, sofa::helper::vector< sofa::helper::vector< double > > &points2Snap, double epsilonSnapPath)
 
void SnapBorderPath (PointID pa, Coord &a, PointID pb, Coord &b, sofa::helper::vector< sofa::core::topology::TopologyObjectType > &topoPath_list, sofa::helper::vector< ElemID > &indices_list, sofa::helper::vector< sofa::defaulttype::Vec< 3, double > > &coords_list, sofa::helper::vector< sofa::helper::vector< double > > &points2Snap, double epsilonSnapBorder)
 
virtual bool InciseAlongEdgeList (const sofa::helper::vector< EdgeID > &edges, sofa::helper::vector< PointID > &new_points, sofa::helper::vector< PointID > &end_points, bool &reachBorder)
 Duplicates the given edges. Only works if at least the first or last point is adjacent to a border. More...
 
PointID getOtherPointInTriangle (const Triangle &t, PointID p1, PointID p2) const
 
template<>
SOFA_BASE_TOPOLOGY_API int SplitAlongPath (PointID pa, Coord &a, PointID pb, Coord &b, sofa::helper::vector< sofa::core::topology::TopologyObjectType > &topoPath_list, sofa::helper::vector< ElemID > &indices_list, sofa::helper::vector< sofa::defaulttype::Vec< 3, double > > &coords_list, sofa::helper::vector< EdgeID > &new_edges, double epsilonSnapPath, double epsilonSnapBorder)
 
template<>
SOFA_BASE_TOPOLOGY_API int SplitAlongPath (PointID pa, Coord &a, PointID pb, Coord &b, sofa::helper::vector< sofa::core::topology::TopologyObjectType > &topoPath_list, sofa::helper::vector< ElemID > &indices_list, sofa::helper::vector< sofa::defaulttype::Vec< 3, double > > &coords_list, sofa::helper::vector< EdgeID > &new_edges, double epsilonSnapPath, double epsilonSnapBorder)
 
template<>
int SplitAlongPath (PointID, Coord &, PointID, Coord &, sofa::helper::vector< sofa::core::topology::TopologyObjectType > &, sofa::helper::vector< ElemID > &, sofa::helper::vector< sofa::defaulttype::Vec< 3, double > > &, sofa::helper::vector< EdgeID > &, double, double)
 
template<>
int SplitAlongPath (PointID, Coord &, PointID, Coord &, sofa::helper::vector< sofa::core::topology::TopologyObjectType > &, sofa::helper::vector< ElemID > &, sofa::helper::vector< sofa::defaulttype::Vec< 3, double > > &, sofa::helper::vector< EdgeID > &, double, double)
 
- Public Member Functions inherited from sofa::component::topology::EdgeSetTopologyAlgorithms< DataTypes >
 SOFA_CLASS (SOFA_TEMPLATE(EdgeSetTopologyAlgorithms, DataTypes), SOFA_TEMPLATE(PointSetTopologyAlgorithms, DataTypes))
 
void init () override
 
- Public Member Functions inherited from sofa::component::topology::PointSetTopologyAlgorithms< DataTypes >
 SOFA_CLASS (SOFA_TEMPLATE(PointSetTopologyAlgorithms, DataTypes), core::topology::TopologyAlgorithms)
 
void init () override
 

Protected Member Functions

 TetrahedronSetTopologyAlgorithms ()
 
virtual ~TetrahedronSetTopologyAlgorithms ()
 
- Protected Member Functions inherited from sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >
 TriangleSetTopologyAlgorithms ()
 
virtual ~TriangleSetTopologyAlgorithms ()
 
- Protected Member Functions inherited from sofa::component::topology::EdgeSetTopologyAlgorithms< DataTypes >
 EdgeSetTopologyAlgorithms ()
 
virtual ~EdgeSetTopologyAlgorithms ()
 
- Protected Member Functions inherited from sofa::component::topology::PointSetTopologyAlgorithms< DataTypes >
 PointSetTopologyAlgorithms ()
 
 ~PointSetTopologyAlgorithms () override
 

Additional Inherited Members

- Static Public Member Functions inherited from sofa::component::topology::PointSetTopologyAlgorithms< DataTypes >
template<class T >
static bool canCreate (T *&obj, core::objectmodel::BaseContext *context, core::objectmodel::BaseObjectDescription *arg)
 

Attribute details

template<class DataTypes >
Real sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >::m_baryLimit
protected
template<class DataTypes >
TetrahedronSetTopologyContainer* sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >::m_container
protected
template<class DataTypes >
TetrahedronSetGeometryAlgorithms< DataTypes >* sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >::m_geometryAlgorithms
protected
template<class DataTypes >
unsigned int sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >::m_intialNbPoints
protected
template<class DataTypes >
TetrahedronSetTopologyModifier* sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >::m_modifier
protected

Constructor details

template<class DataTypes >
sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >::TetrahedronSetTopologyAlgorithms ( )
inlineprotected
template<class DataTypes >
virtual sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >::~TetrahedronSetTopologyAlgorithms ( )
inlineprotectedvirtual

Function details

template<class DataTypes >
void sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >::init ( void  )
override
template<class DataTypes >
void sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >::removeTetra ( sofa::helper::vector< TetraID > &  ind_ta)
template<class DataTypes >
sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >::SOFA_CLASS ( SOFA_TEMPLATE(TetrahedronSetTopologyAlgorithms< DataTypes >, DataTypes)  ,
SOFA_TEMPLATE(TriangleSetTopologyAlgorithms, DataTypes)   
)
template<class DataTypes >
void sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >::subDivideRestTetrahedronsWithPlane ( sofa::helper::vector< sofa::helper::vector< double > > &  coefs,
sofa::helper::vector< EdgeID > &  intersectedEdgeID,
Coord  ,
Coord  planeNormal 
)
template<class DataTypes >
void sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >::subDivideRestTetrahedronsWithPlane ( sofa::helper::vector< Coord > &  intersectedPoints,
sofa::helper::vector< EdgeID > &  intersectedEdgeID,
Coord  planePos,
Coord  planeNormal 
)
template<class DataTypes >
int sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >::subDivideRestTetrahedronWithPlane ( TetraID  tetraIdx,
sofa::helper::vector< EdgeID > &  intersectedEdgeID,
sofa::helper::vector< PointID > &  intersectedPointID,
Coord  planeNormal,
sofa::helper::vector< Tetra > &  toBeAddedTetra 
)
template<class DataTypes >
void sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >::subDivideTetrahedronsWithPlane ( sofa::helper::vector< sofa::helper::vector< double > > &  coefs,
sofa::helper::vector< EdgeID > &  intersectedEdgeID,
Coord  ,
Coord  planeNormal 
)
template<class DataTypes >
void sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >::subDivideTetrahedronsWithPlane ( sofa::helper::vector< Coord > &  intersectedPoints,
sofa::helper::vector< EdgeID > &  intersectedEdgeID,
Coord  planePos,
Coord  planeNormal 
)
template<class DataTypes >
int sofa::component::topology::TetrahedronSetTopologyAlgorithms< DataTypes >::subDivideTetrahedronWithPlane ( TetraID  tetraIdx,
sofa::helper::vector< EdgeID > &  intersectedEdgeID,
sofa::helper::vector< PointID > &  intersectedPointID,
Coord  planeNormal,
sofa::helper::vector< Tetra > &  toBeAddedTetra 
)