PeriDyno 1.0.0
Loading...
Searching...
No Matches
Distance3D.h
Go to the documentation of this file.
1
16#pragma once
17#include "Vector.h"
18#include "Matrix.h"
19#include "Quat.h"
20
22
24#include "Topology/EdgeSet.h"
25
26namespace dyno
27{
28 template<typename Real>
30 {
31 public:
34
35 public:
36
37 int id = -1; //used to tag the primitive id
38 Real signed_distance; //signed distance
39
42 };
43
55 template<typename Real, typename Coord, DeviceType deviceType, typename IndexType>
57
58 template<typename Real, typename Coord, DeviceType deviceType, typename IndexType>
61 Coord point,
66 Array<Coord, deviceType>& edgeNormal,
67 Array<Coord, deviceType>& vertexNormal,
68 List<IndexType>& list,
69 Real dHat = 0);
70
71
83 template<typename Real, typename Coord, DeviceType deviceType, typename IndexType>
85
86}
87
88#include "Distance3D.inl"
Implementation of quaternion.
double Real
Definition Typedef.inl:23
This class is designed to be elegant, so it can be directly passed to GPU as parameters.
Definition Array.h:27
Be aware do not use this structure on GPU if the data size is large.
Definition List.h:21
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
DYN_FUNC bool calculateSignedDistance2TriangleSet(ProjectedPoint3D< Real > &p3d, Coord point, Array< Coord, deviceType > &vertices, Array< TopologyModule::Triangle, deviceType > &indices, List< IndexType > &list, Real dHat=0)
Calculate the signed distance from a point to a triangular mesh.
Definition Distance3D.inl:4
DYN_FUNC bool calculateDistance2TriangleSet(ProjectedPoint3D< Real > &p3d, Coord point, Array< Coord, deviceType > &vertices, Array< TopologyModule::Triangle, deviceType > &indices, List< IndexType > &list, Real dHat=0)
Calculate the distance from a point to a triangular mesh.
DYN_FUNC bool calculateSignedDistance2TriangleSetFromNormal(ProjectedPoint3D< Real > &p3d, Coord point, Array< Coord, deviceType > &vertices, Array< TopologyModule::Edge, deviceType > &edges, Array< TopologyModule::Triangle, deviceType > &triangles, Array< TopologyModule::Tri2Edg, deviceType > &t2e, Array< Coord, deviceType > &edgeNormal, Array< Coord, deviceType > &vertexNormal, List< IndexType > &list, Real dHat=0)
Vector< Real, 2 > Coord2D
Definition Distance3D.h:32
Vector< Real, 3 > Coord3D
Definition Distance3D.h:33