$darkmode
Classes | |
class | EmptyCore |
class | VertexRef |
The references to the vertexes of a triangular face. More... | |
class | NormalAbs |
class | WedgeNormal |
class | WedgeRealNormal |
class | WedgeRealNormal3s |
class | WedgeRealNormal3f |
class | WedgeRealNormal3d |
class | Normal3s |
class | Normal3f |
class | Normal3d |
class | WedgeTexCoord |
class | WedgeTexCoord2s |
class | WedgeTexCoord2f |
class | WedgeTexCoord2d |
class | BitFlags |
Component: Per face Flags More... | |
class | Color |
class | WedgeColor |
class | WedgeColor4b |
class | WedgeColor4f |
class | Color4b |
class | Quality |
class | Qualitys |
class | Qualityf |
class | Qualityd |
class | Quality3 |
class | Quality3s |
class | Quality3f |
class | Quality3d |
class | Mark |
Per vertex Incremental Mark. More... | |
struct | CurvatureDirBaseType |
class | CurvatureDir |
class | CurvatureDirf |
class | CurvatureDird |
class | VFAdj |
Component: Per Face Vertex-Face adjacency relation More... | |
class | EFAdj |
class | FFAdj |
Component: Per Face Face-Face adjacency relation More... | |
class | FEAdj |
class | FHAdj |
Functions | |
template<class FaceType > | |
bool | IsManifold (FaceType const &f, const int j) |
template<class FaceType > | |
bool | IsBorder (FaceType const &f, const int j) |
template<class FaceType > | |
FaceType::ScalarType | DihedralAngleRad (FaceType &f, const int i) |
Compute the signed dihedral angle between the normals of two adjacent faces. More... | |
template<class FaceType > | |
FaceType::ScalarType | WedgeAngleRad (FaceType &f, const int i) |
Return the internal angle (in radians) of the i-th wedge of the triangle. | |
template<class FaceType > | |
int | BorderCount (FaceType const &f) |
Count border edges of the face. | |
template<class FaceType > | |
int | ComplexSize (FaceType &f, const int e) |
Counts the number of incident faces in a complex edge. | |
template<class FaceType > | |
bool | FFCorrectness (FaceType &f, const int e) |
template<class FaceType > | |
void | FFDetachManifold (FaceType &f, const int e) |
template<class FaceType > | |
void | FFDetach (FaceType &f, const int e) |
template<class FaceType > | |
void | FFAttach (FaceType &f, int z1, FaceType &f2, int z2) |
template<class FaceType > | |
void | FFAttachManifold (FaceType *f1, int z1, FaceType *f2, int z2) |
template<class FaceType > | |
void | FFSetBorder (FaceType *f1, int z1) |
template<class FaceType > | |
void | AssertAdj (FaceType &f) |
template<class FaceType > | |
bool | CheckOrientation (FaceType &f, int z) |
template<class FaceType > | |
void | SwapEdge (FaceType &f, const int z) |
template<class FaceType , bool UpdateTopology> | |
void | SwapEdge (FaceType &f, const int z) |
template<class FaceType > | |
bool | FFLinkCondition (FaceType &f, const int z) |
template<class MeshType > | |
void | FFEdgeCollapse (MeshType &m, typename MeshType::FaceType &f, const int z) |
a simple edge collapse using only FF adjacency More... | |
template<class FaceType > | |
bool | CheckFlipEdgeNormal (FaceType &f, const int z, const float angleRad) |
template<class FaceType > | |
bool | CheckFlipEdge (FaceType &f, int z) |
template<class FaceType > | |
bool | checkFlipEdgeNotManifold (FaceType &f, const int z) |
template<class FaceType > | |
void | FlipEdge (FaceType &f, const int z) |
template<class FaceType > | |
void | FlipEdgeNotManifold (FaceType &f, const int z) |
template<class FaceType > | |
void | TriSplit (FaceType *fToSplit, FaceType *newf0, FaceType *newf1, typename FaceType::VertexType *newVert) |
template<class FaceType > | |
void | VFDetach (FaceType &f) |
template<class FaceType > | |
void | VFDetach (FaceType &f, int z) |
template<class FaceType > | |
void | VFAppend (FaceType *f, int z) |
Append a face in VF list of vertex f->V(z) | |
template<class FaceType > | |
void | VVStarVF (typename FaceType::VertexType *vp, std::vector< typename FaceType::VertexType * > &starVec) |
Compute the set of vertices adjacent to a given vertex using VF adjacency. More... | |
template<class FaceType > | |
void | VVExtendedStarVF (typename FaceType::VertexType *vp, const int num_step, std::vector< typename FaceType::VertexType * > &vertVec) |
Compute the set of vertices adjacent to a given vertex using VF adjacency. More... | |
template<class FaceType > | |
void | VFStarVF (typename FaceType::VertexType *vp, std::vector< FaceType * > &faceVec, std::vector< int > &indexes) |
Compute the set of faces adjacent to a given vertex using VF adjacency. More... | |
template<class FaceType > | |
void | EFStarFF (FaceType *fp, int ei, std::vector< FaceType * > &faceVec, std::vector< int > &indVed) |
Compute the set of faces incident onto a given edge using FF adjacency. More... | |
template<class FaceType > | |
void | VFExtendedStarVF (typename FaceType::VertexType *vp, const int num_step, std::vector< FaceType * > &faceVec) |
Compute the set of faces adjacent to a given vertex using VF adjacency. More... | |
template<class FaceType > | |
void | VVOrderedStarFF (const Pos< FaceType > &startPos, std::vector< typename FaceType::VertexType * > &vertexVec) |
Compute the ordered set of vertices adjacent to a given vertex using FF adjacency. More... | |
template<class FaceType > | |
void | VVOrderedStarFF (const Pos< FaceType > &startPos, std::vector< typename FaceType::VertexType * > &vertexVec, const bool ccw) |
Compute the ordered set of vertices adjacent to a given vertex using FF adjacency. More... | |
template<class FaceType > | |
void | VFOrderedStarFF (const Pos< FaceType > &startPos, std::vector< Pos< FaceType > > &posVec) |
Compute the ordered set of faces adjacent to a given vertex using FF adjacency. More... | |
template<class FaceType > | |
void | VFOrderedStarFF (const Pos< FaceType > &startPos, std::vector< Pos< FaceType > > &posVec, const bool ccw) |
Compute the ordered set of faces adjacent to a given vertex using FF adjacency. More... | |
template<class FaceType > | |
void | VFOrderedStarFF (const Pos< FaceType > &startPos, std::vector< FaceType * > &faceVec, std::vector< int > &edgeVec) |
Compute the ordered set of faces adjacent to a given vertex using FF adjacency. More... | |
template<class FaceType > | |
bool | ShareEdgeFF (FaceType *f0, FaceType *f1, int *i0=0, int *i1=0) |
template<class FaceType > | |
int | CountSharedVertex (FaceType *f0, FaceType *f1) |
template<class FaceType > | |
bool | FindSharedVertex (FaceType *f0, FaceType *f1, int &i, int &j) |
template<class FaceType > | |
bool | FindSharedEdge (FaceType *f0, FaceType *f1, int &i, int &j) |
template<class FaceType > | |
bool | FindSharedFaces (typename FaceType::VertexType *v0, typename FaceType::VertexType *v1, FaceType *&f0, FaceType *&f1, int &e0, int &e1) |
Global algorithms and classes working on generic faces are defined in this namespace. Typical example are the topological surgery functions (like vcg::face::Detach and vcg::face::IsBorder) and the class vcg::face::Pos for defining positions over a mesh. Note that for sake of brevity the main face class is defined outside this namespace.
bool vcg::face::CheckFlipEdge | ( | FaceType & | f, |
int | z | ||
) |
Perform a Topological check to see if the z-th edge of the face f can be flipped. No Geometric test are done. (see CheckFlipEdgeNormal)
f | pointer to the face |
z | the edge index |
bool vcg::face::CheckFlipEdgeNormal | ( | FaceType & | f, |
const int | z, | ||
const float | angleRad | ||
) |
Perform a Geometric Check about the normals of a edge flip. return trues if after the flip the normals does not change more than the given threshold angle; it assumes that the flip is topologically correct.
f | the face |
z | the edge index |
angleRad | the threshold angle |
oldD1 ___________ newD1 |\ | | \ | | \ | | f z\ | | \ | |__________| newD0 oldD0
bool vcg::face::CheckOrientation | ( | FaceType & | f, |
int | z | ||
) |
Check if the given face is oriented as the one adjacent to the specified edge.
f | Face to check the orientation |
z | Index of the edge |
int vcg::face::CountSharedVertex | ( | FaceType * | f0, |
FaceType * | f1 | ||
) |
Count the number of vertices shared between two faces.
f0,f1 | the two face to be checked ; |
|
inline |
Compute the signed dihedral angle between the normals of two adjacent faces.
The angle between the normal is signed according to the concavity/convexity of the dihedral angle: negative if the edge shared between the two faces is concave, positive otherwise. The surface must be oriented and faces must be oriented coherently. It simply use the projection of the opposite vertex onto the plane of the other one. It does not use stored face normals but it recomputes according the vertex ordering.
v0 ___________ vf1 |\ | | \i1 f1 | | \ | |f0 i0\ | | \ | |__________| vf0 v1
void vcg::face::EFStarFF | ( | FaceType * | fp, |
int | ei, | ||
std::vector< FaceType * > & | faceVec, | ||
std::vector< int > & | indVed | ||
) |
Compute the set of faces incident onto a given edge using FF adjacency.
fp | pointer to the face whose star has to be computed |
ei | the index of the edge |
faceVec | a std::vector of Face pointer that is filled with the faces incident on that edge. |
indexes | a std::vector of integer of the edge position as it is seen from the faces |
void vcg::face::FFAttach | ( | FaceType & | f, |
int | z1, | ||
FaceType & | f2, | ||
int | z2 | ||
) |
This function attach the face (via the edge z1) to another face (via the edge z2). It's possible to use it also in non-two manifold situation. The function cannot be applied if the adjacencies among faces aren't defined.
f | Pointer to the face |
z1 | Index of the edge |
f2 | Pointer to the face |
z2 | The edge of the face f2 |
void vcg::face::FFAttachManifold | ( | FaceType * | f1, |
int | z1, | ||
FaceType * | f2, | ||
int | z2 | ||
) |
This function attach the face (via the edge z1) to another face (via the edge z2). It is not possible to use it also in non-two manifold situation. The function cannot be applied if the adjacencies among faces aren't defined.
z1 | Index of the edge |
f2 | Pointer to the face |
z2 | The edge of the face f2 |
bool vcg::face::FFCorrectness | ( | FaceType & | f, |
const int | e | ||
) |
This function check the FF topology correctness for an edge of a face. It's possible to use it also in non-two manifold situation. The function cannot be applied if the adjacencies among faces aren't defined.
f | the face to be checked |
e | Index of the edge to be checked |
void vcg::face::FFDetach | ( | FaceType & | f, |
const int | e | ||
) |
This function detach the face from the adjacent face via the edge e. It's possible to use it also in non-two manifold situation. The function cannot be applied if the adjacencies among faces aren't defined.
f | the face to be detached |
e | Index of the edge to be detached |
void vcg::face::FFDetachManifold | ( | FaceType & | f, |
const int | e | ||
) |
This function detach the face from the adjacent face along the edge e. It's possible to use this function it ONLY in non-two manifold situation. The function cannot be applied if the adjacencies among faces aren't defined.
f | the face to be detached |
e | Index of the edge to be detached |
void vcg::face::FFEdgeCollapse | ( | MeshType & | m, |
typename MeshType::FaceType & | f, | ||
const int | z | ||
) |
a simple edge collapse using only FF adjacency
The edge z is collapsed and the vertex V(z) is collapsed onto the vertex V1(Z) vertex V(z) is deleted and vertex V1(z) survives. It assumes that the mesh is Manifold. Note that it preserves manifoldness only if FFLinkConditions are satisfied If the mesh is not manifold it will crash (there will be faces with deleted vertexes around) f12 surV ___________ |\ | | \ f1 | f01 | \ z1 | f11 | f0 z0\ | | \ | |__________| f02 delV
bool vcg::face::FFLinkCondition | ( | FaceType & | f, |
const int | z | ||
) |
Perform a simple edge collapse Basic link conditions to check if the collapse is topologically safe this version uses only FF adjacency and assume that the mesh is manifold
bool vcg::face::FindSharedEdge | ( | FaceType * | f0, |
FaceType * | f1, | ||
int & | i, | ||
int & | j | ||
) |
find the first shared edge between two faces.
f0,f1 | the two face to be checked |
i,j | the indexes of the shared edge in the two faces. Meaningful only if there is a shared edge |
bool vcg::face::FindSharedFaces | ( | typename FaceType::VertexType * | v0, |
typename FaceType::VertexType * | v1, | ||
FaceType *& | f0, | ||
FaceType *& | f1, | ||
int & | e0, | ||
int & | e1 | ||
) |
find the faces that shares the two vertices
v0,v1 | the two vertices |
f0,f1 | the two faces in counterclockwise order |
then find the intersection
bool vcg::face::FindSharedVertex | ( | FaceType * | f0, |
FaceType * | f1, | ||
int & | i, | ||
int & | j | ||
) |
Find the first shared vertex between two faces.
f0,f1 | the two face to be checked |
i,j | the indexes of the shared vertex in the two faces. Meaningful only if there is one single shared vertex ; |
void vcg::face::FlipEdge | ( | FaceType & | f, |
const int | z | ||
) |
Flip the z-th edge of the face f. Check for topological correctness first using CheckFlipEdge()
.
f | pointer to the face |
z | the edge index |
Note: For edge flip we intend the swap of the diagonal of the quadrilater formed by the face f and the face adjacent to the specified edge.
0__________ 2 0__________2 -> 1|\ | | /|1 | \ g | | g / | | \ | |w / | | f z\w | | / f z| | \ | | / | |__________|1 <- 1|/__________| 2 0 2 0
Note that, after an operation FlipEdge(f,z) to topologically revert it should be sufficient to do FlipEdge(f,z+1) (even if the mesh is actually different: f and g will be swapped)
void vcg::face::FlipEdgeNotManifold | ( | FaceType & | f, |
const int | z | ||
) |
Flip the z-th edge of the face f. Check for topological correctness first using CheckFlipEdge()
.
f | pointer to the face |
z | the edge index |
Note: For edge flip we intend the swap of the diagonal of the quadrilater formed by the face f and the face adjacent to the specified edge.
0__________ 2 0__________2 -> 1|\ | | /|1 | \ g | | g / | | \ | |w / | | f z\w | | / f z| | \ | | / | |__________|1 <- 1|/__________| 2 0 2 0
Note that, after an operation FlipEdge(f,z) to topologically revert it should be sufficient to do FlipEdge(f,z+1) (even if the mesh is actually different: f and g will be swapped)
|
inline |
Return a boolean that indicate if the j-th edge of the face is a border.
j | Index of the edge |
|
inline |
Return a boolean indicating if the face f is non manifold along edge j.
j | Index of the edge |
bool vcg::face::ShareEdgeFF | ( | FaceType * | f0, |
FaceType * | f1, | ||
int * | i0 = 0 , |
||
int * | i1 = 0 |
||
) |
Check if two faces share and edge through the FF topology.
f0,f1 | the two face to be checked |
i0,i1 | the index of the shared edge; |
void vcg::face::SwapEdge | ( | FaceType & | f, |
const int | z | ||
) |
This function change the clockwise/counterclockwise orientation of the face by swapping the indexes of two vertex of the indicated edge.
z | Index of the edge |
void vcg::face::TriSplit | ( | FaceType * | fToSplit, |
FaceType * | newf0, | ||
FaceType * | newf1, | ||
typename FaceType::VertexType * | newVert | ||
) |
Given a face it splits into three face with a mid vertex No allocation is done here, a new vertex and two new faces are needed
void vcg::face::VFDetach | ( | FaceType & | f | ) |
Detach the face f from the all the VF adjacency lists of its vertices. It is used by edge collapse before deleting the collapsed faces.
f | face to be detached |
void vcg::face::VFDetach | ( | FaceType & | f, |
int | z | ||
) |
Detach the face f from the VF adjacency list of the faces incident on the z-th vertex.
f | face to be detached |
z | the vertex index |
void vcg::face::VFExtendedStarVF | ( | typename FaceType::VertexType * | vp, |
const int | num_step, | ||
std::vector< FaceType * > & | faceVec | ||
) |
Compute the set of faces adjacent to a given vertex using VF adjacency.
The set is faces is extended of a given number of step
vp | pointer to the vertex whose star has to be computed. |
num_step | the number of step to extend the star |
faceVec | a std::vector of Face pointer that is filled with the adjacent faces. |
initialize front
then dilate front for each step
void vcg::face::VFOrderedStarFF | ( | const Pos< FaceType > & | startPos, |
std::vector< FaceType * > & | faceVec, | ||
std::vector< int > & | edgeVec | ||
) |
Compute the ordered set of faces adjacent to a given vertex using FF adjacency.
startPos | a Pos<FaceType> indicating the vertex whose star has to be computed. |
faceVec | a std::vector of Face pointer that is filled with the adjacent faces. |
edgeVec | a std::vector of indexes filled with the indexes of the corresponding edges shared between the faces. |
void vcg::face::VFOrderedStarFF | ( | const Pos< FaceType > & | startPos, |
std::vector< Pos< FaceType > > & | posVec | ||
) |
Compute the ordered set of faces adjacent to a given vertex using FF adjacency.
startPos | a Pos<FaceType> indicating the vertex whose star has to be computed. |
posVec | a std::vector of Pos filled with Pos arranged around the passed vertex. |
void vcg::face::VFOrderedStarFF | ( | const Pos< FaceType > & | startPos, |
std::vector< Pos< FaceType > > & | posVec, | ||
const bool | ccw | ||
) |
Compute the ordered set of faces adjacent to a given vertex using FF adjacency.
startPos | a Pos<FaceType> indicating the vertex whose star has to be computed. |
posVec | a std::vector of Pos filled with Pos arranged around the passed vertex. |
ccw | if true returns the posVec in counterclockwise order; if false in clockwise order. |
void vcg::face::VFStarVF | ( | typename FaceType::VertexType * | vp, |
std::vector< FaceType * > & | faceVec, | ||
std::vector< int > & | indexes | ||
) |
Compute the set of faces adjacent to a given vertex using VF adjacency.
vp | pointer to the vertex whose star has to be computed. |
faceVec | a std::vector of Face pointer that is filled with the adjacent faces. |
indexes | a std::vector of integer of the vertex as it is seen from the faces |
void vcg::face::VVExtendedStarVF | ( | typename FaceType::VertexType * | vp, |
const int | num_step, | ||
std::vector< typename FaceType::VertexType * > & | vertVec | ||
) |
Compute the set of vertices adjacent to a given vertex using VF adjacency.
The set is faces is extended of a given number of step
vp | pointer to the vertex whose star has to be computed. |
num_step | the number of step to extend the star |
vertVec | a std::vector of Ve pointer that is filled with the adjacent faces. |
initialize front
then dilate front for each step
void vcg::face::VVOrderedStarFF | ( | const Pos< FaceType > & | startPos, |
std::vector< typename FaceType::VertexType * > & | vertexVec | ||
) |
Compute the ordered set of vertices adjacent to a given vertex using FF adjacency.
startPos | a Pos<FaceType> indicating the vertex whose star has to be computed. |
vertexVec | a std::vector of VertexPtr filled vertices around the given vertex. |
void vcg::face::VVOrderedStarFF | ( | const Pos< FaceType > & | startPos, |
std::vector< typename FaceType::VertexType * > & | vertexVec, | ||
const bool | ccw | ||
) |
Compute the ordered set of vertices adjacent to a given vertex using FF adjacency.
startPos | a Pos<FaceType> indicating the vertex whose star has to be computed. |
vertexVec | a std::vector of VertexPtr filled vertices around the given vertex. |
ccw | if true returns the vertexVec in counterclockwise order; if false in clockwise order. |
void vcg::face::VVStarVF | ( | typename FaceType::VertexType * | vp, |
std::vector< typename FaceType::VertexType * > & | starVec | ||
) |
Compute the set of vertices adjacent to a given vertex using VF adjacency.
vp | pointer to the vertex whose star has to be computed. |
starVec | a std::vector of Vertex pointer that is filled with the adjacent vertices. |