KiCad PCB EDA Suite
Loading...
Searching...
No Matches
wrlfacet.cpp File Reference
#include <glm/glm.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <cmath>
#include "wrlfacet.h"

Go to the source code of this file.

Macros

#define GLM_FORCE_RADIANS
 
#define LOWER_LIMIT   (1e-12)
 

Functions

static bool VDegenerate (glm::vec3 *pts)
 
static WRLVEC3F VCalcTriNorm (const WRLVEC3F &p1, const WRLVEC3F &p2, const WRLVEC3F &p3)
 
static float VCalcCosAngle (const WRLVEC3F &p1, const WRLVEC3F &p2, const WRLVEC3F &p3)
 

Macro Definition Documentation

◆ GLM_FORCE_RADIANS

#define GLM_FORCE_RADIANS

Definition at line 26 of file wrlfacet.cpp.

◆ LOWER_LIMIT

#define LOWER_LIMIT   (1e-12)

Definition at line 34 of file wrlfacet.cpp.

Function Documentation

◆ VCalcCosAngle()

static float VCalcCosAngle ( const WRLVEC3F p1,
const WRLVEC3F p2,
const WRLVEC3F p3 
)
static

Definition at line 99 of file wrlfacet.cpp.

References LOWER_LIMIT.

Referenced by FACET::CalcFaceNormal(), and FACET::CalcVertexNormal().

◆ VCalcTriNorm()

static WRLVEC3F VCalcTriNorm ( const WRLVEC3F p1,
const WRLVEC3F p2,
const WRLVEC3F p3 
)
static

Definition at line 69 of file wrlfacet.cpp.

References LOWER_LIMIT, and VDegenerate().

Referenced by FACET::CalcFaceNormal().

◆ VDegenerate()

static bool VDegenerate ( glm::vec3 *  pts)
static

Definition at line 37 of file wrlfacet.cpp.

References LOWER_LIMIT.

Referenced by VCalcTriNorm().