MeshLib
 
Loading...
Searching...
No Matches
MRTriPoint.h File Reference
#include "MRMeshFwd.h"
#include "MRVector3.h"

Go to the source code of this file.

Classes

struct  MRTriPointf
 encodes a point inside a triangle using barycentric coordinates More...
 

Typedefs

typedef MR_EXTERN_C_BEGIN struct MRTriPointf MRTriPointf
 encodes a point inside a triangle using barycentric coordinates
 

Functions

MRMESHC_API MRTriPointf mrTriPointfFromTriangle (const MRVector3f *p, const MRVector3f *v0, const MRVector3f *v1, const MRVector3f *v2)
 given a point coordinates and triangle (v0,v1,v2) computes barycentric coordinates of the point
 
MRMESHC_API MRVector3f mrTriPointfInterpolate (const MRTriPointf *tp, const MRVector3f *v0, const MRVector3f *v1, const MRVector3f *v2)
 given three values in three vertices, computes interpolated value at this barycentric coordinates
 

Typedef Documentation

◆ MRTriPointf

typedef MR_EXTERN_C_BEGIN struct MRTriPointf MRTriPointf

encodes a point inside a triangle using barycentric coordinates

Notations used below: v0, v1, v2 - points of the triangle

Function Documentation

◆ mrTriPointfFromTriangle()

MRMESHC_API MRTriPointf mrTriPointfFromTriangle ( const MRVector3f * p,
const MRVector3f * v0,
const MRVector3f * v1,
const MRVector3f * v2 )

given a point coordinates and triangle (v0,v1,v2) computes barycentric coordinates of the point

◆ mrTriPointfInterpolate()

MRMESHC_API MRVector3f mrTriPointfInterpolate ( const MRTriPointf * tp,
const MRVector3f * v0,
const MRVector3f * v1,
const MRVector3f * v2 )

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