15 #include "bulletSoftBodyWorldInfo.h" 22 BulletSoftBodyWorldInfo::
23 BulletSoftBodyWorldInfo(btSoftBodyWorldInfo &info) : _info(info) {
32 void BulletSoftBodyWorldInfo::
33 garbage_collect(
int lifetime) {
35 _info.m_sparsesdf.GarbageCollect(lifetime);
43 void BulletSoftBodyWorldInfo::
44 set_air_density(PN_stdfloat density) {
46 _info.air_density = (btScalar)density;
54 void BulletSoftBodyWorldInfo::
55 set_water_density(PN_stdfloat density) {
57 _info.water_density = (btScalar)density;
65 void BulletSoftBodyWorldInfo::
66 set_water_offset(PN_stdfloat offset) {
68 _info.water_offset = (btScalar)offset;
76 void BulletSoftBodyWorldInfo::
77 set_water_normal(
const LVector3 &normal) {
79 nassertv(!normal.
is_nan());
80 _info.water_normal.setValue(normal.get_x(), normal.get_y(), normal.get_z());
88 void BulletSoftBodyWorldInfo::
89 set_gravity(
const LVector3 &gravity) {
91 nassertv(!gravity.
is_nan());
92 _info.m_gravity.setValue(gravity.get_x(), gravity.get_y(), gravity.get_z());
100 PN_stdfloat BulletSoftBodyWorldInfo::
101 get_air_density()
const {
103 return (PN_stdfloat)_info.air_density;
111 PN_stdfloat BulletSoftBodyWorldInfo::
112 get_water_density()
const {
114 return (PN_stdfloat)_info.water_density;
122 PN_stdfloat BulletSoftBodyWorldInfo::
123 get_water_offset()
const {
125 return (PN_stdfloat)_info.water_offset;
134 get_water_normal()
const {
136 return btVector3_to_LVector3(_info.water_normal);
145 get_gravity()
const {
147 return btVector3_to_LVector3(_info.m_gravity);
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
bool is_nan() const
Returns true if any component of the vector is not-a-number, false otherwise.