ug4
tri_box.cpp File Reference
#include <math.h>
#include "../ugmath.h"

Classes

struct  ug::TRI
 

Namespaces

 ug
 the ug namespace
 

Macros

#define CROSS(A, B, C)
 
#define EPS   10e-5
 
#define FALSE   0
 
#define INSIDE   0
 
#define LERP(A, B, C)   ((B)+(A)*((C)-(B)))
 
#define MAX3(a, b, c)   ((((a)>(b))&&((a)>(c))) ? (a) : (((b)>(c)) ? (b) : (c)))
 
#define MIN3(a, b, c)   ((((a)<(b))&&((a)<(c))) ? (a) : (((b)<(c)) ? (b) : (c)))
 
#define OUTSIDE   1
 
#define SIGN3(A)
 
#define SUB(A, B, C)
 
#define TRUE   1
 

Functions

static int ug::Bevel2d (const vector3 &p)
 
static int ug::Bevel3d (const vector3 &p)
 
static int ug::CheckLine (const vector3 &p1, const vector3 &p2, int outcode_diff)
 
static int ug::CheckPoint (const vector3 &p1, const vector3 &p2, number alpha, long mask)
 
static int ug::FacePlane (const vector3 &p)
 
static int ug::PointTriangleIntersection (const vector3 &p, const TRI &t)
 
UG_API bool ug::TriangleBoxIntersection (const MathVector< 3 > &p0, const MathVector< 3 > &p1, const MathVector< 3 > &p2, const MathVector< 3 > &boxMin, const MathVector< 3 > &boxMax)
 checks whether a triangle and an axis-aligned box intersect. More...
 
static int ug::TriCubeIntersection (const TRI &t)
 

Macro Definition Documentation

◆ CROSS

#define CROSS (   A,
  B,
 
)
Value:
{ \
(C).x() = (A).y() * (B).z() - (A).z() * (B).y(); \
(C).y() = -(A).x() * (B).z() + (A).z() * (B).x(); \
(C).z() = (A).x() * (B).y() - (A).y() * (B).x(); \
}

◆ EPS

#define EPS   10e-5

◆ FALSE

#define FALSE   0

◆ INSIDE

#define INSIDE   0

◆ LERP

#define LERP (   A,
  B,
 
)    ((B)+(A)*((C)-(B)))

◆ MAX3

#define MAX3 (   a,
  b,
 
)    ((((a)>(b))&&((a)>(c))) ? (a) : (((b)>(c)) ? (b) : (c)))

◆ MIN3

#define MIN3 (   a,
  b,
 
)    ((((a)<(b))&&((a)<(c))) ? (a) : (((b)<(c)) ? (b) : (c)))

◆ OUTSIDE

#define OUTSIDE   1

◆ SIGN3

#define SIGN3 (   A)
Value:
(((A).x() < EPS ? 4 : 0) | ((A).x() > -EPS ? 32 : 0) | \
((A).y() < EPS ? 2 : 0) | ((A).y() > -EPS ? 16 : 0) | \
((A).z() < EPS ? 1 : 0) | ((A).z() > -EPS ? 8 : 0))
#define EPS
Definition: tri_box.cpp:51

◆ SUB

#define SUB (   A,
  B,
 
)
Value:
{ \
(C).x() = (A).x() - (B).x(); \
(C).y() = (A).y() - (B).y(); \
(C).z() = (A).z() - (B).z(); \
}

◆ TRUE

#define TRUE   1