Polyhedral-net Splines
Loading...
Searching...
No Matches
Helper Functions

General helper functions for mesh processing. More...

Functions

int Helper::get_vert_valence (const MeshType &a_Mesh, const VertexHandle &a_VertexHandle)
 Get the vert valence object.
bool Helper::is_vert_3_valence (const MeshType &a_Mesh, const VertexHandle &a_VertexHandle)
 Checks if the valence of the given vertex is 3.
bool Helper::is_vert_4_valence (const MeshType &a_Mesh, const VertexHandle &a_VertexHandle)
 Checks if the valence of the given vertex is 4.
bool Helper::is_vert_5_valence (const MeshType &a_Mesh, const VertexHandle &a_VertexHandle)
 Checks if the valence of the given vertex is 5.
bool Helper::are_verts_of_face_all_4_valence (const MeshType &a_Mesh, const FaceHandle &a_FaceHandle)
 Checks if all the vertices of the given face are 4-valence.
bool Helper::is_vert_in_face (const MeshType &a_Mesh, const FaceHandle &a_FaceHandle, const VertexHandle &a_VertHandle)
 Check if the given vertex is one of the vertices in face.
bool Helper::is_polar_surrounding_vert (const MeshType &a_Mesh, const VertexHandle &a_VertexHandle, bool only_regular, int max_valence)
 Checks if the given vertex could be a polar surrounding vertex. A polar patch must be surrounded by quads. Check if the surrounding faces are all quads except the two triangles that belong to the polar point.
bool Helper::is_polar (const MeshType &a_Mesh, const VertexHandle &a_VertexHandle, bool only_regular, int max_valence, int surrounding_max_valence)
 Checks if the given vertex could be a polar point. A polar point is defined as a vertex that is surrounded by triangles. The neighborhood around the triangles should be all quads. Also checks if the surrounding vertices are also valid polar surrounding vertices.
VertexHandle Helper::find_polar_vertex (const MeshType &mesh, VertexHandle outerVH)
 Given a vertex that is potintially a vertex surrounding a polar point, find the polar point vertex.
void Helper::set_vert_vector_to_default (const int a_Size, std::vector< VertexHandle > &a_VertexHandles)
 Set the vert vector to default object.
std::vector< FaceHandle > Helper::get_faces_around_vert_counterclock (const MeshType &a_Mesh, const VertexHandle &a_VertHandle)
 Get the faces around vert counterclock object.
std::vector< FaceHandle > Helper::get_two_layers_faces_around_vert (const MeshType &a_Mesh, const VertexHandle &a_VertHandle)
 Get first and second layers of faces aroumnd the vert (unordered) ex:
std::vector< VertexHandle > Helper::get_two_layers_verts_around_vert (const MeshType &a_Mesh, const VertexHandle &a_VertHandle)
 Get first and second layers of verts around the given vert (unordered). The layout does not need to be regular.
std::vector< VertexHandle > Helper::get_first_layers_verts_around_vert (const MeshType &a_Mesh, const VertexHandle &a_VertHandle)
 Get first layer of verts around the given vert. The layout does not need to be regular.
std::vector< VertexHandle > Helper::get_surrounding_verts (const MeshType &a_Mesh, const VertexHandle &a_VertHandle)
 Get surrounding verts around the given vert (unordered)
std::vector< FaceHandle > Helper::get_second_layer_faces_around_vert (const MeshType &a_Mesh, const VertexHandle &a_VertHandle)
 Get second layer of faces around the given vert (unordered). The layout does not need to be regular.
bool Helper::is_marked (const MeshType &a_Mesh, const VertexHandle &a_VertHandle)
 Check if the given vertex is marked. A marked vertex is determined by the bool named property "marked_status" on a vertex.
void Helper::mark_vert (MeshType &a_Mesh, const VertexHandle &a_VertHandle)
 Mark the given vertex. A marked vertex is determined by the bool named property "marked_status" on a vertex.
bool Helper::is_triangle (const MeshType &a_Mesh, const FaceHandle &a_FaceHandle)
 Check if the given face is a triangle.
bool Helper::is_quad (const MeshType &a_Mesh, const FaceHandle &a_FaceHandle)
 Check if the given face is a quad.
bool Helper::is_pentagon (const MeshType &a_Mesh, const FaceHandle &a_FaceHandle)
 Check if the given face is a pentagon.
bool Helper::is_hexagon (const MeshType &a_Mesh, const FaceHandle &a_FaceHandle)
 Check if the given face is a hexagon.
std::vector< FaceHandle > Helper::init_neighbor_faces (const MeshType &a_Mesh, const FaceHandle &a_FaceHandle)
 Initialize the neighbor faces of the given face.
bool Helper::has_7_neighbor_faces (const std::vector< FaceHandle > &a_NBFaceHandles)
 Check if the number of neighbor faces is 7.
bool Helper::has_8_neighbor_faces (const std::vector< FaceHandle > &a_NBFaceHandles)
 Check if the number of neighbor faces is 8.
bool Helper::has_9_neighbor_faces (const std::vector< FaceHandle > &a_NBFaceHandles)
 Check if the number of neighbor faces is 9.
bool Helper::are_faces_all_quads (const MeshType &a_Mesh, const std::vector< FaceHandle > &a_FaceHandles)
 Check if all the given faces are quads.
bool Helper::is_only_surrounded_by_quad (const MeshType &a_Mesh, const VertexHandle &a_VertHandle)
 Check if the given vertex is only surrounded by quads.
int Helper::get_num_of_verts_for_face (const MeshType &a_Mesh, const FaceHandle &a_FaceHandle)
 Get the number of vertices for the given face.
int Helper::get_num_of_neighbor_faces (const std::vector< FaceHandle > &a_NBFaceHandles)
 Get the number of neighbor faces for the given neighborhood.
std::vector< VertexHandle > Helper::get_verts_of_face (const MeshType &a_Mesh, const FaceHandle &a_FaceHandle)
 Get the vertices of the given face.
std::vector< VertexHandle > Helper::get_verts_of_faces (const MeshType &a_Mesh, const std::vector< FaceHandle > &a_FaceHandles)
 Get the vertices of the given faces.
int Helper::num_of_quads (const MeshType &a_Mesh, std::vector< FaceHandle > a_FaceHandles)
 Given a neighborhood of faces, count how many quads are there.
int Helper::num_of_triangles (const MeshType &a_Mesh, std::vector< FaceHandle > a_FaceHandles)
 Given a neighborhood of faces, count how many triangles are there.
std::vector< FaceHandle > Helper::get_second_layer_faces_around_face (const MeshType &a_Mesh, const FaceHandle &a_FaceHandle)
 Get the second layer of faces around the given face (unordered). Output faces do not include the first layer faces.
bool Helper::is_marked (const MeshType &a_Mesh, const FaceHandle &a_FaceHandle)
 Check if the given face is marked. A marked face is determined by the bool named property "marked_status" on a face.
void Helper::mark_face_verts (MeshType &a_Mesh, const FaceHandle &a_FaceHandle)
 Mark all the vertices of the given face. A marked vertex is determined by the bool named property "marked_status" on a vertex.
void Helper::mark_face (MeshType &a_Mesh, const FaceHandle &a_FaceHandle)
 Mark the given face. A marked face is determined by the bool named property "marked_status" on a face.
Vec3d Helper::verthandles_to_point_vec (const MeshType &a_Mesh, const VertexHandle &a_VertHandle)
 Convert a vertex handle to a 3D point vector.
Matrix Helper::verthandles_to_points_mat (const MeshType &a_Mesh, const std::vector< VertexHandle > &a_VertHandle)
 Convert a vector of vertex handles to a Matrix of 3D points.
Patch Helper::points_mat_to_patch (const Matrix &a_PointMat)
 Convert a Matrix of 3D points to a Patch.
Patch Helper::points_mat_to_patch (const int a_PatchDegU, const int a_PatchDegV, const Matrix &a_PointMat)
 Convert a Matrix of 3D points to a Patch. The U and V degree of the patch are the same.
Patch Helper::points_mat_to_patch (const int a_PatchDegU, const int a_PatchDegV, const std::string a_Group, const Matrix &a_PointMat)
 Convert a Matrix of 3D points to a Patch.
Patch Helper::points_mat_to_patch (const int a_PatchDegU, const int a_PatchDegV, const std::string a_Group, const Matrix &a_PointMat, const int a_StartIndex)
 Convert a Matrix of 3D points to a Patch.
std::vector< PatchHelper::points_mat_to_patches (const int a_NumOfPatch, const std::string a_Group, const Matrix &a_PointMat)
 Convert a Matrix of 3D points to multiple Patch es.
std::vector< PatchHelper::points_mat_to_patches (const int a_PatchDegU, const int a_PatchDegV, const std::string a_Group, const Matrix &a_PointMat)
 Convert a Matrix of 3D points to multiple Patch es.
template<typename T>
std::vector< T > Helper::duplicate_vector (int a_Times, const std::vector< T > &a_Vector)
 Duplicate a vector multiple times.

Detailed Description

General helper functions for mesh processing.

Function Documentation

◆ are_faces_all_quads()

bool Helper::are_faces_all_quads ( const MeshType & a_Mesh,
const std::vector< FaceHandle > & a_FaceHandles )

Check if all the given faces are quads.

Parameters
a_MeshThe mesh containing the faces
a_FaceHandlesThe vector of face handles
Returns
true if all the faces are quads

◆ are_verts_of_face_all_4_valence()

bool Helper::are_verts_of_face_all_4_valence ( const MeshType & a_Mesh,
const FaceHandle & a_FaceHandle )

Checks if all the vertices of the given face are 4-valence.

Parameters
a_MeshThe mesh containing the face
a_FaceHandleThe face handle
Returns
true if all the vertices of the face are 4-valence

◆ duplicate_vector()

template<typename T>
std::vector< T > Helper::duplicate_vector ( int a_Times,
const std::vector< T > & a_Vector )

Duplicate a vector multiple times.

Template Parameters
TThe type of the vector elements
Parameters
a_TimesThe number of times to duplicate the vector
a_VectorThe vector to be duplicated
Returns
The duplicated vector

◆ find_polar_vertex()

VertexHandle Helper::find_polar_vertex ( const MeshType & mesh,
VertexHandle outerVH )

Given a vertex that is potintially a vertex surrounding a polar point, find the polar point vertex.

Parameters
meshThe mesh containing the vertex
outerVHThe vertex handle of the potential polar surrounding vertex
Returns
VertexHandle The vertex handle of the polar point. Invalid handle if not found.

◆ get_faces_around_vert_counterclock()

std::vector< FaceHandle > Helper::get_faces_around_vert_counterclock ( const MeshType & a_Mesh,
const VertexHandle & a_VertHandle )

Get the faces around vert counterclock object.

Parameters
a_MeshThe mesh containing the vertex
a_VertHandleThe vertex handle
Returns
all the facehandles around the given vertexhandle

◆ get_first_layers_verts_around_vert()

std::vector< VertexHandle > Helper::get_first_layers_verts_around_vert ( const MeshType & a_Mesh,
const VertexHandle & a_VertHandle )

Get first layer of verts around the given vert. The layout does not need to be regular.

ex:

1 - 0 - 7 x: Given point(not included)
| | | 0-7: Verts to get
2 - x - 6
| | |
3 - 4 - 5
Parameters
a_MeshThe mesh containing the vertex
a_VertHandleThe vertex handle
Returns
All the vertexhandles in the first layer around the given vertexhandle

◆ get_num_of_neighbor_faces()

int Helper::get_num_of_neighbor_faces ( const std::vector< FaceHandle > & a_NBFaceHandles)

Get the number of neighbor faces for the given neighborhood.

Parameters
a_NBFaceHandlesThe vector of neighbor face handles
Returns
the number of neighbor faces

◆ get_num_of_verts_for_face()

int Helper::get_num_of_verts_for_face ( const MeshType & a_Mesh,
const FaceHandle & a_FaceHandle )

Get the number of vertices for the given face.

Parameters
a_MeshThe mesh containing the face
a_FaceHandleThe face handle
Returns
the number of vertices for the face

◆ get_second_layer_faces_around_face()

std::vector< FaceHandle > Helper::get_second_layer_faces_around_face ( const MeshType & a_Mesh,
const FaceHandle & a_FaceHandle )

Get the second layer of faces around the given face (unordered). Output faces do not include the first layer faces.

ex:

o - o - o - o - o - o
| x | x | x | x | x |
o - o - o - o - o - o
| x | | | | x |
o - o - o - o - o - o f: Given face
| x | | f | | x | x: Faces to get
o - o - o - o - o - o
| x | | | | x |
o - o - o - o - o - o
| x | x | x | x | x |
o - o - o - o - o - o
Parameters
a_MeshThe mesh containing the face
a_FaceHandleThe face handle
Returns
The vector of face handles in the second layer around the given facehandle

◆ get_second_layer_faces_around_vert()

std::vector< FaceHandle > Helper::get_second_layer_faces_around_vert ( const MeshType & a_Mesh,
const VertexHandle & a_VertHandle )

Get second layer of faces around the given vert (unordered). The layout does not need to be regular.

ex:

o - o - o - o - o
| x | x | x | x |
o - o - o - o - o
| x | | | x |
o - o - v - o - o v: Given point
| x | | | x | x: Faces to get
o - o - o - o - o
| x | x | x | x |
o - o - o - o - o
Parameters
a_MeshThe mesh containing the vertex
a_VertHandleThe vertex handle
Returns
All the facehandles in the second layer around the given vertexhandle

◆ get_surrounding_verts()

std::vector< VertexHandle > Helper::get_surrounding_verts ( const MeshType & a_Mesh,
const VertexHandle & a_VertHandle )

Get surrounding verts around the given vert (unordered)

Parameters
a_MeshThe mesh containing the vertex
a_VertHandleThe vertex handle
Returns
All the vertexhandles surrounding the given vertexhandle

◆ get_two_layers_faces_around_vert()

std::vector< FaceHandle > Helper::get_two_layers_faces_around_vert ( const MeshType & a_Mesh,
const VertexHandle & a_VertHandle )

Get first and second layers of faces aroumnd the vert (unordered) ex:

o - o - o - o - o
| | | | |
o - o - o - o - o
| | | | |
o - o - v - o - o
| | | | |
o - o - o - o - o
| | | | |
o - o - o - o - o
Parameters
a_MeshThe mesh containing the vertex
a_VertHandleThe vertex handle
Returns
All the facehandles in the two layers around the given vertexhandle

◆ get_two_layers_verts_around_vert()

std::vector< VertexHandle > Helper::get_two_layers_verts_around_vert ( const MeshType & a_Mesh,
const VertexHandle & a_VertHandle )

Get first and second layers of verts around the given vert (unordered). The layout does not need to be regular.

ex:

o - o - o - o - o
| | | | |
o - o - o - o - o
| | | | |
o - o - v - o - o v: Given point(included)
| | | | | o: Verts to get
o - o - o - o - o
| | | | |
o - o - o - o - o
Parameters
a_MeshThe mesh containing the vertex
a_VertHandleThe vertex handle
Returns
All the vertexhandles in the two layers around the given vertexhandle

◆ get_vert_valence()

int Helper::get_vert_valence ( const MeshType & a_Mesh,
const VertexHandle & a_VertexHandle )

Get the vert valence object.

Parameters
a_MeshThe mesh containing the vertex
a_VertexHandleThe vertex handle
Returns
the valence of the vertex

◆ get_verts_of_face()

std::vector< VertexHandle > Helper::get_verts_of_face ( const MeshType & a_Mesh,
const FaceHandle & a_FaceHandle )

Get the vertices of the given face.

Parameters
a_MeshThe mesh containing the face
a_FaceHandleThe face handle
Returns
The vector of vertex handles of the face

◆ get_verts_of_faces()

std::vector< VertexHandle > Helper::get_verts_of_faces ( const MeshType & a_Mesh,
const std::vector< FaceHandle > & a_FaceHandles )

Get the vertices of the given faces.

Parameters
a_MeshThe mesh containing the faces
a_FaceHandlesThe vector of face handles
Returns
The vector of vertex handles of the faces (no duplicate)

◆ has_7_neighbor_faces()

bool Helper::has_7_neighbor_faces ( const std::vector< FaceHandle > & a_NBFaceHandles)

Check if the number of neighbor faces is 7.

Parameters
a_NBFaceHandlesThe vector of neighbor face handles
Returns
true if the number of neighbor faces is 7

◆ has_8_neighbor_faces()

bool Helper::has_8_neighbor_faces ( const std::vector< FaceHandle > & a_NBFaceHandles)

Check if the number of neighbor faces is 8.

Parameters
a_NBFaceHandlesThe vector of neighbor face handles
Returns
true if the number of neighbor faces is 8

◆ has_9_neighbor_faces()

bool Helper::has_9_neighbor_faces ( const std::vector< FaceHandle > & a_NBFaceHandles)

Check if the number of neighbor faces is 9.

Parameters
a_NBFaceHandlesThe vector of neighbor face handles
Returns
true if the number of neighbor faces is 9

◆ init_neighbor_faces()

std::vector< FaceHandle > Helper::init_neighbor_faces ( const MeshType & a_Mesh,
const FaceHandle & a_FaceHandle )

Initialize the neighbor faces of the given face.

Parameters
a_MeshThe mesh containing the face
a_FaceHandleThe face handle
Returns
The vector of neighbor face handles

◆ is_hexagon()

bool Helper::is_hexagon ( const MeshType & a_Mesh,
const FaceHandle & a_FaceHandle )

Check if the given face is a hexagon.

Parameters
a_MeshThe mesh containing the face
a_FaceHandleThe face handle
Returns
true if the face is a hexagon

◆ is_marked() [1/2]

bool Helper::is_marked ( const MeshType & a_Mesh,
const FaceHandle & a_FaceHandle )

Check if the given face is marked. A marked face is determined by the bool named property "marked_status" on a face.

Parameters
a_MeshThe mesh containing the face
a_FaceHandleThe face handle
Returns
true if the face is marked

◆ is_marked() [2/2]

bool Helper::is_marked ( const MeshType & a_Mesh,
const VertexHandle & a_VertHandle )

Check if the given vertex is marked. A marked vertex is determined by the bool named property "marked_status" on a vertex.

Parameters
a_MeshThe mesh containing the vertex
a_VertHandleThe vertex handle
Returns
true if the vertex is marked

◆ is_only_surrounded_by_quad()

bool Helper::is_only_surrounded_by_quad ( const MeshType & a_Mesh,
const VertexHandle & a_VertHandle )

Check if the given vertex is only surrounded by quads.

Parameters
a_MeshThe mesh containing the vertex
a_VertHandleThe vertex handle
Returns
true if the vertex is only surrounded by quads

◆ is_pentagon()

bool Helper::is_pentagon ( const MeshType & a_Mesh,
const FaceHandle & a_FaceHandle )

Check if the given face is a pentagon.

Parameters
a_MeshThe mesh containing the face
a_FaceHandleThe face handle
Returns
true if the face is a pentagon

◆ is_polar()

bool Helper::is_polar ( const MeshType & a_Mesh,
const VertexHandle & a_VertexHandle,
bool only_regular,
int max_valence,
int surrounding_max_valence )

Checks if the given vertex could be a polar point. A polar point is defined as a vertex that is surrounded by triangles. The neighborhood around the triangles should be all quads. Also checks if the surrounding vertices are also valid polar surrounding vertices.

Parameters
a_MeshThe mesh containing the vertex
a_VertexHandleThe vertex handle of the potential polar point
only_regularIf true, only 4-valence surrounding polar vertex will be considered
max_valenceThe maximum valence of the polar vertex. The minimum valence is 3.
surrounding_max_valenceThe maximum valence of the surrounding vertex.
Returns
true
false

◆ is_polar_surrounding_vert()

bool Helper::is_polar_surrounding_vert ( const MeshType & a_Mesh,
const VertexHandle & a_VertexHandle,
bool only_regular,
int max_valence )

Checks if the given vertex could be a polar surrounding vertex. A polar patch must be surrounded by quads. Check if the surrounding faces are all quads except the two triangles that belong to the polar point.

Parameters
a_MeshThe mesh containing the vertex
a_VertexHandleThe vertex handle of the potential polar surrounding vertex
only_regularIf true, only 4-valence vertex will be considered
max_valenceThe maximum valence of the vertex. The minimum valence is 3.
Returns
true
false

◆ is_quad()

bool Helper::is_quad ( const MeshType & a_Mesh,
const FaceHandle & a_FaceHandle )

Check if the given face is a quad.

Parameters
a_MeshThe mesh containing the face
a_FaceHandleThe face handle
Returns
true if the face is a quad

◆ is_triangle()

bool Helper::is_triangle ( const MeshType & a_Mesh,
const FaceHandle & a_FaceHandle )

Check if the given face is a triangle.

Parameters
a_MeshThe mesh containing the face
a_FaceHandleThe face handle
Returns
true if the face is a triangle

◆ is_vert_3_valence()

bool Helper::is_vert_3_valence ( const MeshType & a_Mesh,
const VertexHandle & a_VertexHandle )

Checks if the valence of the given vertex is 3.

Parameters
a_MeshThe mesh containing the vertex
a_VertexHandleThe vertex handle
Returns
true if the valence is 3

◆ is_vert_4_valence()

bool Helper::is_vert_4_valence ( const MeshType & a_Mesh,
const VertexHandle & a_VertexHandle )

Checks if the valence of the given vertex is 4.

Parameters
a_MeshThe mesh containing the vertex
a_VertexHandleThe vertex handle
Returns
true if the valence is 4

◆ is_vert_5_valence()

bool Helper::is_vert_5_valence ( const MeshType & a_Mesh,
const VertexHandle & a_VertexHandle )

Checks if the valence of the given vertex is 5.

Parameters
a_MeshThe mesh containing the vertex
a_VertexHandleThe vertex handle
Returns
true if the valence is 5

◆ is_vert_in_face()

bool Helper::is_vert_in_face ( const MeshType & a_Mesh,
const FaceHandle & a_FaceHandle,
const VertexHandle & a_VertHandle )

Check if the given vertex is one of the vertices in face.

Parameters
a_MeshThe mesh containing the face and vertex
a_FaceHandleThe face handle
a_VertHandleThe vertex handle
Returns
true if the vertex is in the face, false otherwise

◆ mark_face()

void Helper::mark_face ( MeshType & a_Mesh,
const FaceHandle & a_FaceHandle )

Mark the given face. A marked face is determined by the bool named property "marked_status" on a face.

Parameters
a_MeshThe mesh containing the face
a_FaceHandleThe face handle

◆ mark_face_verts()

void Helper::mark_face_verts ( MeshType & a_Mesh,
const FaceHandle & a_FaceHandle )

Mark all the vertices of the given face. A marked vertex is determined by the bool named property "marked_status" on a vertex.

Parameters
a_MeshThe mesh containing the face
a_FaceHandleThe face handle

◆ mark_vert()

void Helper::mark_vert ( MeshType & a_Mesh,
const VertexHandle & a_VertHandle )

Mark the given vertex. A marked vertex is determined by the bool named property "marked_status" on a vertex.

Parameters
a_MeshThe mesh containing the vertex
a_VertHandleThe vertex handle

◆ num_of_quads()

int Helper::num_of_quads ( const MeshType & a_Mesh,
std::vector< FaceHandle > a_FaceHandles )

Given a neighborhood of faces, count how many quads are there.

Parameters
a_MeshThe mesh containing the faces
a_FaceHandlesThe vector of face handles
Returns
the number of quads in the neighborhood

◆ num_of_triangles()

int Helper::num_of_triangles ( const MeshType & a_Mesh,
std::vector< FaceHandle > a_FaceHandles )

Given a neighborhood of faces, count how many triangles are there.

Parameters
a_MeshThe mesh containing the faces
a_FaceHandlesThe vector of face handles
Returns
the number of triangles in the neighborhood

◆ points_mat_to_patch() [1/4]

Patch Helper::points_mat_to_patch ( const int a_PatchDegU,
const int a_PatchDegV,
const Matrix & a_PointMat )

Convert a Matrix of 3D points to a Patch. The U and V degree of the patch are the same.

Parameters
a_PatchDegUThe degree of the patch in U direction
a_PatchDegVThe degree of the patch in V direction
a_PointMatThe matrix of 3D points. Each row is a 3D point.
Returns
Patch

◆ points_mat_to_patch() [2/4]

Patch Helper::points_mat_to_patch ( const int a_PatchDegU,
const int a_PatchDegV,
const std::string a_Group,
const Matrix & a_PointMat )

Convert a Matrix of 3D points to a Patch.

Parameters
a_PatchDegUThe degree of the patch in U direction
a_PatchDegVThe degree of the patch in V direction
a_GroupThe group name of the patch
a_PointMatThe matrix of 3D points. Each row is a 3D point.
Returns
Patch

◆ points_mat_to_patch() [3/4]

Patch Helper::points_mat_to_patch ( const int a_PatchDegU,
const int a_PatchDegV,
const std::string a_Group,
const Matrix & a_PointMat,
const int a_StartIndex )

Convert a Matrix of 3D points to a Patch.

Parameters
a_PatchDegUThe degree of the patch in U direction
a_PatchDegVThe degree of the patch in V direction
a_GroupThe group name of the patch
a_PointMatThe matrix of 3D points.
a_StartIndexThe start index of the points in the matrix.
Returns
Patch

◆ points_mat_to_patch() [4/4]

Patch Helper::points_mat_to_patch ( const Matrix & a_PointMat)

Convert a Matrix of 3D points to a Patch.

Parameters
a_PointMat
Returns
Patch

◆ points_mat_to_patches() [1/2]

std::vector< Patch > Helper::points_mat_to_patches ( const int a_NumOfPatch,
const std::string a_Group,
const Matrix & a_PointMat )

Convert a Matrix of 3D points to multiple Patch es.

Parameters
a_NumOfPatchThe number of patches
a_GroupThe group name of the patches
a_PointMatThe matrix of 3D points. Each row is a 3D point.
Returns
The vector of patches

◆ points_mat_to_patches() [2/2]

std::vector< Patch > Helper::points_mat_to_patches ( const int a_PatchDegU,
const int a_PatchDegV,
const std::string a_Group,
const Matrix & a_PointMat )

Convert a Matrix of 3D points to multiple Patch es.

Parameters
a_PatchDegUThe degree of the patch in U direction
a_PatchDegVThe degree of the patch in V direction
a_GroupThe group name of the patches
a_PointMatThe matrix of 3D points. Each row is a 3D point.
Returns
The vector of patches

◆ set_vert_vector_to_default()

void Helper::set_vert_vector_to_default ( const int a_Size,
std::vector< VertexHandle > & a_VertexHandles )

Set the vert vector to default object.

Parameters
a_SizeThe size of the vector to be initialized to.
a_VertexHandlesThe vertex handle vector to be initialized.

◆ verthandles_to_point_vec()

Vec3d Helper::verthandles_to_point_vec ( const MeshType & a_Mesh,
const VertexHandle & a_VertHandle )

Convert a vertex handle to a 3D point vector.

Parameters
a_MeshThe mesh containing the vertex
a_VertHandleThe vertex handle
Returns
Vec3d The 3D point vector that is a type alias for std::vector<double>

◆ verthandles_to_points_mat()

Matrix Helper::verthandles_to_points_mat ( const MeshType & a_Mesh,
const std::vector< VertexHandle > & a_VertHandle )

Convert a vector of vertex handles to a Matrix of 3D points.

Parameters
a_MeshThe mesh containing the vertices
a_VertHandleThe vector of vertex handles
Returns
Matrix The matrix of 3D points.