8 template<
typename TDataType>
13 typedef typename TDataType::Real
Real;
14 typedef typename TDataType::Coord
Coord;
25 void load(std::string filename,
bool inverted =
false);
37 std::shared_ptr<DistanceField3D<TDataType>>
m_cSDF;
void constrain(DArray< Coord > &position, DArray< Coord > &velocity, DistanceField3D< TDataType > &sdf, Real dt)
DEF_VAR(Real, TangentialFriction, Real(0.95), "Tangential friction")
void setCylinder(Coord center, Real r, Real height, Real distance, int axis, bool inverted=false)
~BoundaryConstraint() override
DeviceArrayField< Coord > m_position
std::shared_ptr< DistanceField3D< TDataType > > m_cSDF
DEF_VAR(Real, NormalFriction, Real(0), "Normal friction")
void setSphere(Coord center, Real r, Real distance, bool inverted=false)
void constrain() override
void load(std::string filename, bool inverted=false)
void setCube(Coord lo, Coord hi, Real distance, bool inverted=false)
DeviceArrayField< Coord > m_velocity
bool constrain(DArray< Coord > &position, DArray< Coord > &velocity, Real dt)
This is an implementation of AdditiveCCD based on peridyno.
Array< T, DeviceType::GPU > DArray
FArray< T, DeviceType::GPU > DeviceArrayField