#include <TriangleSubdividers.h>
This class store all info to be able to split a Triangle into a given configuration. Depending on the configuration, 2 or 3 new triangle will be computed as well as new points. All info to create the new elements are computed and will be generated using a TriangleSetModifier component.
| Protected Attributes | |
| TriangleID | m_triangleId | 
| Index of this triangle in the Topology Container.  More... | |
| sofa::core::topology::BaseMeshTopology::Triangle | m_triangle | 
| Triangle fixed array of the 3 vertex indices.  More... | |
| type::vector< std::shared_ptr< PointToAdd > > | m_points | 
| Vector of new point to be added while subdividing this Triangle.  More... | |
| type::vector< std::shared_ptr< PointToAdd > > | m_snappedPoints | 
| Vector of new point to be snapped while subdividing this Triangle.  More... | |
| type::vector< TriangleToAdd * > | m_trianglesToAdd | 
| Vector of triangle to be added while subdividing this Triangle.  More... | |
| Public Member Functions | |
| TriangleSubdivider (TriangleID triangleId, const Triangle &triangle) | |
| ~TriangleSubdivider () | |
| virtual bool | subdivide (const sofa::type::fixed_array< sofa::type::Vec3, 3 > &triCoords) | 
| void | addPoint (std::shared_ptr< PointToAdd > pTA) | 
| Method to add a new.  More... | |
| TriangleID | getTriangleIdToSplit () | 
| Return the index of the triangle, in the TopologyContainer, to split.  More... | |
| const type::vector< TriangleToAdd * > & | getTrianglesToAdd () | 
| Getter to the list of new.  More... | |
| const type::vector< std::shared_ptr< PointToAdd > > & | getPointsToAdd () | 
| Getter to the list of new.  More... | |
| Protected Member Functions | |
| PointID | localVertexId (PointID vertexIndex) | 
| sofa::type::Vec3 | computePointCoordinates (const PointToAdd *PTA, const sofa::type::fixed_array< sofa::type::Vec3, 3 > &triCoords) | 
| bool | subdivide_1Node (const sofa::type::fixed_array< sofa::type::Vec3, 3 > &triCoords) | 
| bool | subdivide_1Edge (const sofa::type::fixed_array< sofa::type::Vec3, 3 > &triCoords) | 
| bool | subdivide_2Edge (const sofa::type::fixed_array< sofa::type::Vec3, 3 > &triCoords) | 
| bool | subdivide_3Edge (const sofa::type::fixed_array< sofa::type::Vec3, 3 > &triCoords) | 
| bool | subdivide_2Node (const sofa::type::fixed_array< sofa::type::Vec3, 3 > &triCoords) | 
| 
 | protected | 
Vector of new point to be added while subdividing this Triangle.
| 
 | protected | 
Vector of new point to be snapped while subdividing this Triangle.
| 
 | protected | 
Triangle fixed array of the 3 vertex indices.
| 
 | protected | 
Index of this triangle in the Topology Container.
| 
 | protected | 
Vector of triangle to be added while subdividing this Triangle.
| 
 | explicit | 
| sofa::component::topology::container::dynamic::TriangleSubdivider::~TriangleSubdivider | ( | ) | 
| void sofa::component::topology::container::dynamic::TriangleSubdivider::addPoint | ( | std::shared_ptr< PointToAdd > | pTA | ) | 
Method to add a new.
| 
 | protected | 
| 
 | inline | 
Getter to the list of new.
| 
 | inline | 
Return the index of the triangle, in the TopologyContainer, to split.
| 
 | inline | 
Getter to the list of new.
| 
 | protected | 
| 
 | virtual | 
| 
 | protected | 
Triangle subdivision configuration where 1 Node is added on one edge of the Triangle. In this case 2 new Triangles and 1 Point will be created.. Called internally by
| 
 | protected | 
Triangle subdivision configuration where 1 Node is added in inside of the Triangle. In this case 3 new Triangles and 1 Point will be created. Called internally by
| 
 | protected | 
Triangle subdivision configuration where 2 Nodes are added on 2 different edges of the Triangle. In this case 3 new Triangles and 2 Points will be created. Called internally by
| 
 | protected | 
Triangle subdivision configuration where 2 Nodes are added, 1 on edge and 1 inside of the Triangle. In this case 4 new Triangles and 2 Points will be created. Called internally by
| 
 | protected | 
Triangle subdivision configuration where 3 Nodes are added on 3 different edges of the Triangle. In this case 4 new Triangles and 3 Points will be created. Called internally by