Polyhedral-net Splines
Loading...
Searching...
No Matches
HalfEdge Operations

Functions for operating on half-edge data structures. More...

Functions

VertexHandle HalfedgeOperation::get_vert (const MeshType &a_Mesh, HalfedgeHandle &a_HalfedgeHandle, const std::vector< int > a_Commands)
 Halfedge operation to get one vert. Will return the last vertex handle if multiple get commands are given to get.
VertexHandle HalfedgeOperation::get_vert_fixed_halfedge (const MeshType &a_Mesh, HalfedgeHandle a_HalfedgeHandle, const std::vector< int > a_Commands)
 Halfedge operation to get one vert.
std::vector< VertexHandle > HalfedgeOperation::get_verts (const MeshType &a_Mesh, HalfedgeHandle &a_HalfedgeHandle, const std::vector< int > a_Commands)
 Halfedge operation to get multiple vertices.
std::vector< VertexHandle > HalfedgeOperation::get_verts_fixed_halfedge (const MeshType &a_Mesh, HalfedgeHandle a_HalfedgeHandle, const std::vector< int > a_Commands)
 Halfedge operation to get multiple vertices.
FaceHandle HalfedgeOperation::get_face (const MeshType &a_Mesh, HalfedgeHandle &a_HalfedgeHandle, const std::vector< int > a_Commands)
 Halfedge operation to get one face.
void HalfedgeOperation::init_verts (const MeshType &a_Mesh, HalfedgeHandle a_HalfedgeHandle, std::vector< VertexHandle > &a_TargetVertexHandles, const std::vector< std::vector< int > > &a_OrderOfVertIdx, const std::vector< int > &a_CommandForOneSet)
 Fill the TargetVertexHandles vector by given the index ordering and commands. The same commands will run a_OrderOfVertIdx.size() times.
void HalfedgeOperation::init_verts (const MeshType &a_Mesh, HalfedgeHandle &a_HalfedgeHandle, std::vector< VertexHandle > &a_TargetVertexHandles, const std::vector< int > &a_OrderOfVertIdx, const std::vector< int > &a_Commands)
 Fill the TargetVertexHandles vector by given the index ordering and commands.
void HalfedgeOperation::init_verts_fixed_halfedge (const MeshType &a_Mesh, HalfedgeHandle a_HalfedgeHandle, std::vector< VertexHandle > &a_TargetVertexHandles, const std::vector< int > &a_OrderOfVertIdx, const std::vector< int > &a_Commands)
 Fill the TargetVertexHandles vector by given the index ordering and commands.
std::vector< int > HalfedgeOperation::duplicate_commands (int a_Times, const std::vector< int > &a_Commands)
 Duplicate commands by specific times.

Detailed Description

Functions for operating on half-edge data structures.

Function Documentation

◆ duplicate_commands()

std::vector< int > HalfedgeOperation::duplicate_commands ( int a_Times,
const std::vector< int > & a_Commands )

Duplicate commands by specific times.

Parameters
a_TimesThe number of times to duplicate the commands
a_CommandsThe commands to be duplicated

◆ get_face()

FaceHandle HalfedgeOperation::get_face ( const MeshType & a_Mesh,
HalfedgeHandle & a_HalfedgeHandle,
const std::vector< int > a_Commands )

Halfedge operation to get one face.

Parameters
a_MeshThe mesh containing the halfedge.
a_HalfedgeHandleThe halfedge handle to start from.
a_CommandsA vector of commands to execute. Commands: 1=next halfedge, 2=previous halfedge, 3=opposite halfedge, 5=get from face.
Note
This function changes the input halfedge

◆ get_vert()

VertexHandle HalfedgeOperation::get_vert ( const MeshType & a_Mesh,
HalfedgeHandle & a_HalfedgeHandle,
const std::vector< int > a_Commands )

Halfedge operation to get one vert. Will return the last vertex handle if multiple get commands are given to get.

Parameters
a_MeshThe mesh containing the halfedge.
a_HalfedgeHandleThe halfedge handle to start from. This will be modified by the function.
a_CommandsA vector of commands to execute. Commands: 1=next halfedge, 2=previous halfedge, 3=opposite halfedge, 4=get from vertex
Returns
The vertex handle obtained after executing the commands.
Note
This function changes the input halfedge

◆ get_vert_fixed_halfedge()

VertexHandle HalfedgeOperation::get_vert_fixed_halfedge ( const MeshType & a_Mesh,
HalfedgeHandle a_HalfedgeHandle,
const std::vector< int > a_Commands )

Halfedge operation to get one vert.

Parameters
a_MeshThe mesh containing the halfedge.
a_HalfedgeHandleThe halfedge handle to start from. This will be modified by the function.
a_CommandsA vector of commands to execute. Commands: 1=next halfedge, 2=previous halfedge, 3=opposite halfedge, 4=get from vertex
Returns
The vertex handle obtained after executing the commands.
Note
This function will not change the input halfedge

◆ get_verts()

std::vector< VertexHandle > HalfedgeOperation::get_verts ( const MeshType & a_Mesh,
HalfedgeHandle & a_HalfedgeHandle,
const std::vector< int > a_Commands )

Halfedge operation to get multiple vertices.

Parameters
a_MeshThe mesh containing the halfedge.
a_HalfedgeHandleThe halfedge handle to start from. This will be modified by the function.
a_CommandsA vector of commands to execute. Commands: 1=next halfedge, 2=previous halfedge, 3=opposite halfedge, 4=get from vertex
Note
This function will changle the input halfedge

◆ get_verts_fixed_halfedge()

std::vector< VertexHandle > HalfedgeOperation::get_verts_fixed_halfedge ( const MeshType & a_Mesh,
HalfedgeHandle a_HalfedgeHandle,
const std::vector< int > a_Commands )

Halfedge operation to get multiple vertices.

Parameters
a_MeshThe mesh containing the halfedge.
a_HalfedgeHandleThe halfedge handle to start from. This will be modified by the function.
a_CommandsA vector of commands to execute. Commands: 1=next halfedge, 2=previous halfedge, 3=opposite halfedge, 4=get from vertex
Note
This function will not changle the input halfedge

◆ init_verts() [1/2]

void HalfedgeOperation::init_verts ( const MeshType & a_Mesh,
HalfedgeHandle & a_HalfedgeHandle,
std::vector< VertexHandle > & a_TargetVertexHandles,
const std::vector< int > & a_OrderOfVertIdx,
const std::vector< int > & a_Commands )

Fill the TargetVertexHandles vector by given the index ordering and commands.

Parameters
a_MeshThe mesh containing the halfedge.
a_HalfedgeHandleThe halfedge handle to start from.
a_TargetVertexHandlesThe target vector to be filled.
a_OrderOfVertIdxA vector of indices to indicate the target index in a_TargetVertexHandles.
a_CommandsA vector of commands to execute. Commands: 1=next halfedge, 2=previous halfedge, 3=opposite halfedge, 4=get from vertex
Note
This function will change the input halfedge!

◆ init_verts() [2/2]

void HalfedgeOperation::init_verts ( const MeshType & a_Mesh,
HalfedgeHandle a_HalfedgeHandle,
std::vector< VertexHandle > & a_TargetVertexHandles,
const std::vector< std::vector< int > > & a_OrderOfVertIdx,
const std::vector< int > & a_CommandForOneSet )

Fill the TargetVertexHandles vector by given the index ordering and commands. The same commands will run a_OrderOfVertIdx.size() times.

Parameters
a_MeshThe mesh containing the halfedge.
a_HalfedgeHandleThe halfedge handle to start from.
a_TargetVertexHandlesThe target vector to be filled.
a_OrderOfVertIdxA vector of vector of indices to indicate the target index in a_TargetVertexHandles. Each inner vector indicates one set of indices for one run of commands.
a_CommandForOneSetA vector of commands to execute for one set of indices. Comands: 1=next halfedge, 2=previous halfedge, 3=opposite halfedge, 4=get from vertex
Note
The input halfedge will not be changed after this function. However, the halfedge will be changed in between each run of commands.

◆ init_verts_fixed_halfedge()

void HalfedgeOperation::init_verts_fixed_halfedge ( const MeshType & a_Mesh,
HalfedgeHandle a_HalfedgeHandle,
std::vector< VertexHandle > & a_TargetVertexHandles,
const std::vector< int > & a_OrderOfVertIdx,
const std::vector< int > & a_Commands )

Fill the TargetVertexHandles vector by given the index ordering and commands.

Parameters
a_MeshThe mesh containing the halfedge.
a_HalfedgeHandleThe halfedge handle to start from.
a_TargetVertexHandlesThe target vector to be filled.
a_OrderOfVertIdxA vector of indices to indicate the target index in a_TargetVertexHandles.
a_CommandsA vector of commands to execute. Commands: 1=next halfedge, 2=previous halfedge, 3=opposite halfedge, 4=get from vertex
Note
This function will not change the input halfedge!