PeriDyno 1.0.0
Loading...
Searching...
No Matches
ComputeGeometry.inl File Reference
#include "Platform.h"
#include "Matrix.h"
#include "Vector/Vector2D.h"
#include "Vector.h"
#include <algorithm>
#include <cassert>
#include <cmath>
Include dependency graph for ComputeGeometry.inl:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  dyno
 This is an implementation of AdditiveCCD based on peridyno.
 
namespace  dyno::cgeo
 

Macros

#define REAL_infinity   1.0e30
 
#define REAL_ZERO   1.0e-5
 
#define REAL_EPS   1e-4
 
#define REAL_EQUAL(a, b)
 
#define REAL_GREAT(a, b)
 
#define REAL_LESS(a, b)
 

Functions

template<typename T>
DYN_FUNC void dyno::cgeo::Swap (T &a, T &b)
 
DYN_FUNC float dyno::cgeo::Dot (Vec3f const &U, Vec3f const &V)
 
DYN_FUNC float dyno::cgeo::Dot (Vec2f const &U, Vec2f const &V)
 
DYN_FUNC Vec3f dyno::cgeo::Cross (Vec3f const &U, Vec3f const &V)
 
DYN_FUNC float dyno::cgeo::DotCross (Vec3f const &U, Vec3f const &V, Vec3f const &W)
 
DYN_FUNC Vec2f dyno::cgeo::Perp (Vec2f const &v)
 
DYN_FUNC float dyno::cgeo::DotPerp (Vec2f const &v0, Vec2f const &v1)
 
DYN_FUNC bool dyno::cgeo::Sign (Vec3f const &n, Vec3f const &p0, Vec3f const &p1, Vec3f const &p2)
 
DYN_FUNC bool dyno::cgeo::isOverLap (float &c0, float &c1, float a0, float a1, float b0, float b1)
 
DYN_FUNC Vec3f dyno::cgeo::getProjectionVF (Vec3f p, Vec3f a0, Vec3f a1, Vec3f a2)
 
DYN_FUNC Vec3f dyno::cgeo::getDirectionVF (Vec3f p, Vec3f a0, Vec3f a1, Vec3f a2)
 
DYN_FUNC float dyno::cgeo::getDistanceVF (Vec3f p, Vec3f a0, Vec3f a1, Vec3f a2)
 
DYN_FUNC bool dyno::cgeo::isInNarrowBand (Vec3f b0, Vec3f b1, Vec3f b2, Vec3f b3, Vec3f a0, Vec3f a1, Vec3f a2, float d)
 
DYN_FUNC bool dyno::cgeo::isConPolyOverLap2D (Vec3f face_n, int n_a, Vec3f *a, int n_b, Vec3f *b)
 
DYN_FUNC float dyno::cgeo::getOverLapBoxAreaInPoly2D (Vec3f face_n, int n_a, Vec3f *a, int n_b, Vec3f *b)
 
DYN_FUNC bool dyno::cgeo::isIntrTri2Tet (Vec3f a0, Vec3f a1, Vec3f a2, Vec3f b1, Vec3f b2, Vec3f b3)
 
DYN_FUNC bool dyno::cgeo::isIntrTri2Tet (Vec3f a0, Vec3f a1, Vec3f a2, Vec3f b0, Vec3f b1, Vec3f b2, Vec3f b3)
 
DYN_FUNC bool dyno::cgeo::isInTet (Vec3f p, Vec3f b0, Vec3f b1, Vec3f b2, Vec3f b3)
 
DYN_FUNC float dyno::cgeo::getVolume (Vec3f b0, Vec3f b1, Vec3f b2, Vec3f b3)
 
DYN_FUNC bool dyno::cgeo::getBarycentric (Vec3f &bary, Vec3f p, Vec3f b0, Vec3f b1, Vec3f b2, Vec3f b3)
 
DYN_FUNC int dyno::cgeo::getIntersection (float &t0, float &t1, Vec2f a0, Vec2f a1, Vec2f b0, Vec2f b1, Vec2f b2)
 
DYN_FUNC int dyno::cgeo::getIntersection (Vec3f &p0, Vec3f &p1, Vec3f a0, Vec3f a1, Vec3f a2, Vec3f b0, Vec3f b1, Vec3f b2)
 
DYN_FUNC float dyno::cgeo::getTriBoxAreaInTet (Vec3f a0, Vec3f a1, Vec3f a2, Vec3f b0, Vec3f b1, Vec3f b2, Vec3f b3)
 
DYN_FUNC Vec2f dyno::cgeo::projectWithParall (Vec3f p, Vec3f a0, Vec3f a1, Vec3f a2, Vec3f a3)
 
DYN_FUNC int dyno::cgeo::intrSegWithPlane (Vec3f *q, Vec3f oA, Vec3f nA, Vec3f b0, Vec3f b1)
 
DYN_FUNC int dyno::cgeo::intrTriWithPlane (Vec3f *q, Vec3f oA, Vec3f nA, Vec3f b0, Vec3f b1, Vec3f b2)
 
DYN_FUNC int dyno::cgeo::intrTetWithPlane (Vec3f *q, Vec3f oA, Vec3f nA, Vec3f b0, Vec3f b1, Vec3f b2, Vec3f b3)
 
DYN_FUNC int dyno::cgeo::intrBoxWithPlane (Vec3f *q, Vec3f oA, Vec3f nA, Vec3f center, Vec3f halfU, Vec3f halfV, Vec3f halfW)
 
DYN_FUNC int dyno::cgeo::intrPolyWithLine (float *t, int n, Vec2f *p, Vec2f a0, Vec2f a1)
 
DYN_FUNC int dyno::cgeo::intrPolyWithTri (Vec3f *q, int n, Vec3f *p, Vec3f a0, Vec3f a1, Vec3f a2)
 
DYN_FUNC int dyno::cgeo::intrPolyWithRect (Vec3f *q, int n, Vec3f *p, Vec3f a0, Vec3f a1, Vec3f a2, Vec3f a3)
 

Macro Definition Documentation

◆ REAL_EPS

#define REAL_EPS   1e-4

Definition at line 16 of file ComputeGeometry.inl.

◆ REAL_EQUAL

#define REAL_EQUAL ( a,
b )
Value:
(((a < b + REAL_EPS) && (a > b - REAL_EPS)) ? true : false)
#define REAL_EPS

Definition at line 17 of file ComputeGeometry.inl.

◆ REAL_GREAT

#define REAL_GREAT ( a,
b )
Value:
((a > REAL_EPS + b)? true: false)

Definition at line 18 of file ComputeGeometry.inl.

◆ REAL_infinity

#define REAL_infinity   1.0e30

Definition at line 14 of file ComputeGeometry.inl.

◆ REAL_LESS

#define REAL_LESS ( a,
b )
Value:
((a + REAL_EPS < b)? true: false)

Definition at line 19 of file ComputeGeometry.inl.

◆ REAL_ZERO

#define REAL_ZERO   1.0e-5

Definition at line 15 of file ComputeGeometry.inl.