MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::MeshTriPointT< T > Struct Template Reference

#include <MRMesh/MRMeshTriPoint.h>

Public Member Functions

 MeshTriPointT ()=default
 MeshTriPointT (NoInit)
 MeshTriPointT (EdgeId e, TriPoint< T > bary)
 MeshTriPointT (const MeshEdgePointT< T > &ep)
 MeshTriPointT (const MeshTopology &topology, VertId v)
template<typename U>
 MeshTriPointT (EdgeId e, const Vector3< U > &p, const Vector3< U > &v0, const Vector3< U > &v1, const Vector3< U > &v2)
 given a point coordinates computes its barycentric coordinates
VertId inVertex (const MeshTopology &topology) const
 returns valid vertex id if the point is in vertex, otherwise returns invalid id
bool inVertex () const
 returns true if the point is in a vertex
MeshEdgePointT< T > onEdge (const MeshTopology &topology) const
bool isBd (const MeshTopology &topology, const FaceBitSet *region=nullptr) const
 returns true if the point is in vertex or on edge, and that location is on the boundary of the region
bool fromTriangle (const MeshTopology &topology, FaceId f) const
 returns true if the point is inside or on the boundary of given triangular face
bool valid () const
 consider this valid if the edge ID is valid
 operator bool () const
MeshTriPointT lnext (const MeshTopology &topology) const
 represents the same point relative to next edge in the same triangle
MeshTriPointT canonical (const MeshTopology &topology) const
 represents the same point relative to the topology.edgeWithLeft( topology.left( e ) )
std::array< WeightedVertexT< T >, 3 > getWeightedVerts (const MeshTopology &topology) const
 returns three weighted triangle's vertices with the sum of not-negative weights equal to 1, and the largest weight in the closest vertex
T interpolate (const MeshTopology &topology, const VertScalars &field) const
 linearly interpolates the values given in vertices to find the field's value at this point
bool operator== (const MeshTriPointT &rhs) const =default
 returns true if two points are equal including equal not-unique representation

Public Attributes

EdgeId e
TriPoint< T > bary

Detailed Description

template<typename T>
struct MR::MeshTriPointT< T >

encodes a point inside a triangular mesh face using barycentric coordinates

Notations used below:
v0 - the value in org( e )
v1 - the value in dest( e )
v2 - the value in dest( next( e ) )


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