MeshLib
 
Loading...
Searching...
No Matches
TriPoint Struct Reference

#include <MRMeshTriPoint.h>

Public Member Functions

Vector3f Interpolate (Vector3f^ p0, Vector3f^ p1, Vector3f^ p2)
 given three values in three vertices, computes interpolated value at this barycentric coordinates
 

Public Attributes

float a
 < a in [0,1], a=0 => point is on [v2,v0] edge, a=1 => point is in v1
 
float b
 

Related Symbols

(Note that these are not member symbols.)

template<typename T >
 TriPoint (const Vector3< T > &p, const Vector3< T > &v1, const Vector3< T > &v2)
 
template<typename T >
constexpr int inVertex () const
 
template<typename T >
constexpr int onEdge () const
 

Detailed Description

barycentric coordinates: a+b in [0,1], a+b=0 => point is in v0, a+b=1 => point is on [v1,v2] edge

Member Function Documentation

◆ Interpolate()

Vector3f TriPoint::Interpolate ( Vector3f^ p0,
Vector3f^ p1,
Vector3f^ p2 )

given three values in three vertices, computes interpolated value at this barycentric coordinates

Friends And Related Symbol Documentation

◆ inVertex()

template<typename T >
int inVertex ( ) const
related

◆ onEdge()

template<typename T >
int onEdge ( ) const
related

◆ TriPoint()

template<typename T >
TriPoint ( const Vector3< T > & p,
const Vector3< T > & v1,
const Vector3< T > & v2 )
related

Member Data Documentation

◆ a

float TriPoint::a

< a in [0,1], a=0 => point is on [v2,v0] edge, a=1 => point is in v1

b in [0,1], b=0 => point is on [v0,v1] edge, b=1 => point is in v2

◆ b

float TriPoint::b

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