Polyhedral-net Splines
Loading...
Searching...
No Matches
PatchConstructor Class Referenceabstract

Abstract base class for patch constructors. More...

#include <PatchConstructor.hpp>

Inheritance diagram for PatchConstructor:
ExtraordinaryPatchConstructor NGonPatchConstructor PolarPatchConstructor RegularPatchConstructor T0PatchConstructor T1PatchConstructor T2PatchConstructor TwoTrianglesTwoQuadsPatchConstructor

Public Member Functions

virtual bool isSamePatchType (const VertexHandle &, MeshType &a_Mesh, bool check_marked=false)
 Given a vertex, checks wither the vertex and the neighborhood arund the vertex of this patch type.
virtual bool isSamePatchType (const FaceHandle &, MeshType &a_Mesh, bool check_marked=false)
 Given a face, checks wither the face and the neighborhood arund the face of this patch type.
virtual PatchBuilder getPatchBuilder (const VertexHandle &, MeshType &a_Mesh, bool mark_gathered=false)
 Constructs a PatchBuilder for the patch type at the given vertex.
virtual PatchBuilder getPatchBuilder (const FaceHandle &, MeshType &a_Mesh, bool mark_gathered=false)
 Constructs a PatchBuilder for the patch type at the given face.
virtual std::string getGroupName () const =0
 Returns the name of the patch group this constructor handles.

Detailed Description

Abstract base class for patch constructors.

Patch constructors are responsible for identifying PnS patch types and creating PatchBuilders. PatchBuilder is returned instead of a Patch directly so that updated patches can be easily if the underlying mesh changes without needing re-traverse the entire mesh to dentify the patch type and gather the vertices again. Essentially, this class indentifies PnS patch types and collects information required to build associated Bézier patches.

Member Function Documentation

◆ getGroupName()

virtual std::string PatchConstructor::getGroupName ( ) const
pure virtual

Returns the name of the patch group this constructor handles.

This method must be implemented in derived classes to return the specific patch group name.

Returns
The name of the patch group.

Implemented in ExtraordinaryPatchConstructor, NGonPatchConstructor, PolarPatchConstructor, RegularPatchConstructor, T0PatchConstructor, T1PatchConstructor, T2PatchConstructor, and TwoTrianglesTwoQuadsPatchConstructor.

◆ getPatchBuilder() [1/2]

virtual PatchBuilder PatchConstructor::getPatchBuilder ( const FaceHandle & ,
MeshType & a_Mesh,
bool mark_gathered = false )
inlinevirtual

Constructs a PatchBuilder for the patch type at the given face.

Parameters
a_MeshThe mesh to which the face belongs.
mark_gatheredIf true, all vertices gathered for the patch will be marked. See Helper::mark_face_verts.
Returns
A PatchBuilder configured for the patch type at the given face.
Exceptions
std::runtime_errorif not implemented in derived class.

Reimplemented in NGonPatchConstructor, T0PatchConstructor, T1PatchConstructor, and T2PatchConstructor.

◆ getPatchBuilder() [2/2]

virtual PatchBuilder PatchConstructor::getPatchBuilder ( const VertexHandle & ,
MeshType & a_Mesh,
bool mark_gathered = false )
inlinevirtual

Constructs a PatchBuilder for the patch type at the given vertex.

Parameters
a_MeshThe mesh to which the vertex belongs.
mark_gatheredIf true, all vertices gathered for the patch will be marked. See Helper::mark_vert.
Returns
A PatchBuilder configured for the patch type at the given vertex.
Exceptions
std::runtime_errorif not implemented in derived class.

Reimplemented in ExtraordinaryPatchConstructor, PolarPatchConstructor, RegularPatchConstructor, and TwoTrianglesTwoQuadsPatchConstructor.

◆ isSamePatchType() [1/2]

virtual bool PatchConstructor::isSamePatchType ( const FaceHandle & ,
MeshType & a_Mesh,
bool check_marked = false )
inlinevirtual

Given a face, checks wither the face and the neighborhood arund the face of this patch type.

Parameters
a_MeshThe mesh to which the face belongs.
check_markedIf true, the function will return false if any vertex of the face is marked. See Helper::is_marked.
Returns
true if the face and its neighborhood match this patch type.

Reimplemented in NGonPatchConstructor, T0PatchConstructor, T1PatchConstructor, and T2PatchConstructor.

◆ isSamePatchType() [2/2]

virtual bool PatchConstructor::isSamePatchType ( const VertexHandle & ,
MeshType & a_Mesh,
bool check_marked = false )
inlinevirtual

Given a vertex, checks wither the vertex and the neighborhood arund the vertex of this patch type.

Parameters
a_MeshThe mesh to which the vertex belongs.
check_markedIf true, the function will return false if the vertex is marked. See Helper::is_marked.
Returns
true if the vertex and its neighborhood match this patch type.

Reimplemented in ExtraordinaryPatchConstructor, PolarPatchConstructor, RegularPatchConstructor, and TwoTrianglesTwoQuadsPatchConstructor.


The documentation for this class was generated from the following file: