MeshLib
 
Loading...
Searching...
No Matches
MRMeshC/MRTriPoint.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MRVector3.h"
5
7
10typedef struct MRTriPointf
11{
15 float a;
17 float b;
19
22
25
#define MR_EXTERN_C_BEGIN
Definition MRMeshC/MRMeshFwd.h:26
#define MR_EXTERN_C_END
Definition MRMeshC/MRMeshFwd.h:27
#define MRMESHC_API
Definition MRMeshC/MRMeshFwd.h:19
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
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
MR_EXTERN_C_BEGIN struct MRTriPointf MRTriPointf
encodes a point inside a triangle using barycentric coordinates
encodes a point inside a triangle using barycentric coordinates
Definition MRMeshC/MRTriPoint.h:11
float b
b in [0,1], b=0 => point is on [v0,v1] edge, b=1 => point is in v2
Definition MRMeshC/MRTriPoint.h:17
float a
Definition MRMeshC/MRTriPoint.h:15
three-dimensional vector
Definition MRMeshC/MRVector3.h:9