enn0x 11 years ago
parent
commit
e2c6e3fb56
2 changed files with 26 additions and 0 deletions
  1. 23 0
      panda/src/bullet/bulletSoftBodyNode.cxx
  2. 3 0
      panda/src/bullet/bulletSoftBodyNode.h

+ 23 - 0
panda/src/bullet/bulletSoftBodyNode.cxx

@@ -1135,3 +1135,26 @@ append_angular_joint(BulletBodyNode *body, const LVector3 &axis, PN_stdfloat erp
   _soft->appendAngularJoint(as, ptr);
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: BulletSoftBodyNode::set_wind_velocity
+//       Access: Published
+//  Description:
+////////////////////////////////////////////////////////////////////
+void BulletSoftBodyNode::
+set_wind_velocity(const LVector3 &velocity) {
+
+  nassertv(!velocity.is_nan());
+  _soft->setWindVelocity(LVecBase3_to_btVector3(velocity));
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: BulletSoftBodyNode::get_wind_velocity
+//       Access: Published
+//  Description:
+////////////////////////////////////////////////////////////////////
+LVector3 BulletSoftBodyNode::
+get_wind_velocity() const {
+
+  return btVector3_to_LVector3(_soft->getWindVelocity());
+}
+

+ 3 - 0
panda/src/bullet/bulletSoftBodyNode.h

@@ -96,6 +96,9 @@ PUBLISHED:
   void add_velocity(const LVector3 &velocity);
   void add_velocity(const LVector3 &velocity, int node);
 
+  void set_wind_velocity(const LVector3 &velocity);
+  LVector3 get_wind_velocity() const;
+
   void set_pose(bool bvolume, bool bframe);
 
   BoundingBox get_aabb() const;