Skip to content

Class Argos::VertexToFace

ClassList > Argos > VertexToFace

One-directional vertex-to-face distance computation between two meshes, and mesh subdivision utilities. More...

  • #include <VertexToFace.h>

Public Static Functions

Type Name
Mesh addMidEdgeVertices (const Mesh & mesh)
Subdivide a mesh by inserting a vertex at the midpoint of every edge.
std::vector< double > compute (const Mesh & a, const Mesh & b)
Compute the distance from every vertex of b to the nearest triangle ofa .

Detailed Description

For each vertex of the target mesh, computes the distance to the nearest triangle of the source mesh. Uses an AABB tree for acceleration.

Public Static Functions Documentation

function addMidEdgeVertices

Subdivide a mesh by inserting a vertex at the midpoint of every edge.

static Mesh Argos::VertexToFace::addMidEdgeVertices (
    const  Mesh & mesh
) 

Returns a new mesh where each edge is split, producing additional faces and vertices while preserving the original geometry.

Parameters:

  • mesh Input mesh.

Returns:

Subdivided mesh with mid-edge vertices inserted.


function compute

Compute the distance from every vertex of b to the nearest triangle ofa .

static std::vector< double > Argos::VertexToFace::compute (
    const  Mesh & a,
    const  Mesh & b
) 

Only the BA direction is computed: the function builds an AABB tree for a and queries it with every vertex of b.

Parameters:

  • a Source mesh (its triangles are queried).
  • b Target mesh (its vertices drive the queries).

Returns:

Distance vector of size b.getVertices().size() in the same order as the vertices of b.



The documentation for this class was generated from the following file include/structure/VertexToFace.h