PeriDyno 1.0.0
Loading...
Searching...
No Matches
PrimitiveSweep3D.h
Go to the documentation of this file.
1
11#ifndef PHYSIKA_PRIMITIVE_SWEEP_3D
12#define PHYSIKA_PRIMITIVE_SWEEP_3D
13
14#include "Primitive3D.h"
15
16namespace dyno
17{
18 template <typename Real> class TPointSweep3D;
19 template <typename Real> class TTriangleSweep3D;
20
21 template<typename Real>
23 {
24 public:
25 typedef typename ::dyno::Vector<Real, 2> Coord2D;
26 typedef typename ::dyno::Vector<Real, 3> Coord3D;
27
28 public:
30 DYN_FUNC TPointSweep3D(const TPointSweep3D& point_sweep);
31
41 DYN_FUNC bool intersect(const TTriangleSweep3D<Real>& triangle_sweep, typename TTriangle3D<Real>::Param& baryc, Real& t, const Real threshold = Real(0.00001)) const;
42
49 DYN_FUNC TPoint3D<Real> interpolate(Real t) const;
50
53 };
54
55
56
57 template<typename Real>
75
76#ifdef PRECISION_FLOAT
79#else
82#endif
83
84}
85
86#include "PrimitiveSweep3D.inl"
87
88#endif
89
double Real
Definition Typedef.inl:23
0D geometric primitive in three-dimensional space
DYN_FUNC TPointSweep3D(TPoint3D< Real > &start, TPoint3D< Real > &end)
DYN_FUNC TPointSweep3D(const TPointSweep3D &point_sweep)
DYN_FUNC bool intersect(const TTriangleSweep3D< Real > &triangle_sweep, typename TTriangle3D< Real >::Param &baryc, Real &t, const Real threshold=Real(0.00001)) const
Calculate the possible intersection for a moving point and a moving triangle. We assume both the poin...
::dyno::Vector< Real, 3 > Coord3D
DYN_FUNC TPoint3D< Real > interpolate(Real t) const
Return the intermediate state for a point.
::dyno::Vector< Real, 2 > Coord2D
DYN_FUNC TTriangleSweep3D(TTriangle3D< Real > &start, TTriangle3D< Real > &end)
TTriangle3D< double > end_triangle
DYN_FUNC TTriangleSweep3D(const TTriangleSweep3D &triangle_sweep)
TTriangle3D< double > start_triangle
DYN_FUNC TTriangle3D< Real > interpolate(Real t) const
Return the intermediate state for a triangle.
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
TPointSweep3D< double > PointSweep3D
TTriangleSweep3D< double > TriangleSweep3D