Browse Source

Bullet double precision support (experimental).

enn0x 14 years ago
parent
commit
db54994233
81 changed files with 1124 additions and 1099 deletions
  1. 12 12
      panda/src/bullet/bulletAllHitsRayResult.cxx
  2. 6 6
      panda/src/bullet/bulletAllHitsRayResult.h
  3. 4 4
      panda/src/bullet/bulletBodyNode.I
  4. 22 22
      panda/src/bullet/bulletBodyNode.cxx
  5. 16 16
      panda/src/bullet/bulletBodyNode.h
  6. 9 9
      panda/src/bullet/bulletBoxShape.cxx
  7. 3 3
      panda/src/bullet/bulletBoxShape.h
  8. 4 4
      panda/src/bullet/bulletCapsuleShape.I
  9. 1 1
      panda/src/bullet/bulletCapsuleShape.cxx
  10. 3 3
      panda/src/bullet/bulletCapsuleShape.h
  11. 29 29
      panda/src/bullet/bulletCharacterControllerNode.cxx
  12. 13 13
      panda/src/bullet/bulletCharacterControllerNode.h
  13. 10 10
      panda/src/bullet/bulletClosestHitRayResult.cxx
  14. 5 5
      panda/src/bullet/bulletClosestHitRayResult.h
  15. 10 10
      panda/src/bullet/bulletClosestHitSweepResult.cxx
  16. 5 5
      panda/src/bullet/bulletClosestHitSweepResult.h
  17. 4 4
      panda/src/bullet/bulletConeShape.I
  18. 4 4
      panda/src/bullet/bulletConeShape.cxx
  19. 3 3
      panda/src/bullet/bulletConeShape.h
  20. 11 11
      panda/src/bullet/bulletConeTwistConstraint.cxx
  21. 9 9
      panda/src/bullet/bulletConeTwistConstraint.h
  22. 6 6
      panda/src/bullet/bulletConstraint.cxx
  23. 3 3
      panda/src/bullet/bulletConstraint.h
  24. 10 10
      panda/src/bullet/bulletConvexHullShape.cxx
  25. 2 2
      panda/src/bullet/bulletConvexHullShape.h
  26. 10 10
      panda/src/bullet/bulletConvexPointCloudShape.cxx
  27. 2 2
      panda/src/bullet/bulletConvexPointCloudShape.h
  28. 6 6
      panda/src/bullet/bulletCylinderShape.I
  29. 3 3
      panda/src/bullet/bulletCylinderShape.cxx
  30. 5 5
      panda/src/bullet/bulletCylinderShape.h
  31. 38 27
      panda/src/bullet/bulletDebugNode.cxx
  32. 7 7
      panda/src/bullet/bulletDebugNode.h
  33. 8 8
      panda/src/bullet/bulletGenericConstraint.cxx
  34. 5 5
      panda/src/bullet/bulletGenericConstraint.h
  35. 7 7
      panda/src/bullet/bulletGhostNode.cxx
  36. 1 1
      panda/src/bullet/bulletHeightfieldShape.cxx
  37. 1 1
      panda/src/bullet/bulletHeightfieldShape.h
  38. 4 4
      panda/src/bullet/bulletHelper.cxx
  39. 23 23
      panda/src/bullet/bulletHingeConstraint.cxx
  40. 15 15
      panda/src/bullet/bulletHingeConstraint.h
  41. 12 12
      panda/src/bullet/bulletManifoldPoint.cxx
  42. 6 6
      panda/src/bullet/bulletManifoldPoint.h
  43. 4 4
      panda/src/bullet/bulletPersistentManifold.cxx
  44. 2 2
      panda/src/bullet/bulletPersistentManifold.h
  45. 4 4
      panda/src/bullet/bulletPlaneShape.I
  46. 4 4
      panda/src/bullet/bulletPlaneShape.cxx
  47. 3 3
      panda/src/bullet/bulletPlaneShape.h
  48. 6 6
      panda/src/bullet/bulletRigidBodyNode.I
  49. 46 46
      panda/src/bullet/bulletRigidBodyNode.cxx
  50. 26 26
      panda/src/bullet/bulletRigidBodyNode.h
  51. 6 6
      panda/src/bullet/bulletShape.cxx
  52. 4 4
      panda/src/bullet/bulletShape.h
  53. 34 34
      panda/src/bullet/bulletSliderConstraint.cxx
  54. 18 18
      panda/src/bullet/bulletSliderConstraint.h
  55. 80 80
      panda/src/bullet/bulletSoftBodyConfig.I
  56. 40 40
      panda/src/bullet/bulletSoftBodyConfig.h
  57. 12 12
      panda/src/bullet/bulletSoftBodyMaterial.I
  58. 6 6
      panda/src/bullet/bulletSoftBodyMaterial.h
  59. 11 11
      panda/src/bullet/bulletSoftBodyNode.I
  60. 62 62
      panda/src/bullet/bulletSoftBodyNode.cxx
  61. 32 32
      panda/src/bullet/bulletSoftBodyNode.h
  62. 20 20
      panda/src/bullet/bulletSoftBodyWorldInfo.cxx
  63. 11 11
      panda/src/bullet/bulletSoftBodyWorldInfo.h
  64. 1 1
      panda/src/bullet/bulletSphereShape.I
  65. 1 1
      panda/src/bullet/bulletSphereShape.cxx
  66. 2 2
      panda/src/bullet/bulletSphereShape.h
  67. 14 14
      panda/src/bullet/bulletSphericalConstraint.cxx
  68. 7 7
      panda/src/bullet/bulletSphericalConstraint.h
  69. 15 15
      panda/src/bullet/bulletTriangleMesh.cxx
  70. 6 6
      panda/src/bullet/bulletTriangleMesh.h
  71. 4 4
      panda/src/bullet/bulletTriangleMeshShape.cxx
  72. 1 1
      panda/src/bullet/bulletTriangleMeshShape.h
  73. 24 24
      panda/src/bullet/bulletVehicle.I
  74. 9 9
      panda/src/bullet/bulletVehicle.cxx
  75. 20 20
      panda/src/bullet/bulletVehicle.h
  76. 86 86
      panda/src/bullet/bulletWheel.cxx
  77. 43 43
      panda/src/bullet/bulletWheel.h
  78. 20 20
      panda/src/bullet/bulletWorld.cxx
  79. 10 10
      panda/src/bullet/bulletWorld.h
  80. 62 48
      panda/src/bullet/bullet_utils.cxx
  81. 11 11
      panda/src/bullet/bullet_utils.h

+ 12 - 12
panda/src/bullet/bulletAllHitsRayResult.cxx

@@ -50,10 +50,10 @@ needsCollision(btBroadphaseProxy* proxy0) const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LPoint3f BulletAllHitsRayResult::
+LPoint3 BulletAllHitsRayResult::
 get_from_pos() const {
 get_from_pos() const {
 
 
-  return btVector3_to_LPoint3f(m_rayFromWorld);
+  return btVector3_to_LPoint3(m_rayFromWorld);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -61,10 +61,10 @@ get_from_pos() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LPoint3f BulletAllHitsRayResult::
+LPoint3 BulletAllHitsRayResult::
 get_to_pos() const {
 get_to_pos() const {
 
 
-  return btVector3_to_LPoint3f(m_rayToWorld);
+  return btVector3_to_LPoint3(m_rayToWorld);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -83,10 +83,10 @@ has_hits() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletAllHitsRayResult::
+PN_stdfloat BulletAllHitsRayResult::
 get_closest_hit_fraction() const {
 get_closest_hit_fraction() const {
 
 
-  return m_closestHitFraction;
+  return (PN_stdfloat)m_closestHitFraction;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -125,10 +125,10 @@ get_hit(int idx) const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletRayHit::
+PN_stdfloat BulletRayHit::
 get_hit_fraction() const {
 get_hit_fraction() const {
 
 
-  return _fraction;
+  return (PN_stdfloat)_fraction;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -147,10 +147,10 @@ get_node() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LPoint3f BulletRayHit::
+LPoint3 BulletRayHit::
 get_hit_pos() const {
 get_hit_pos() const {
 
 
-  return btVector3_to_LPoint3f(_pos);
+  return btVector3_to_LPoint3(_pos);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -158,9 +158,9 @@ get_hit_pos() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVector3f BulletRayHit::
+LVector3 BulletRayHit::
 get_hit_normal() const {
 get_hit_normal() const {
 
 
-  return btVector3_to_LVector3f(_normal);
+  return btVector3_to_LVector3(_normal);
 }
 }
 
 

+ 6 - 6
panda/src/bullet/bulletAllHitsRayResult.h

@@ -34,9 +34,9 @@ PUBLISHED:
   INLINE static BulletRayHit empty();
   INLINE static BulletRayHit empty();
 
 
   PandaNode *get_node() const;
   PandaNode *get_node() const;
-  LPoint3f get_hit_pos() const;
-  LVector3f get_hit_normal() const;
-  float get_hit_fraction() const;
+  LPoint3 get_hit_pos() const;
+  LVector3 get_hit_normal() const;
+  PN_stdfloat get_hit_fraction() const;
 
 
 private:
 private:
   btCollisionObject *_object; 
   btCollisionObject *_object; 
@@ -56,11 +56,11 @@ struct EXPCL_PANDABULLET BulletAllHitsRayResult : public btCollisionWorld::AllHi
 PUBLISHED:
 PUBLISHED:
   INLINE static BulletAllHitsRayResult empty();
   INLINE static BulletAllHitsRayResult empty();
 
 
-  LPoint3f get_from_pos() const;
-  LPoint3f get_to_pos() const;
+  LPoint3 get_from_pos() const;
+  LPoint3 get_to_pos() const;
 
 
   bool has_hits() const;
   bool has_hits() const;
-  float get_closest_hit_fraction() const;
+  PN_stdfloat get_closest_hit_fraction() const;
 
 
   int get_num_hits() const;
   int get_num_hits() const;
   const BulletRayHit get_hit(int idx) const;
   const BulletRayHit get_hit(int idx) const;

+ 4 - 4
panda/src/bullet/bulletBodyNode.I

@@ -152,7 +152,7 @@ set_kinematic(bool value) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletBodyNode::
+INLINE PN_stdfloat BulletBodyNode::
 get_restitution() const {
 get_restitution() const {
 
 
   return get_object()->getRestitution();
   return get_object()->getRestitution();
@@ -164,7 +164,7 @@ get_restitution() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletBodyNode::
 INLINE void BulletBodyNode::
-set_restitution(float restitution) {
+set_restitution(PN_stdfloat restitution) {
 
 
   return get_object()->setRestitution(restitution);
   return get_object()->setRestitution(restitution);
 }
 }
@@ -174,7 +174,7 @@ set_restitution(float restitution) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletBodyNode::
+INLINE PN_stdfloat BulletBodyNode::
 get_friction() const {
 get_friction() const {
 
 
   return get_object()->getFriction();
   return get_object()->getFriction();
@@ -186,7 +186,7 @@ get_friction() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletBodyNode::
 INLINE void BulletBodyNode::
-set_friction(float friction) {
+set_friction(PN_stdfloat friction) {
 
 
   return get_object()->setFriction(friction);
   return get_object()->setFriction(friction);
 }
 }

+ 22 - 22
panda/src/bullet/bulletBodyNode.cxx

@@ -318,10 +318,10 @@ is_identity(btTransform &trans) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LPoint3f BulletBodyNode::
+LPoint3 BulletBodyNode::
 get_shape_pos(int idx) const {
 get_shape_pos(int idx) const {
 
 
-  nassertr(idx >= 0 && idx < (int)_shapes.size(), LPoint3f::zero());
+  nassertr(idx >= 0 && idx < (int)_shapes.size(), LPoint3::zero());
   return get_shape_mat(idx).get_row3(3);
   return get_shape_mat(idx).get_row3(3);
 }
 }
 
 
@@ -330,17 +330,17 @@ get_shape_pos(int idx) const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LMatrix4f BulletBodyNode::
+LMatrix4 BulletBodyNode::
 get_shape_mat(int idx) const {
 get_shape_mat(int idx) const {
 
 
-  nassertr(idx >= 0 && idx < (int)_shapes.size(), LMatrix4f::ident_mat());
+  nassertr(idx >= 0 && idx < (int)_shapes.size(), LMatrix4::ident_mat());
 
 
   btCollisionShape *root = get_object()->getCollisionShape();
   btCollisionShape *root = get_object()->getCollisionShape();
   if (root->getShapeType() == COMPOUND_SHAPE_PROXYTYPE) {
   if (root->getShapeType() == COMPOUND_SHAPE_PROXYTYPE) {
     btCompoundShape *compound = (btCompoundShape *)root;
     btCompoundShape *compound = (btCompoundShape *)root;
 
 
     btTransform trans = compound->getChildTransform(idx);
     btTransform trans = compound->getChildTransform(idx);
-    return btTrans_to_LMatrix4f(trans);
+    return btTrans_to_LMatrix4(trans);
 
 
     // The above code assumes that shape's index in _shapes member
     // The above code assumes that shape's index in _shapes member
     // is the same as the shapes index within the compound. If it
     // is the same as the shapes index within the compound. If it
@@ -351,13 +351,13 @@ get_shape_mat(int idx) const {
     for (int i=0; i<compound->getNumChildShapes(); i++) {
     for (int i=0; i<compound->getNumChildShapes(); i++) {
       if (compound->getChildShape(i) == shape) {
       if (compound->getChildShape(i) == shape) {
          btTransform trans = compound->getChildTransform(idx);
          btTransform trans = compound->getChildTransform(idx);
-         return btTrans_to_LMatrix4f(trans);
+         return btTrans_to_LMatrix4(trans);
       }
       }
     }
     }
     */
     */
   }
   }
 
 
-  return LMatrix4f::ident_mat();
+  return LMatrix4::ident_mat();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -379,7 +379,7 @@ shape_changed() {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletBodyNode::
 void BulletBodyNode::
-set_deactivation_time(float dt) {
+set_deactivation_time(PN_stdfloat dt) {
 
 
   get_object()->setDeactivationTime(dt);
   get_object()->setDeactivationTime(dt);
 }
 }
@@ -389,7 +389,7 @@ set_deactivation_time(float dt) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletBodyNode::
+PN_stdfloat BulletBodyNode::
 get_deactivation_time() const {
 get_deactivation_time() const {
 
 
   return get_object()->getDeactivationTime();
   return get_object()->getDeactivationTime();
@@ -479,10 +479,10 @@ check_collision_with(PandaNode *node) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVecBase3f BulletBodyNode::
+LVecBase3 BulletBodyNode::
 get_anisotropic_friction() const {
 get_anisotropic_friction() const {
 
 
-  return btVector3_to_LVecBase3f(get_object()->getAnisotropicFriction());
+  return btVector3_to_LVecBase3(get_object()->getAnisotropicFriction());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -491,10 +491,10 @@ get_anisotropic_friction() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletBodyNode::
 void BulletBodyNode::
-set_anisotropic_friction(const LVecBase3f &friction) {
+set_anisotropic_friction(const LVecBase3 &friction) {
 
 
   nassertv(!friction.is_nan());
   nassertv(!friction.is_nan());
-  get_object()->setAnisotropicFriction(LVecBase3f_to_btVector3(friction));
+  get_object()->setAnisotropicFriction(LVecBase3_to_btVector3(friction));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -513,7 +513,7 @@ has_contact_response() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletBodyNode::
+PN_stdfloat BulletBodyNode::
 get_contact_processing_threshold() const {
 get_contact_processing_threshold() const {
 
 
   return get_object()->getContactProcessingThreshold();
   return get_object()->getContactProcessingThreshold();
@@ -526,7 +526,7 @@ get_contact_processing_threshold() const {
 //               contacts, if the distance is above this threshold.
 //               contacts, if the distance is above this threshold.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletBodyNode::
 void BulletBodyNode::
-set_contact_processing_threshold(float threshold) {
+set_contact_processing_threshold(PN_stdfloat threshold) {
 
 
   get_object()->setContactProcessingThreshold(threshold);
   get_object()->setContactProcessingThreshold(threshold);
 }
 }
@@ -536,7 +536,7 @@ set_contact_processing_threshold(float threshold) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletBodyNode::
+PN_stdfloat BulletBodyNode::
 get_ccd_swept_sphere_radius() const {
 get_ccd_swept_sphere_radius() const {
 
 
   return get_object()->getCcdSweptSphereRadius();
   return get_object()->getCcdSweptSphereRadius();
@@ -548,7 +548,7 @@ get_ccd_swept_sphere_radius() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletBodyNode::
 void BulletBodyNode::
-set_ccd_swept_sphere_radius(float radius) {
+set_ccd_swept_sphere_radius(PN_stdfloat radius) {
 
 
   return get_object()->setCcdSweptSphereRadius(radius);
   return get_object()->setCcdSweptSphereRadius(radius);
 }
 }
@@ -558,7 +558,7 @@ set_ccd_swept_sphere_radius(float radius) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletBodyNode::
+PN_stdfloat BulletBodyNode::
 get_ccd_motion_threshold() const {
 get_ccd_motion_threshold() const {
 
 
   return get_object()->getCcdMotionThreshold();
   return get_object()->getCcdMotionThreshold();
@@ -570,7 +570,7 @@ get_ccd_motion_threshold() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletBodyNode::
 void BulletBodyNode::
-set_ccd_motion_threshold(float threshold) {
+set_ccd_motion_threshold(PN_stdfloat threshold) {
 
 
   return get_object()->setCcdMotionThreshold(threshold);
   return get_object()->setCcdMotionThreshold(threshold);
 }
 }
@@ -621,9 +621,9 @@ add_shapes_from_collision_solids(CollisionNode *cnode) {
       }
       }
 
 
       for (int i=2; i < polygon->get_num_points(); i++ ) {
       for (int i=2; i < polygon->get_num_points(); i++ ) {
-        LPoint3f p1 = polygon->get_point(0);
-        LPoint3f p2 = polygon->get_point(i-1);
-        LPoint3f p3 = polygon->get_point(i);
+        LPoint3 p1 = polygon->get_point(0);
+        LPoint3 p2 = polygon->get_point(i-1);
+        LPoint3 p3 = polygon->get_point(i);
 
 
         mesh->add_triangle(p1, p2, p3, true);
         mesh->add_triangle(p1, p2, p3, true);
       }
       }

+ 16 - 16
panda/src/bullet/bulletBodyNode.h

@@ -45,8 +45,8 @@ PUBLISHED:
   INLINE BulletShape *get_shape(int idx) const;
   INLINE BulletShape *get_shape(int idx) const;
   MAKE_SEQ(get_shapes, get_num_shapes, get_shape);
   MAKE_SEQ(get_shapes, get_num_shapes, get_shape);
 
 
-  LPoint3f get_shape_pos(int idx) const;
-  LMatrix4f get_shape_mat(int idx) const;
+  LPoint3 get_shape_pos(int idx) const;
+  LMatrix4 get_shape_mat(int idx) const;
 
 
   void add_shapes_from_collision_solids(CollisionNode *cnode);
   void add_shapes_from_collision_solids(CollisionNode *cnode);
 
 
@@ -68,15 +68,15 @@ PUBLISHED:
 
 
   bool has_contact_response() const;
   bool has_contact_response() const;
 
 
-  float get_contact_processing_threshold() const;
-  void set_contact_processing_threshold(float threshold);
+  PN_stdfloat get_contact_processing_threshold() const;
+  void set_contact_processing_threshold(PN_stdfloat threshold);
 
 
   // Deactivation
   // Deactivation
   bool is_active() const;
   bool is_active() const;
   void set_active(bool active, bool force=false);
   void set_active(bool active, bool force=false);
 
 
-  void set_deactivation_time(float dt);
-  float get_deactivation_time() const;
+  void set_deactivation_time(PN_stdfloat dt);
+  PN_stdfloat get_deactivation_time() const;
 
 
   void set_deactivation_enabled(const bool enabled, const bool force=false);
   void set_deactivation_enabled(const bool enabled, const bool force=false);
   bool is_deactivation_enabled() const;
   bool is_deactivation_enabled() const;
@@ -86,21 +86,21 @@ PUBLISHED:
   INLINE bool is_debug_enabled() const;
   INLINE bool is_debug_enabled() const;
 
 
   // Friction and Restitution
   // Friction and Restitution
-  INLINE float get_restitution() const;
-  INLINE void set_restitution(float restitution);
+  INLINE PN_stdfloat get_restitution() const;
+  INLINE void set_restitution(PN_stdfloat restitution);
 
 
-  INLINE float get_friction() const;
-  INLINE void set_friction(float friction);
+  INLINE PN_stdfloat get_friction() const;
+  INLINE void set_friction(PN_stdfloat friction);
 
 
   INLINE bool has_anisotropic_friction() const;
   INLINE bool has_anisotropic_friction() const;
-  void set_anisotropic_friction(const LVecBase3f &friction);
-  LVecBase3f get_anisotropic_friction() const;
+  void set_anisotropic_friction(const LVecBase3 &friction);
+  LVecBase3 get_anisotropic_friction() const;
 
 
   // CCD
   // CCD
-  float get_ccd_swept_sphere_radius() const;
-  float get_ccd_motion_threshold() const;
-  void set_ccd_swept_sphere_radius(float radius);
-  void set_ccd_motion_threshold(float threshold);
+  PN_stdfloat get_ccd_swept_sphere_radius() const;
+  PN_stdfloat get_ccd_motion_threshold() const;
+  void set_ccd_swept_sphere_radius(PN_stdfloat radius);
+  void set_ccd_motion_threshold(PN_stdfloat threshold);
 
 
 public:
 public:
   virtual btCollisionObject *get_object() const = 0;
   virtual btCollisionObject *get_object() const = 0;

+ 9 - 9
panda/src/bullet/bulletBoxShape.cxx

@@ -23,9 +23,9 @@ TypeHandle BulletBoxShape::_type_handle;
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 BulletBoxShape::
 BulletBoxShape::
-BulletBoxShape(const LVecBase3f &halfExtents) {
+BulletBoxShape(const LVecBase3 &halfExtents) {
 
 
-  btVector3 btHalfExtents = LVecBase3f_to_btVector3(halfExtents);
+  btVector3 btHalfExtents = LVecBase3_to_btVector3(halfExtents);
 
 
   _shape = new btBoxShape(btHalfExtents);
   _shape = new btBoxShape(btHalfExtents);
   _shape->setUserPointer(this);
   _shape->setUserPointer(this);
@@ -47,10 +47,10 @@ ptr() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVecBase3f BulletBoxShape::
+LVecBase3 BulletBoxShape::
 get_half_extents_without_marging() const {
 get_half_extents_without_marging() const {
 
 
-  return btVector3_to_LVecBase3f(_shape->getHalfExtentsWithoutMargin());
+  return btVector3_to_LVecBase3(_shape->getHalfExtentsWithoutMargin());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -58,10 +58,10 @@ get_half_extents_without_marging() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVecBase3f BulletBoxShape::
+LVecBase3 BulletBoxShape::
 get_half_extents_with_marging() const {
 get_half_extents_with_marging() const {
 
 
-  return btVector3_to_LVecBase3f(_shape->getHalfExtentsWithMargin());
+  return btVector3_to_LVecBase3(_shape->getHalfExtentsWithMargin());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -72,10 +72,10 @@ get_half_extents_with_marging() const {
 BulletBoxShape *BulletBoxShape::
 BulletBoxShape *BulletBoxShape::
 make_from_solid(const CollisionBox *solid) {
 make_from_solid(const CollisionBox *solid) {
 
 
-  LPoint3f p0 = solid->get_min();
-  LPoint3f p1 = solid->get_max();
+  LPoint3 p0 = solid->get_min();
+  LPoint3 p1 = solid->get_max();
 
 
-  LVecBase3f extents(p1.get_x() - p0.get_x() / 2.0,
+  LVecBase3 extents(p1.get_x() - p0.get_x() / 2.0,
                      p1.get_y() - p0.get_y() / 2.0,
                      p1.get_y() - p0.get_y() / 2.0,
                      p1.get_z() - p0.get_z() / 2.0);
                      p1.get_z() - p0.get_z() / 2.0);
 
 

+ 3 - 3
panda/src/bullet/bulletBoxShape.h

@@ -31,11 +31,11 @@
 class EXPCL_PANDABULLET BulletBoxShape : public BulletShape {
 class EXPCL_PANDABULLET BulletBoxShape : public BulletShape {
 
 
 PUBLISHED:
 PUBLISHED:
-  BulletBoxShape(const LVecBase3f &halfExtents);
+  BulletBoxShape(const LVecBase3 &halfExtents);
   INLINE ~BulletBoxShape();
   INLINE ~BulletBoxShape();
 
 
-  LVecBase3f get_half_extents_without_marging() const;
-  LVecBase3f get_half_extents_with_marging() const;
+  LVecBase3 get_half_extents_without_marging() const;
+  LVecBase3 get_half_extents_with_marging() const;
 
 
   static BulletBoxShape *make_from_solid(const CollisionBox *solid);
   static BulletBoxShape *make_from_solid(const CollisionBox *solid);
 
 

+ 4 - 4
panda/src/bullet/bulletCapsuleShape.I

@@ -28,10 +28,10 @@ INLINE BulletCapsuleShape::
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletCapsuleShape::
+INLINE PN_stdfloat BulletCapsuleShape::
 get_radius() const {
 get_radius() const {
 
 
-  return _shape->getRadius();
+  return (PN_stdfloat)_shape->getRadius();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -39,9 +39,9 @@ get_radius() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletCapsuleShape::
+INLINE PN_stdfloat BulletCapsuleShape::
 get_half_height() const {
 get_half_height() const {
 
 
-  return _shape->getHalfHeight();
+  return (PN_stdfloat)_shape->getHalfHeight();
 }
 }
 
 

+ 1 - 1
panda/src/bullet/bulletCapsuleShape.cxx

@@ -22,7 +22,7 @@ TypeHandle BulletCapsuleShape::_type_handle;
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 BulletCapsuleShape::
 BulletCapsuleShape::
-BulletCapsuleShape(float radius, float height, BulletUpAxis up) {
+BulletCapsuleShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up) {
 
 
   switch (up) {
   switch (up) {
   case X_up:
   case X_up:

+ 3 - 3
panda/src/bullet/bulletCapsuleShape.h

@@ -28,11 +28,11 @@
 class EXPCL_PANDABULLET BulletCapsuleShape : public BulletShape {
 class EXPCL_PANDABULLET BulletCapsuleShape : public BulletShape {
 
 
 PUBLISHED:
 PUBLISHED:
-  BulletCapsuleShape(float radius, float height, BulletUpAxis up=Z_up);
+  BulletCapsuleShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up=Z_up);
   INLINE ~BulletCapsuleShape();
   INLINE ~BulletCapsuleShape();
 
 
-  INLINE float get_radius() const;
-  INLINE float get_half_height() const;
+  INLINE PN_stdfloat get_radius() const;
+  INLINE PN_stdfloat get_half_height() const;
 
 
 public:
 public:
   virtual btCollisionShape *ptr() const;
   virtual btCollisionShape *ptr() const;

+ 29 - 29
panda/src/bullet/bulletCharacterControllerNode.cxx

@@ -22,7 +22,7 @@ TypeHandle BulletCharacterControllerNode::_type_handle;
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 BulletCharacterControllerNode::
 BulletCharacterControllerNode::
-BulletCharacterControllerNode(BulletShape *shape, float step_height, const char *name) : PandaNode(name) {
+BulletCharacterControllerNode(BulletShape *shape, PN_stdfloat step_height, const char *name) : PandaNode(name) {
 
 
   // Synchronised transform
   // Synchronised transform
   _sync = TransformState::make_identity();
   _sync = TransformState::make_identity();
@@ -177,7 +177,7 @@ safe_to_transform() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletCharacterControllerNode::
 void BulletCharacterControllerNode::
-set_linear_velocity(const LVector3f &velocity, bool is_local) {
+set_linear_velocity(const LVector3 &velocity, bool is_local) {
 
 
   nassertv(!velocity.is_nan());
   nassertv(!velocity.is_nan());
 
 
@@ -191,7 +191,7 @@ set_linear_velocity(const LVector3f &velocity, bool is_local) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletCharacterControllerNode::
 void BulletCharacterControllerNode::
-set_angular_velocity(float omega) {
+set_angular_velocity(PN_stdfloat omega) {
 
 
   _angular_velocity = omega;
   _angular_velocity = omega;
 }
 }
@@ -202,7 +202,7 @@ set_angular_velocity(float omega) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletCharacterControllerNode::
 void BulletCharacterControllerNode::
-sync_p2b(float dt) {
+sync_p2b(PN_stdfloat dt) {
 
 
   // Synchronise global transform
   // Synchronise global transform
   transform_changed();
   transform_changed();
@@ -222,10 +222,10 @@ sync_p2b(float dt) {
   if (_linear_velocity_is_local) {
   if (_linear_velocity_is_local) {
     btTransform xform = _ghost->getWorldTransform();
     btTransform xform = _ghost->getWorldTransform();
     xform.setOrigin(btVector3(0.0f, 0.0f, 0.0f));
     xform.setOrigin(btVector3(0.0f, 0.0f, 0.0f));
-    v = xform(LVecBase3f_to_btVector3(_linear_velocity));
+    v = xform(LVecBase3_to_btVector3(_linear_velocity));
   }
   }
   else {
   else {
-    v = LVecBase3f_to_btVector3(_linear_velocity);
+    v = LVecBase3_to_btVector3(_linear_velocity);
   }
   }
 
 
   //_character->setVelocityForTimeInterval(v, dt);
   //_character->setVelocityForTimeInterval(v, dt);
@@ -243,13 +243,13 @@ void BulletCharacterControllerNode::
 sync_b2p() {
 sync_b2p() {
 
 
   NodePath np = NodePath::any_path((PandaNode *)this);
   NodePath np = NodePath::any_path((PandaNode *)this);
-  LVecBase3f scale = np.get_net_transform()->get_scale();
+  LVecBase3 scale = np.get_net_transform()->get_scale();
 
 
   btTransform trans = _ghost->getWorldTransform();
   btTransform trans = _ghost->getWorldTransform();
   CPT(TransformState) ts = btTrans_to_TransformState(trans, scale);
   CPT(TransformState) ts = btTrans_to_TransformState(trans, scale);
 
 
-  LMatrix4f m_sync = _sync->get_mat();
-  LMatrix4f m_ts = ts->get_mat();
+  LMatrix4 m_sync = _sync->get_mat();
+  LMatrix4 m_ts = ts->get_mat();
 
 
   if (!m_sync.almost_equal(m_ts)) {
   if (!m_sync.almost_equal(m_ts)) {
     _sync = ts;
     _sync = ts;
@@ -272,19 +272,19 @@ transform_changed() {
   NodePath np = NodePath::any_path((PandaNode *)this);
   NodePath np = NodePath::any_path((PandaNode *)this);
   CPT(TransformState) ts = np.get_net_transform();
   CPT(TransformState) ts = np.get_net_transform();
 
 
-  LMatrix4f m_sync = _sync->get_mat();
-  LMatrix4f m_ts = ts->get_mat();
+  LMatrix4 m_sync = _sync->get_mat();
+  LMatrix4 m_ts = ts->get_mat();
 
 
   if (!m_sync.almost_equal(m_ts)) {
   if (!m_sync.almost_equal(m_ts)) {
     _sync = ts;
     _sync = ts;
 
 
     // Get translation, heading and scale
     // Get translation, heading and scale
-    LPoint3f pos = ts->get_pos();
-    float heading = ts->get_hpr().get_x();
-    LVecBase3f scale = ts->get_scale();
+    LPoint3 pos = ts->get_pos();
+    PN_stdfloat heading = ts->get_hpr().get_x();
+    LVecBase3 scale = ts->get_scale();
 
 
     // Set translation
     // Set translation
-    _character->warp(LVecBase3f_to_btVector3(pos));
+    _character->warp(LVecBase3_to_btVector3(pos));
 
 
     // Set Heading
     // Set Heading
     btMatrix3x3 m = _ghost->getWorldTransform().getBasis();
     btMatrix3x3 m = _ghost->getWorldTransform().getBasis();
@@ -349,9 +349,9 @@ do_jump() {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletCharacterControllerNode::
 void BulletCharacterControllerNode::
-set_fall_speed(float fall_speed) {
+set_fall_speed(PN_stdfloat fall_speed) {
 
 
-  _character->setFallSpeed(fall_speed);
+  _character->setFallSpeed((btScalar)fall_speed);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -360,9 +360,9 @@ set_fall_speed(float fall_speed) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletCharacterControllerNode::
 void BulletCharacterControllerNode::
-set_jump_speed(float jump_speed) {
+set_jump_speed(PN_stdfloat jump_speed) {
 
 
-  _character->setJumpSpeed(jump_speed);
+  _character->setJumpSpeed((btScalar)jump_speed);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -371,9 +371,9 @@ set_jump_speed(float jump_speed) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletCharacterControllerNode::
 void BulletCharacterControllerNode::
-set_max_jump_height(float max_jump_height) {
+set_max_jump_height(PN_stdfloat max_jump_height) {
 
 
-  _character->setMaxJumpHeight(max_jump_height);
+  _character->setMaxJumpHeight((btScalar)max_jump_height);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -382,9 +382,9 @@ set_max_jump_height(float max_jump_height) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletCharacterControllerNode::
 void BulletCharacterControllerNode::
-set_max_slope(float max_slope) {
+set_max_slope(PN_stdfloat max_slope) {
 
 
-  _character->setMaxSlope(max_slope);
+  _character->setMaxSlope((btScalar)max_slope);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -392,20 +392,20 @@ set_max_slope(float max_slope) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletCharacterControllerNode::
+PN_stdfloat BulletCharacterControllerNode::
 get_max_slope() const {
 get_max_slope() const {
 
 
-  return _character->getMaxSlope();
+  return (PN_stdfloat)_character->getMaxSlope();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: BulletCharacterControllerNode::get_gravity
 //     Function: BulletCharacterControllerNode::get_gravity
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletCharacterControllerNode::
+PN_stdfloat BulletCharacterControllerNode::
 get_gravity() const {
 get_gravity() const {
 
 
-  return _character->getGravity();
+  return (PN_stdfloat)_character->getGravity();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -413,9 +413,9 @@ get_gravity() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletCharacterControllerNode::
 void BulletCharacterControllerNode::
-set_gravity(float gravity) {
+set_gravity(PN_stdfloat gravity) {
 
 
-  _character->setGravity((btScalar) gravity);
+  _character->setGravity((btScalar)gravity);
 }
 }
 
 
 
 

+ 13 - 13
panda/src/bullet/bulletCharacterControllerNode.h

@@ -34,22 +34,22 @@
 class EXPCL_PANDABULLET BulletCharacterControllerNode : public PandaNode {
 class EXPCL_PANDABULLET BulletCharacterControllerNode : public PandaNode {
 
 
 PUBLISHED:
 PUBLISHED:
-  BulletCharacterControllerNode(BulletShape *shape, float step_height, const char *name="character");
+  BulletCharacterControllerNode(BulletShape *shape, PN_stdfloat step_height, const char *name="character");
   INLINE ~BulletCharacterControllerNode();
   INLINE ~BulletCharacterControllerNode();
 
 
-  void set_linear_velocity(const LVector3f &velocity, bool is_local);
-  void set_angular_velocity(float omega);
+  void set_linear_velocity(const LVector3 &velocity, bool is_local);
+  void set_angular_velocity(PN_stdfloat omega);
 
 
   BulletShape *get_shape() const;
   BulletShape *get_shape() const;
 
 
-  float get_gravity() const;
-  float get_max_slope() const;
+  PN_stdfloat get_gravity() const;
+  PN_stdfloat get_max_slope() const;
 
 
-  void set_fall_speed(float fall_speed);
-  void set_jump_speed(float jump_speed);
-  void set_max_jump_height(float max_jump_height);
-  void set_max_slope(float max_slope);
-  void set_gravity(float gravity);
+  void set_fall_speed(PN_stdfloat fall_speed);
+  void set_jump_speed(PN_stdfloat jump_speed);
+  void set_max_jump_height(PN_stdfloat max_jump_height);
+  void set_max_slope(PN_stdfloat max_slope);
+  void set_gravity(PN_stdfloat gravity);
   void set_use_ghost_sweep_test(bool value);
   void set_use_ghost_sweep_test(bool value);
 
 
   bool is_on_ground() const;
   bool is_on_ground() const;
@@ -69,7 +69,7 @@ public:
   INLINE btPairCachingGhostObject *get_ghost() const;
   INLINE btPairCachingGhostObject *get_ghost() const;
   INLINE btKinematicCharacterController *get_character() const;
   INLINE btKinematicCharacterController *get_character() const;
 
 
-  void sync_p2b(float dt);
+  void sync_p2b(PN_stdfloat dt);
   void sync_b2p();
   void sync_b2p();
 
 
 protected:
 protected:
@@ -86,9 +86,9 @@ private:
 
 
   PT(BulletShape) _shape;
   PT(BulletShape) _shape;
 
 
-  LVector3f _linear_velocity;
+  LVector3 _linear_velocity;
   bool _linear_velocity_is_local;
   bool _linear_velocity_is_local;
-  float _angular_velocity;
+  PN_stdfloat _angular_velocity;
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 public:
 public:

+ 10 - 10
panda/src/bullet/bulletClosestHitRayResult.cxx

@@ -61,10 +61,10 @@ has_hit() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletClosestHitRayResult::
+PN_stdfloat BulletClosestHitRayResult::
 get_hit_fraction() const {
 get_hit_fraction() const {
 
 
-  return m_closestHitFraction;
+  return (PN_stdfloat)m_closestHitFraction;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -84,10 +84,10 @@ get_node() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LPoint3f BulletClosestHitRayResult::
+LPoint3 BulletClosestHitRayResult::
 get_hit_pos() const {
 get_hit_pos() const {
 
 
-  return btVector3_to_LPoint3f(m_hitPointWorld);
+  return btVector3_to_LPoint3(m_hitPointWorld);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -95,10 +95,10 @@ get_hit_pos() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVector3f BulletClosestHitRayResult::
+LVector3 BulletClosestHitRayResult::
 get_hit_normal() const {
 get_hit_normal() const {
 
 
-  return btVector3_to_LVector3f(m_hitNormalWorld);
+  return btVector3_to_LVector3(m_hitNormalWorld);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -106,10 +106,10 @@ get_hit_normal() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LPoint3f BulletClosestHitRayResult::
+LPoint3 BulletClosestHitRayResult::
 get_from_pos() const {
 get_from_pos() const {
 
 
-  return btVector3_to_LPoint3f(m_rayFromWorld);
+  return btVector3_to_LPoint3(m_rayFromWorld);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -117,9 +117,9 @@ get_from_pos() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LPoint3f BulletClosestHitRayResult::
+LPoint3 BulletClosestHitRayResult::
 get_to_pos() const {
 get_to_pos() const {
 
 
-  return btVector3_to_LPoint3f(m_rayToWorld);
+  return btVector3_to_LPoint3(m_rayToWorld);
 }
 }
 
 

+ 5 - 5
panda/src/bullet/bulletClosestHitRayResult.h

@@ -33,15 +33,15 @@ struct EXPCL_PANDABULLET BulletClosestHitRayResult : public btCollisionWorld::Cl
 PUBLISHED:
 PUBLISHED:
   INLINE static BulletClosestHitRayResult empty();
   INLINE static BulletClosestHitRayResult empty();
 
 
-  LPoint3f get_from_pos() const;
-  LPoint3f get_to_pos() const;
+  LPoint3 get_from_pos() const;
+  LPoint3 get_to_pos() const;
 
 
   bool has_hit() const;
   bool has_hit() const;
 
 
   PandaNode *get_node() const;
   PandaNode *get_node() const;
-  LPoint3f get_hit_pos() const;
-  LVector3f get_hit_normal() const;
-  float get_hit_fraction() const;
+  LPoint3 get_hit_pos() const;
+  LVector3 get_hit_normal() const;
+  PN_stdfloat get_hit_fraction() const;
 
 
 public:
 public:
   virtual bool needsCollision(btBroadphaseProxy* proxy0) const;
   virtual bool needsCollision(btBroadphaseProxy* proxy0) const;

+ 10 - 10
panda/src/bullet/bulletClosestHitSweepResult.cxx

@@ -61,10 +61,10 @@ has_hit() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletClosestHitSweepResult::
+PN_stdfloat BulletClosestHitSweepResult::
 get_hit_fraction() const {
 get_hit_fraction() const {
 
 
-  return m_closestHitFraction;
+  return (PN_stdfloat)m_closestHitFraction;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -84,10 +84,10 @@ get_node() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LPoint3f BulletClosestHitSweepResult::
+LPoint3 BulletClosestHitSweepResult::
 get_hit_pos() const {
 get_hit_pos() const {
 
 
-  return btVector3_to_LPoint3f(m_hitPointWorld);
+  return btVector3_to_LPoint3(m_hitPointWorld);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -95,10 +95,10 @@ get_hit_pos() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVector3f BulletClosestHitSweepResult::
+LVector3 BulletClosestHitSweepResult::
 get_hit_normal() const {
 get_hit_normal() const {
 
 
-  return btVector3_to_LVector3f(m_hitNormalWorld);
+  return btVector3_to_LVector3(m_hitNormalWorld);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -106,10 +106,10 @@ get_hit_normal() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LPoint3f BulletClosestHitSweepResult::
+LPoint3 BulletClosestHitSweepResult::
 get_from_pos() const {
 get_from_pos() const {
 
 
-  return btVector3_to_LPoint3f(m_convexFromWorld);
+  return btVector3_to_LPoint3(m_convexFromWorld);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -117,9 +117,9 @@ get_from_pos() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LPoint3f BulletClosestHitSweepResult::
+LPoint3 BulletClosestHitSweepResult::
 get_to_pos() const {
 get_to_pos() const {
 
 
-  return btVector3_to_LPoint3f(m_convexToWorld);
+  return btVector3_to_LPoint3(m_convexToWorld);
 }
 }
 
 

+ 5 - 5
panda/src/bullet/bulletClosestHitSweepResult.h

@@ -33,15 +33,15 @@ struct EXPCL_PANDABULLET BulletClosestHitSweepResult : public btCollisionWorld::
 PUBLISHED:
 PUBLISHED:
   INLINE static BulletClosestHitSweepResult empty();
   INLINE static BulletClosestHitSweepResult empty();
 
 
-  LPoint3f get_from_pos() const;
-  LPoint3f get_to_pos() const;
+  LPoint3 get_from_pos() const;
+  LPoint3 get_to_pos() const;
 
 
   bool has_hit() const;
   bool has_hit() const;
 
 
   PandaNode *get_node() const;
   PandaNode *get_node() const;
-  LPoint3f get_hit_pos() const;
-  LVector3f get_hit_normal() const;
-  float get_hit_fraction() const;
+  LPoint3 get_hit_pos() const;
+  LVector3 get_hit_normal() const;
+  PN_stdfloat get_hit_fraction() const;
 
 
 public:
 public:
   virtual bool needsCollision(btBroadphaseProxy* proxy0) const;  
   virtual bool needsCollision(btBroadphaseProxy* proxy0) const;  

+ 4 - 4
panda/src/bullet/bulletConeShape.I

@@ -28,10 +28,10 @@ INLINE BulletConeShape::
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletConeShape::
+INLINE PN_stdfloat BulletConeShape::
 get_radius() const {
 get_radius() const {
 
 
-  return _shape->getRadius();
+  return (PN_stdfloat)_shape->getRadius();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -39,9 +39,9 @@ get_radius() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletConeShape::
+INLINE PN_stdfloat BulletConeShape::
 get_height() const {
 get_height() const {
 
 
-  return _shape->getHeight();
+  return (PN_stdfloat)_shape->getHeight();
 }
 }
 
 

+ 4 - 4
panda/src/bullet/bulletConeShape.cxx

@@ -22,17 +22,17 @@ TypeHandle BulletConeShape::_type_handle;
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 BulletConeShape::
 BulletConeShape::
-BulletConeShape(float radius, float height, BulletUpAxis up) {
+BulletConeShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up) {
 
 
   switch (up) {
   switch (up) {
   case X_up:
   case X_up:
-    _shape = new btConeShapeX(radius, height);
+    _shape = new btConeShapeX((btScalar)radius, (btScalar)height);
     break;
     break;
   case Y_up:
   case Y_up:
-    _shape = new btConeShape(radius, height);
+    _shape = new btConeShape((btScalar)radius, (btScalar)height);
     break;
     break;
   case Z_up:
   case Z_up:
-    _shape = new btConeShapeZ(radius, height);
+    _shape = new btConeShapeZ((btScalar)radius, (btScalar)height);
     break;
     break;
   default:
   default:
     bullet_cat.error() << "invalid up-axis:" << up << endl;
     bullet_cat.error() << "invalid up-axis:" << up << endl;

+ 3 - 3
panda/src/bullet/bulletConeShape.h

@@ -28,11 +28,11 @@
 class EXPCL_PANDABULLET BulletConeShape : public BulletShape {
 class EXPCL_PANDABULLET BulletConeShape : public BulletShape {
 
 
 PUBLISHED:
 PUBLISHED:
-  BulletConeShape(float radius, float height, BulletUpAxis up=Z_up);
+  BulletConeShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up=Z_up);
   INLINE ~BulletConeShape();
   INLINE ~BulletConeShape();
 
 
-  INLINE float get_radius() const;
-  INLINE float get_height() const;
+  INLINE PN_stdfloat get_radius() const;
+  INLINE PN_stdfloat get_height() const;
 
 
 public:
 public:
   virtual btCollisionShape *ptr() const;
   virtual btCollisionShape *ptr() const;

+ 11 - 11
panda/src/bullet/bulletConeTwistConstraint.cxx

@@ -71,7 +71,7 @@ ptr() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletConeTwistConstraint::
 void BulletConeTwistConstraint::
-set_limit(int index, float value) {
+set_limit(int index, PN_stdfloat value) {
  
  
   value = deg_2_rad(value);
   value = deg_2_rad(value);
 
 
@@ -84,7 +84,7 @@ set_limit(int index, float value) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletConeTwistConstraint::
 void BulletConeTwistConstraint::
-set_limit(float swing1, float swing2, float twist, float softness, float bias, float relaxation) {
+set_limit(PN_stdfloat swing1, PN_stdfloat swing2, PN_stdfloat twist, PN_stdfloat softness, PN_stdfloat bias, PN_stdfloat relaxation) {
 
 
   swing1 = deg_2_rad(swing1);
   swing1 = deg_2_rad(swing1);
   swing2 = deg_2_rad(swing2);
   swing2 = deg_2_rad(swing2);
@@ -99,7 +99,7 @@ set_limit(float swing1, float swing2, float twist, float softness, float bias, f
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletConeTwistConstraint::
 void BulletConeTwistConstraint::
-set_damping(float damping) {
+set_damping(PN_stdfloat damping) {
  
  
   _constraint->setDamping(damping);
   _constraint->setDamping(damping);
 }
 }
@@ -109,7 +109,7 @@ set_damping(float damping) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletConeTwistConstraint::
+PN_stdfloat BulletConeTwistConstraint::
 get_fix_threshold() const {
 get_fix_threshold() const {
  
  
   return _constraint->getFixThresh();
   return _constraint->getFixThresh();
@@ -121,7 +121,7 @@ get_fix_threshold() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletConeTwistConstraint::
 void BulletConeTwistConstraint::
-set_fix_threshold(float threshold) {
+set_fix_threshold(PN_stdfloat threshold) {
  
  
   _constraint->setFixThresh(threshold);
   _constraint->setFixThresh(threshold);
 }
 }
@@ -143,7 +143,7 @@ enable_motor(bool enable) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletConeTwistConstraint::
 void BulletConeTwistConstraint::
-set_max_motor_impulse(float max_impulse) {
+set_max_motor_impulse(PN_stdfloat max_impulse) {
  
  
   _constraint->setMaxMotorImpulse(max_impulse);
   _constraint->setMaxMotorImpulse(max_impulse);
 }
 }
@@ -154,7 +154,7 @@ set_max_motor_impulse(float max_impulse) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletConeTwistConstraint::
 void BulletConeTwistConstraint::
-set_max_motor_impulse_normalized(float max_impulse) {
+set_max_motor_impulse_normalized(PN_stdfloat max_impulse) {
  
  
   _constraint->setMaxMotorImpulseNormalized(max_impulse);
   _constraint->setMaxMotorImpulseNormalized(max_impulse);
 }
 }
@@ -165,9 +165,9 @@ set_max_motor_impulse_normalized(float max_impulse) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletConeTwistConstraint::
 void BulletConeTwistConstraint::
-set_motor_target(const LQuaternionf &quat) {
+set_motor_target(const LQuaternion &quat) {
  
  
-  _constraint->setMotorTarget(LQuaternionf_to_btQuat(quat));
+  _constraint->setMotorTarget(LQuaternion_to_btQuat(quat));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -176,8 +176,8 @@ set_motor_target(const LQuaternionf &quat) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletConeTwistConstraint::
 void BulletConeTwistConstraint::
-set_motor_target_in_constraint_space(const LQuaternionf &quat) {
+set_motor_target_in_constraint_space(const LQuaternion &quat) {
  
  
-  _constraint->setMotorTargetInConstraintSpace(LQuaternionf_to_btQuat(quat));
+  _constraint->setMotorTargetInConstraintSpace(LQuaternion_to_btQuat(quat));
 }
 }
 
 

+ 9 - 9
panda/src/bullet/bulletConeTwistConstraint.h

@@ -40,19 +40,19 @@ PUBLISHED:
                             CPT(TransformState) frame_b);
                             CPT(TransformState) frame_b);
   INLINE ~BulletConeTwistConstraint();
   INLINE ~BulletConeTwistConstraint();
 
 
-  void set_limit(int index, float value);
-  void set_limit(float swing1, float swing2, float twist, float softness=1.0f, float bias=0.3f, float relaxation=1.0f);
+  void set_limit(int index, PN_stdfloat value);
+  void set_limit(PN_stdfloat swing1, PN_stdfloat swing2, PN_stdfloat twist, PN_stdfloat softness=1.0f, PN_stdfloat bias=0.3f, PN_stdfloat relaxation=1.0f);
 
 
-  void set_damping(float damping);
+  void set_damping(PN_stdfloat damping);
 
 
-  float get_fix_threshold() const;
-  void set_fix_threshold(float threshold);
+  PN_stdfloat get_fix_threshold() const;
+  void set_fix_threshold(PN_stdfloat threshold);
 
 
   void enable_motor(bool enable);
   void enable_motor(bool enable);
-  void set_max_motor_impulse(float max_impulse);
-  void set_max_motor_impulse_normalized(float max_impulse);
-  void set_motor_target(const LQuaternionf &quat);
-  void set_motor_target_in_constraint_space(const LQuaternionf &quat);
+  void set_max_motor_impulse(PN_stdfloat max_impulse);
+  void set_max_motor_impulse_normalized(PN_stdfloat max_impulse);
+  void set_motor_target(const LQuaternion &quat);
+  void set_motor_target_in_constraint_space(const LQuaternion &quat);
 
 
 public:
 public:
   virtual btTypedConstraint *ptr() const;
   virtual btTypedConstraint *ptr() const;

+ 6 - 6
panda/src/bullet/bulletConstraint.cxx

@@ -33,10 +33,10 @@ enable_feedback(bool value) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletConstraint::
+PN_stdfloat BulletConstraint::
 get_applied_impulse() const {
 get_applied_impulse() const {
 
 
-  return ptr()->getAppliedImpulse();
+  return (PN_stdfloat)ptr()->getAppliedImpulse();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -45,9 +45,9 @@ get_applied_impulse() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletConstraint::
 void BulletConstraint::
-set_debug_draw_size(float size) {
+set_debug_draw_size(PN_stdfloat size) {
 
 
-  ptr()->setDbgDrawSize(size);
+  ptr()->setDbgDrawSize((btScalar)size);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -55,10 +55,10 @@ set_debug_draw_size(float size) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletConstraint::
+PN_stdfloat BulletConstraint::
 get_debug_draw_size() {
 get_debug_draw_size() {
 
 
-  return ptr()->getDbgDrawSize();
+  return (PN_stdfloat)ptr()->getDbgDrawSize();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////

+ 3 - 3
panda/src/bullet/bulletConstraint.h

@@ -36,10 +36,10 @@ PUBLISHED:
   BulletRigidBodyNode *get_rigid_body_b();
   BulletRigidBodyNode *get_rigid_body_b();
 
 
   void enable_feedback(bool value);
   void enable_feedback(bool value);
-  void set_debug_draw_size(float size);
+  void set_debug_draw_size(PN_stdfloat size);
 
 
-  float get_applied_impulse() const;
-  float get_debug_draw_size();
+  PN_stdfloat get_applied_impulse() const;
+  PN_stdfloat get_debug_draw_size();
 
 
 public:
 public:
   virtual btTypedConstraint *ptr() const = 0;
   virtual btTypedConstraint *ptr() const = 0;

+ 10 - 10
panda/src/bullet/bulletConvexHullShape.cxx

@@ -49,9 +49,9 @@ ptr() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletConvexHullShape::
 void BulletConvexHullShape::
-add_point(const LPoint3f &p) {
+add_point(const LPoint3 &p) {
 
 
-  _shape->addPoint(LVecBase3f_to_btVector3(p));
+  _shape->addPoint(LVecBase3_to_btVector3(p));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -60,15 +60,15 @@ add_point(const LPoint3f &p) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletConvexHullShape::
 void BulletConvexHullShape::
-add_array(const PTA_LVecBase3f &points) {
+add_array(const PTA_LVecBase3 &points) {
 
 
   _shape = new btConvexHullShape(NULL, 0);
   _shape = new btConvexHullShape(NULL, 0);
   _shape->setUserPointer(this);
   _shape->setUserPointer(this);
 
 
-  PTA_LVecBase3f::const_iterator it;
+  PTA_LVecBase3::const_iterator it;
   for (it=points.begin(); it!=points.end(); it++) {
   for (it=points.begin(); it!=points.end(); it++) {
-    LVecBase3f v = *it;
-    _shape->addPoint(LVecBase3f_to_btVector3(v));
+    LVecBase3 v = *it;
+    _shape->addPoint(LVecBase3_to_btVector3(v));
   }
   }
 }
 }
 
 
@@ -81,22 +81,22 @@ void BulletConvexHullShape::
 add_geom(const Geom *geom) {
 add_geom(const Geom *geom) {
 
 
   // Collect points
   // Collect points
-  pvector<LPoint3f> points;
+  pvector<LPoint3> points;
 
 
   CPT(GeomVertexData) vdata = geom->get_vertex_data();
   CPT(GeomVertexData) vdata = geom->get_vertex_data();
   GeomVertexReader reader = GeomVertexReader(vdata, InternalName::get_vertex());
   GeomVertexReader reader = GeomVertexReader(vdata, InternalName::get_vertex());
 
 
   while (!reader.is_at_end()) {
   while (!reader.is_at_end()) {
-    points.push_back(reader.get_data3f());
+    points.push_back(reader.get_data3());
   }
   }
 
 
   // Create shape
   // Create shape
   _shape = new btConvexHullShape(NULL, 0);
   _shape = new btConvexHullShape(NULL, 0);
   _shape->setUserPointer(this);
   _shape->setUserPointer(this);
 
 
-  pvector<LPoint3f>::const_iterator it;
+  pvector<LPoint3>::const_iterator it;
   for (it=points.begin(); it!=points.end(); it++) {
   for (it=points.begin(); it!=points.end(); it++) {
-    _shape->addPoint(LVecBase3f_to_btVector3(*it));
+    _shape->addPoint(LVecBase3_to_btVector3(*it));
   }
   }
 }
 }
 
 

+ 2 - 2
panda/src/bullet/bulletConvexHullShape.h

@@ -34,8 +34,8 @@ PUBLISHED:
   BulletConvexHullShape();
   BulletConvexHullShape();
   INLINE ~BulletConvexHullShape();
   INLINE ~BulletConvexHullShape();
 
 
-  void add_point(const LPoint3f &p);
-  void add_array(const PTA_LVecBase3f &points);
+  void add_point(const LPoint3 &p);
+  void add_array(const PTA_LVecBase3 &points);
   void add_geom(const Geom *geom);
   void add_geom(const Geom *geom);
 
 
 public:
 public:

+ 10 - 10
panda/src/bullet/bulletConvexPointCloudShape.cxx

@@ -24,17 +24,17 @@ TypeHandle BulletConvexPointCloudShape::_type_handle;
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 BulletConvexPointCloudShape::
 BulletConvexPointCloudShape::
-BulletConvexPointCloudShape(const PTA_LVecBase3f &points, LVecBase3f scale) {
+BulletConvexPointCloudShape(const PTA_LVecBase3 &points, LVecBase3 scale) {
 
 
-  btVector3 btScale = LVecBase3f_to_btVector3(scale);
+  btVector3 btScale = LVecBase3_to_btVector3(scale);
 
 
   // Convert points
   // Convert points
   btVector3 *btPoints = new btVector3[points.size()];
   btVector3 *btPoints = new btVector3[points.size()];
 
 
   int i = 0;
   int i = 0;
-  PTA_LVecBase3f::const_iterator it;
+  PTA_LVecBase3::const_iterator it;
   for (it=points.begin(); it!=points.end(); it++) {
   for (it=points.begin(); it!=points.end(); it++) {
-    btPoints[i] = LVecBase3f_to_btVector3(*it);
+    btPoints[i] = LVecBase3_to_btVector3(*it);
     i++;
     i++;
   }
   }
 
 
@@ -60,27 +60,27 @@ ptr() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 BulletConvexPointCloudShape::
 BulletConvexPointCloudShape::
-BulletConvexPointCloudShape(const Geom *geom, LVecBase3f scale) {
+BulletConvexPointCloudShape(const Geom *geom, LVecBase3 scale) {
 
 
-  btVector3 btScale = LVecBase3f_to_btVector3(scale);
+  btVector3 btScale = LVecBase3_to_btVector3(scale);
 
 
   // Collect points
   // Collect points
-  pvector<LPoint3f> points;
+  pvector<LPoint3> points;
 
 
   CPT(GeomVertexData) vdata = geom->get_vertex_data();
   CPT(GeomVertexData) vdata = geom->get_vertex_data();
   GeomVertexReader reader = GeomVertexReader(vdata, InternalName::get_vertex());
   GeomVertexReader reader = GeomVertexReader(vdata, InternalName::get_vertex());
 
 
   while (!reader.is_at_end()) {
   while (!reader.is_at_end()) {
-    points.push_back(reader.get_data3f());
+    points.push_back(reader.get_data3());
   }
   }
 
 
   // Convert points
   // Convert points
   btVector3 *btPoints = new btVector3[points.size()];
   btVector3 *btPoints = new btVector3[points.size()];
 
 
   int i = 0;
   int i = 0;
-  pvector<LPoint3f>::const_iterator it;
+  pvector<LPoint3>::const_iterator it;
   for (it=points.begin(); it!=points.end(); it++) {
   for (it=points.begin(); it!=points.end(); it++) {
-    btPoints[i] = LVecBase3f_to_btVector3(*it);
+    btPoints[i] = LVecBase3_to_btVector3(*it);
     i++;
     i++;
   }
   }
 
 

+ 2 - 2
panda/src/bullet/bulletConvexPointCloudShape.h

@@ -30,8 +30,8 @@
 class EXPCL_PANDABULLET BulletConvexPointCloudShape : public BulletShape {
 class EXPCL_PANDABULLET BulletConvexPointCloudShape : public BulletShape {
 
 
 PUBLISHED:
 PUBLISHED:
-  BulletConvexPointCloudShape(const PTA_LVecBase3f &points, LVecBase3f scale=LVecBase3f(1.));
-  BulletConvexPointCloudShape(const Geom *geom, LVecBase3f scale=LVecBase3f(1.));
+  BulletConvexPointCloudShape(const PTA_LVecBase3 &points, LVecBase3 scale=LVecBase3(1.));
+  BulletConvexPointCloudShape(const Geom *geom, LVecBase3 scale=LVecBase3(1.));
   INLINE ~BulletConvexPointCloudShape();
   INLINE ~BulletConvexPointCloudShape();
 
 
   INLINE int get_num_points() const;
   INLINE int get_num_points() const;

+ 6 - 6
panda/src/bullet/bulletCylinderShape.I

@@ -28,10 +28,10 @@ INLINE BulletCylinderShape::
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletCylinderShape::
+INLINE PN_stdfloat BulletCylinderShape::
 get_radius() const {
 get_radius() const {
 
 
-  return _shape->getRadius();
+  return (PN_stdfloat)_shape->getRadius();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -39,10 +39,10 @@ get_radius() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE LVecBase3f BulletCylinderShape::
+INLINE LVecBase3 BulletCylinderShape::
 get_half_extents_without_marging() const {
 get_half_extents_without_marging() const {
 
 
-  return btVector3_to_LVecBase3f(_shape->getHalfExtentsWithoutMargin());
+  return btVector3_to_LVecBase3(_shape->getHalfExtentsWithoutMargin());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -50,9 +50,9 @@ get_half_extents_without_marging() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE LVecBase3f BulletCylinderShape::
+INLINE LVecBase3 BulletCylinderShape::
 get_half_extents_with_marging() const {
 get_half_extents_with_marging() const {
 
 
-  return btVector3_to_LVecBase3f(_shape->getHalfExtentsWithMargin());
+  return btVector3_to_LVecBase3(_shape->getHalfExtentsWithMargin());
 }
 }
 
 

+ 3 - 3
panda/src/bullet/bulletCylinderShape.cxx

@@ -22,9 +22,9 @@ TypeHandle BulletCylinderShape::_type_handle;
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 BulletCylinderShape::
 BulletCylinderShape::
-BulletCylinderShape(const LVector3f &half_extents, BulletUpAxis up) {
+BulletCylinderShape(const LVector3 &half_extents, BulletUpAxis up) {
 
 
-  btVector3 btHalfExtents = LVecBase3f_to_btVector3(half_extents);
+  btVector3 btHalfExtents = LVecBase3_to_btVector3(half_extents);
 
 
   switch (up) {
   switch (up) {
   case X_up:
   case X_up:
@@ -50,7 +50,7 @@ BulletCylinderShape(const LVector3f &half_extents, BulletUpAxis up) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 BulletCylinderShape::
 BulletCylinderShape::
-BulletCylinderShape(float radius, float height, BulletUpAxis up) {
+BulletCylinderShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up) {
 
 
   switch (up) {
   switch (up) {
   case X_up:
   case X_up:

+ 5 - 5
panda/src/bullet/bulletCylinderShape.h

@@ -28,13 +28,13 @@
 class EXPCL_PANDABULLET BulletCylinderShape : public BulletShape {
 class EXPCL_PANDABULLET BulletCylinderShape : public BulletShape {
 
 
 PUBLISHED:
 PUBLISHED:
-  BulletCylinderShape(const LVector3f &half_extents, BulletUpAxis up=Z_up);
-  BulletCylinderShape(float radius, float height, BulletUpAxis up=Z_up);
+  BulletCylinderShape(const LVector3 &half_extents, BulletUpAxis up=Z_up);
+  BulletCylinderShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up=Z_up);
   INLINE ~BulletCylinderShape();
   INLINE ~BulletCylinderShape();
 
 
-  INLINE float get_radius() const;
-  INLINE LVecBase3f get_half_extents_without_marging() const;
-  INLINE LVecBase3f get_half_extents_with_marging() const;
+  INLINE PN_stdfloat get_radius() const;
+  INLINE LVecBase3 get_half_extents_without_marging() const;
+  INLINE LVecBase3 get_half_extents_with_marging() const;
 
 
 public:
 public:
   virtual btCollisionShape *ptr() const;
   virtual btCollisionShape *ptr() const;

+ 38 - 27
panda/src/bullet/bulletDebugNode.cxx

@@ -55,9 +55,9 @@ BulletDebugNode(const char *name) : GeomNode(name) {
 
 
   // Draw something in oder to prevent getting optimized away
   // Draw something in oder to prevent getting optimized away
   GeomVertexWriter vwriter(_vdata, InternalName::get_vertex());
   GeomVertexWriter vwriter(_vdata, InternalName::get_vertex());
-  vwriter.add_data3f(0.0, 0.0, 0.0);
-  vwriter.add_data3f(0.0, 0.0, 0.0);
-  vwriter.add_data3f(0.0, 0.0, 0.0);
+  vwriter.add_data3(0.0, 0.0, 0.0);
+  vwriter.add_data3(0.0, 0.0, 0.0);
+  vwriter.add_data3(0.0, 0.0, 0.0);
   _prim_lines->add_next_vertices(2);
   _prim_lines->add_next_vertices(2);
   _prim_lines->close_primitive();
   _prim_lines->close_primitive();
   _prim_triangles->add_next_vertices(3);
   _prim_triangles->add_next_vertices(3);
@@ -208,7 +208,7 @@ sync_b2p(btDynamicsWorld *world) {
 
 
   // Get inverse of this node's net transform
   // Get inverse of this node's net transform
   NodePath np = NodePath::any_path((PandaNode *)this);
   NodePath np = NodePath::any_path((PandaNode *)this);
-  LMatrix4f m = np.get_net_transform()->get_mat();
+  LMatrix4 m = np.get_net_transform()->get_mat();
   m.invert_in_place();
   m.invert_in_place();
 
 
   // Render collected data
   // Render collected data
@@ -226,10 +226,10 @@ sync_b2p(btDynamicsWorld *world) {
   for (lit = _drawer._lines.begin(); lit != _drawer._lines.end(); lit++) {
   for (lit = _drawer._lines.begin(); lit != _drawer._lines.end(); lit++) {
     Line line = *lit;
     Line line = *lit;
 
 
-    vwriter.add_data3f(m.xform_point(line._p0));
-    vwriter.add_data3f(m.xform_point(line._p1));
-    cwriter.add_data4f(line._color);
-    cwriter.add_data4f(line._color);
+    vwriter.add_data3(m.xform_point(line._p0));
+    vwriter.add_data3(m.xform_point(line._p1));
+    cwriter.add_data4(line._color);
+    cwriter.add_data4(line._color);
 
 
     _prim_lines->add_vertex(v++);
     _prim_lines->add_vertex(v++);
     _prim_lines->add_vertex(v++);
     _prim_lines->add_vertex(v++);
@@ -239,12 +239,12 @@ sync_b2p(btDynamicsWorld *world) {
   for (tit = _drawer._triangles.begin(); tit != _drawer._triangles.end(); tit++) {
   for (tit = _drawer._triangles.begin(); tit != _drawer._triangles.end(); tit++) {
     Triangle tri = *tit;
     Triangle tri = *tit;
 
 
-    vwriter.add_data3f(m.xform_point(tri._p0));
-    vwriter.add_data3f(m.xform_point(tri._p1));
-    vwriter.add_data3f(m.xform_point(tri._p2));
-    cwriter.add_data4f(tri._color);
-    cwriter.add_data4f(tri._color);
-    cwriter.add_data4f(tri._color);
+    vwriter.add_data3(m.xform_point(tri._p0));
+    vwriter.add_data3(m.xform_point(tri._p1));
+    vwriter.add_data3(m.xform_point(tri._p2));
+    cwriter.add_data4(tri._color);
+    cwriter.add_data4(tri._color);
+    cwriter.add_data4(tri._color);
 
 
     _prim_triangles->add_vertex(v++);
     _prim_triangles->add_vertex(v++);
     _prim_triangles->add_vertex(v++);
     _prim_triangles->add_vertex(v++);
@@ -301,9 +301,9 @@ reportErrorWarning(const char *warning) {
 void BulletDebugNode::DebugDraw::
 void BulletDebugNode::DebugDraw::
 drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &color) {
 drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &color) {
 
 
-  float r = color.getX();
-  float g = color.getY();
-  float b = color.getZ();
+  PN_stdfloat r = color.getX();
+  PN_stdfloat g = color.getY();
+  PN_stdfloat b = color.getZ();
 
 
   // Hack to get rid of triangle normals. The hack is based on the
   // Hack to get rid of triangle normals. The hack is based on the
   // assumption that only normals are drawn in yellow.
   // assumption that only normals are drawn in yellow.
@@ -311,9 +311,9 @@ drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &color) {
 
 
   Line line;
   Line line;
 
 
-  line._p0 = LVecBase3f(from.getX(), from.getY(), from.getZ());
-  line._p1 = LVecBase3f(to.getX(), to.getY(), to.getZ());
-  line._color = LColorf(r, g, b, 1.0f);
+  line._p0 = LVecBase3(from.getX(), from.getY(), from.getZ());
+  line._p1 = LVecBase3(to.getX(), to.getY(), to.getZ());
+  line._color = LColor(r, g, b, 1.0f);
 
 
   _lines.push_back(line);
   _lines.push_back(line);
 }
 }
@@ -326,16 +326,27 @@ drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &color) {
 void BulletDebugNode::DebugDraw::
 void BulletDebugNode::DebugDraw::
 drawTriangle(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2, const btVector3 &color, btScalar) {
 drawTriangle(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2, const btVector3 &color, btScalar) {
 
 
-  float r = color.getX();
-  float g = color.getY();
-  float b = color.getZ();
+  btScalar r = color.getX();
+  btScalar g = color.getY();
+  btScalar b = color.getZ();
 
 
   Triangle tri;
   Triangle tri;
 
 
-  tri._p0 = LVecBase3f(v0.getX(), v0.getY(), v0.getZ());
-  tri._p1 = LVecBase3f(v1.getX(), v1.getY(), v1.getZ());
-  tri._p2 = LVecBase3f(v2.getX(), v2.getY(), v2.getZ());
-  tri._color = LColorf(r, g, b, 1.0f);
+  tri._p0 = LVecBase3((PN_stdfloat)v0.getX(),
+                      (PN_stdfloat)v0.getY(),
+                      (PN_stdfloat)v0.getZ());
+
+  tri._p1 = LVecBase3((PN_stdfloat)v1.getX(),
+                      (PN_stdfloat)v1.getY(),
+                      (PN_stdfloat)v1.getZ());
+
+  tri._p2 = LVecBase3((PN_stdfloat)v2.getX(),
+                      (PN_stdfloat)v2.getY(),
+                      (PN_stdfloat)v2.getZ());
+
+  tri._color = LColor((PN_stdfloat)r, 
+                      (PN_stdfloat)g, 
+                      (PN_stdfloat)b, 1.0f);
 
 
   _triangles.push_back(tri);
   _triangles.push_back(tri);
 
 

+ 7 - 7
panda/src/bullet/bulletDebugNode.h

@@ -54,16 +54,16 @@ private:
   void sync_b2p(btDynamicsWorld *world);
   void sync_b2p(btDynamicsWorld *world);
 
 
   struct Line {
   struct Line {
-    LVecBase3f _p0;
-    LVecBase3f _p1;
-    LColorf _color;
+    LVecBase3 _p0;
+    LVecBase3 _p1;
+    LColor _color;
   };
   };
 
 
   struct Triangle {
   struct Triangle {
-    LVecBase3f _p0;
-    LVecBase3f _p1;
-    LVecBase3f _p2;
-    LColorf _color;
+    LVecBase3 _p0;
+    LVecBase3 _p1;
+    LVecBase3 _p2;
+    LColor _color;
   };
   };
 
 
   class DebugDraw : public btIDebugDraw {
   class DebugDraw : public btIDebugDraw {

+ 8 - 8
panda/src/bullet/bulletGenericConstraint.cxx

@@ -70,14 +70,14 @@ ptr() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVector3f BulletGenericConstraint::
+LVector3 BulletGenericConstraint::
 get_axis(int axis) const {
 get_axis(int axis) const {
 
 
-  nassertr(axis >= 0, LVector3f::zero());
-  nassertr(axis <= 3, LVector3f::zero());
+  nassertr(axis >= 0, LVector3::zero());
+  nassertr(axis <= 3, LVector3::zero());
 
 
   _constraint->buildJacobian();
   _constraint->buildJacobian();
-  return btVector3_to_LVector3f(_constraint->getAxis(axis));
+  return btVector3_to_LVector3(_constraint->getAxis(axis));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -85,7 +85,7 @@ get_axis(int axis) const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletGenericConstraint::
+PN_stdfloat BulletGenericConstraint::
 get_pivot(int axis) const {
 get_pivot(int axis) const {
 
 
   nassertr(axis >= 0, 0.0f);
   nassertr(axis >= 0, 0.0f);
@@ -100,7 +100,7 @@ get_pivot(int axis) const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletGenericConstraint::
+PN_stdfloat BulletGenericConstraint::
 get_angle(int axis) const {
 get_angle(int axis) const {
 
 
   nassertr(axis >= 0, 0.0f);
   nassertr(axis >= 0, 0.0f);
@@ -116,7 +116,7 @@ get_angle(int axis) const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletGenericConstraint::
 void BulletGenericConstraint::
-set_linear_limit(int axis, float low, float high) {
+set_linear_limit(int axis, PN_stdfloat low, PN_stdfloat high) {
 
 
   nassertv(axis >= 0);
   nassertv(axis >= 0);
   nassertv(axis <= 3);
   nassertv(axis <= 3);
@@ -131,7 +131,7 @@ set_linear_limit(int axis, float low, float high) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletGenericConstraint::
 void BulletGenericConstraint::
-set_angular_limit(int axis, float low, float high) {
+set_angular_limit(int axis, PN_stdfloat low, PN_stdfloat high) {
 
 
   nassertv(axis >= 0);
   nassertv(axis >= 0);
   nassertv(axis <= 3);
   nassertv(axis <= 3);

+ 5 - 5
panda/src/bullet/bulletGenericConstraint.h

@@ -44,12 +44,12 @@ PUBLISHED:
                           bool use_frame_a);
                           bool use_frame_a);
   INLINE ~BulletGenericConstraint();
   INLINE ~BulletGenericConstraint();
 
 
-  void set_linear_limit(int axis, float low, float high);
-  void set_angular_limit(int axis, float low, float high);
+  void set_linear_limit(int axis, PN_stdfloat low, PN_stdfloat high);
+  void set_angular_limit(int axis, PN_stdfloat low, PN_stdfloat high);
 
 
-  LVector3f get_axis(int axis) const;
-  float get_pivot(int axis) const;
-  float get_angle(int axis) const;
+  LVector3 get_axis(int axis) const;
+  PN_stdfloat get_pivot(int axis) const;
+  PN_stdfloat get_angle(int axis) const;
 
 
 public:
 public:
   virtual btTypedConstraint *ptr() const;
   virtual btTypedConstraint *ptr() const;

+ 7 - 7
panda/src/bullet/bulletGhostNode.cxx

@@ -92,8 +92,8 @@ transform_changed() {
   NodePath np = NodePath::any_path((PandaNode *)this);
   NodePath np = NodePath::any_path((PandaNode *)this);
   CPT(TransformState) ts = np.get_net_transform();
   CPT(TransformState) ts = np.get_net_transform();
 
 
-  LMatrix4f m_sync = _sync->get_mat();
-  LMatrix4f m_ts = ts->get_mat();
+  LMatrix4 m_sync = _sync->get_mat();
+  LMatrix4 m_ts = ts->get_mat();
 
 
   if (!m_sync.almost_equal(m_ts)) {
   if (!m_sync.almost_equal(m_ts)) {
     _sync = ts;
     _sync = ts;
@@ -103,8 +103,8 @@ transform_changed() {
     _ghost->setInterpolationWorldTransform(trans);
     _ghost->setInterpolationWorldTransform(trans);
 
 
     if (ts->has_scale()) {
     if (ts->has_scale()) {
-      LVecBase3f scale = ts->get_scale();
-      if (!scale.almost_equal(LVecBase3f(1.0f, 1.0f, 1.0f))) {
+      LVecBase3 scale = ts->get_scale();
+      if (!scale.almost_equal(LVecBase3(1.0f, 1.0f, 1.0f))) {
         for (int i=0; i<get_num_shapes(); i++) {
         for (int i=0; i<get_num_shapes(); i++) {
           PT(BulletShape) shape = _shapes[i];
           PT(BulletShape) shape = _shapes[i];
           shape->set_local_scale(scale);
           shape->set_local_scale(scale);
@@ -134,13 +134,13 @@ void BulletGhostNode::
 sync_b2p() {
 sync_b2p() {
 
 
   NodePath np = NodePath::any_path((PandaNode *)this);
   NodePath np = NodePath::any_path((PandaNode *)this);
-  LVecBase3f scale = np.get_net_transform()->get_scale();
+  LVecBase3 scale = np.get_net_transform()->get_scale();
 
 
   btTransform trans = _ghost->getWorldTransform();
   btTransform trans = _ghost->getWorldTransform();
   CPT(TransformState) ts = btTrans_to_TransformState(trans, scale);
   CPT(TransformState) ts = btTrans_to_TransformState(trans, scale);
 
 
-  LMatrix4f m_sync = _sync->get_mat();
-  LMatrix4f m_ts = ts->get_mat();
+  LMatrix4 m_sync = _sync->get_mat();
+  LMatrix4 m_ts = ts->get_mat();
 
 
   if (!m_sync.almost_equal(m_ts)) {
   if (!m_sync.almost_equal(m_ts)) {
     _sync = ts;
     _sync = ts;

+ 1 - 1
panda/src/bullet/bulletHeightfieldShape.cxx

@@ -22,7 +22,7 @@ TypeHandle BulletHeightfieldShape::_type_handle;
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 BulletHeightfieldShape::
 BulletHeightfieldShape::
-BulletHeightfieldShape(const PNMImage &image, float max_height, BulletUpAxis up) {
+BulletHeightfieldShape(const PNMImage &image, PN_stdfloat max_height, BulletUpAxis up) {
 
 
   int num_rows = image.get_x_size();
   int num_rows = image.get_x_size();
   int num_columns = image.get_y_size();
   int num_columns = image.get_y_size();

+ 1 - 1
panda/src/bullet/bulletHeightfieldShape.h

@@ -30,7 +30,7 @@
 class EXPCL_PANDABULLET BulletHeightfieldShape : public BulletShape {
 class EXPCL_PANDABULLET BulletHeightfieldShape : public BulletShape {
 
 
 PUBLISHED:
 PUBLISHED:
-  BulletHeightfieldShape(const PNMImage &image, float max_height, BulletUpAxis up=Z_up);
+  BulletHeightfieldShape(const PNMImage &image, PN_stdfloat max_height, BulletUpAxis up=Z_up);
   INLINE ~BulletHeightfieldShape();
   INLINE ~BulletHeightfieldShape();
 
 
   void set_use_diamond_subdivision(bool flag=true);
   void set_use_diamond_subdivision(bool flag=true);

+ 4 - 4
panda/src/bullet/bulletHelper.cxx

@@ -213,8 +213,8 @@ make_geom(BulletSoftBodyNode *node, const GeomVertexFormat *format, bool two_sid
 
 
     v = trans.invXform(v);
     v = trans.invXform(v);
 
 
-    vwriter.add_data3f(v.getX(), v.getY(), v.getZ());
-    nwriter.add_data3f(n.getX(), n.getY(), n.getZ());
+    vwriter.add_data3((PN_stdfloat)v.getX(), (PN_stdfloat)v.getY(), (PN_stdfloat)v.getZ());
+    nwriter.add_data3((PN_stdfloat)n.getX(), (PN_stdfloat)n.getY(), (PN_stdfloat)n.getZ());
     fwriter.add_data1i(0);
     fwriter.add_data1i(0);
   }
   }
 
 
@@ -223,8 +223,8 @@ make_geom(BulletSoftBodyNode *node, const GeomVertexFormat *format, bool two_sid
       btVector3 &v = nodes[j].m_x;
       btVector3 &v = nodes[j].m_x;
       btVector3 &n = nodes[j].m_n;
       btVector3 &n = nodes[j].m_n;
 
 
-      vwriter.add_data3f(v.getX(), v.getY(), v.getZ());
-      nwriter.add_data3f(n.getX(), n.getY(), n.getZ());
+      vwriter.add_data3((PN_stdfloat)v.getX(), (PN_stdfloat)v.getY(), (PN_stdfloat)v.getZ());
+      nwriter.add_data3((PN_stdfloat)n.getX(), (PN_stdfloat)n.getY(), (PN_stdfloat)n.getZ());
       fwriter.add_data1i(1);
       fwriter.add_data1i(1);
     }
     }
   }
   }

+ 23 - 23
panda/src/bullet/bulletHingeConstraint.cxx

@@ -29,13 +29,13 @@ TypeHandle BulletHingeConstraint::_type_handle;
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 BulletHingeConstraint::
 BulletHingeConstraint::
 BulletHingeConstraint(const BulletRigidBodyNode *node_a, 
 BulletHingeConstraint(const BulletRigidBodyNode *node_a, 
-                      const LPoint3f &pivot_a,
-                      const LVector3f &axis_a,
+                      const LPoint3 &pivot_a,
+                      const LVector3 &axis_a,
                       bool use_frame_a) {
                       bool use_frame_a) {
 
 
   btRigidBody *ptr_a = btRigidBody::upcast(node_a->get_object());
   btRigidBody *ptr_a = btRigidBody::upcast(node_a->get_object());
-  btVector3 pos_a = LVecBase3f_to_btVector3(pivot_a);
-  btVector3 vec_a = LVecBase3f_to_btVector3(axis_a);
+  btVector3 pos_a = LVecBase3_to_btVector3(pivot_a);
+  btVector3 vec_a = LVecBase3_to_btVector3(axis_a);
 
 
   _constraint = new btHingeConstraint(*ptr_a, pos_a, vec_a, use_frame_a);
   _constraint = new btHingeConstraint(*ptr_a, pos_a, vec_a, use_frame_a);
 }
 }
@@ -54,19 +54,19 @@ BulletHingeConstraint(const BulletRigidBodyNode *node_a,
 BulletHingeConstraint::
 BulletHingeConstraint::
 BulletHingeConstraint(const BulletRigidBodyNode *node_a,
 BulletHingeConstraint(const BulletRigidBodyNode *node_a,
                       const BulletRigidBodyNode *node_b,
                       const BulletRigidBodyNode *node_b,
-                      const LPoint3f &pivot_a,
-                      const LPoint3f &pivot_b,
-                      const LVector3f &axis_a,
-                      const LVector3f &axis_b,
+                      const LPoint3 &pivot_a,
+                      const LPoint3 &pivot_b,
+                      const LVector3 &axis_a,
+                      const LVector3 &axis_b,
                       bool use_frame_a) {
                       bool use_frame_a) {
 
 
   btRigidBody *ptr_a = btRigidBody::upcast(node_a->get_object());
   btRigidBody *ptr_a = btRigidBody::upcast(node_a->get_object());
-  btVector3 pos_a = LVecBase3f_to_btVector3(pivot_a);
-  btVector3 vec_a = LVecBase3f_to_btVector3(axis_a);
+  btVector3 pos_a = LVecBase3_to_btVector3(pivot_a);
+  btVector3 vec_a = LVecBase3_to_btVector3(axis_a);
 
 
   btRigidBody *ptr_b = btRigidBody::upcast(node_b->get_object());
   btRigidBody *ptr_b = btRigidBody::upcast(node_b->get_object());
-  btVector3 pos_b = LVecBase3f_to_btVector3(pivot_b);
-  btVector3 vec_b = LVecBase3f_to_btVector3(axis_b);
+  btVector3 pos_b = LVecBase3_to_btVector3(pivot_b);
+  btVector3 vec_b = LVecBase3_to_btVector3(axis_b);
 
 
   _constraint = new btHingeConstraint(*ptr_a, *ptr_b, pos_a, pos_b, vec_a, vec_b, use_frame_a);
   _constraint = new btHingeConstraint(*ptr_a, *ptr_b, pos_a, pos_b, vec_a, vec_b, use_frame_a);
 }
 }
@@ -111,7 +111,7 @@ get_angular_only() const {
 //               degrees.
 //               degrees.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletHingeConstraint::
 void BulletHingeConstraint::
-set_limit(float low, float high, float softness, float bias, float relaxation) {
+set_limit(PN_stdfloat low, PN_stdfloat high, PN_stdfloat softness, PN_stdfloat bias, PN_stdfloat relaxation) {
 
 
   low  = deg_2_rad(low);
   low  = deg_2_rad(low);
   high = deg_2_rad(high);
   high = deg_2_rad(high);
@@ -126,11 +126,11 @@ set_limit(float low, float high, float softness, float bias, float relaxation) {
 //               coordinates.
 //               coordinates.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletHingeConstraint::
 void BulletHingeConstraint::
-set_axis(const LVector3f &axis) {
+set_axis(const LVector3 &axis) {
 
 
   nassertv(!axis.is_nan());
   nassertv(!axis.is_nan());
 
 
-  btVector3 v = LVecBase3f_to_btVector3(axis);
+  btVector3 v = LVecBase3_to_btVector3(axis);
   _constraint->setAxis(v);
   _constraint->setAxis(v);
 }
 }
 
 
@@ -139,7 +139,7 @@ set_axis(const LVector3f &axis) {
 //       Access: Published
 //       Access: Published
 //  Description: Returns the lower angular limit in degrees.
 //  Description: Returns the lower angular limit in degrees.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletHingeConstraint::
+PN_stdfloat BulletHingeConstraint::
 get_lower_limit() const {
 get_lower_limit() const {
 
 
   return rad_2_deg(_constraint->getLowerLimit());
   return rad_2_deg(_constraint->getLowerLimit());
@@ -150,7 +150,7 @@ get_lower_limit() const {
 //       Access: Published
 //       Access: Published
 //  Description: Returns the upper angular limit in degrees.
 //  Description: Returns the upper angular limit in degrees.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletHingeConstraint::
+PN_stdfloat BulletHingeConstraint::
 get_upper_limit() const {
 get_upper_limit() const {
 
 
   return rad_2_deg(_constraint->getUpperLimit());
   return rad_2_deg(_constraint->getUpperLimit());
@@ -162,7 +162,7 @@ get_upper_limit() const {
 //  Description: Returns the angle between node_a and node_b in
 //  Description: Returns the angle between node_a and node_b in
 //               degrees.
 //               degrees.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletHingeConstraint::
+PN_stdfloat BulletHingeConstraint::
 get_hinge_angle() {
 get_hinge_angle() {
 
 
   return rad_2_deg(_constraint->getHingeAngle());
   return rad_2_deg(_constraint->getHingeAngle());
@@ -178,7 +178,7 @@ get_hinge_angle() {
 //               velocity.
 //               velocity.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletHingeConstraint::
 void BulletHingeConstraint::
-enable_angular_motor(bool enable, float target_velocity, float max_impulse) {
+enable_angular_motor(bool enable, PN_stdfloat target_velocity, PN_stdfloat max_impulse) {
 
 
   _constraint->enableAngularMotor(enable, target_velocity, max_impulse);
   _constraint->enableAngularMotor(enable, target_velocity, max_impulse);
 }
 }
@@ -201,7 +201,7 @@ enable_motor(bool enable) {
 //               velocity set in enable_angular_motor.
 //               velocity set in enable_angular_motor.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletHingeConstraint::
 void BulletHingeConstraint::
-set_max_motor_impulse(float max_impulse) {
+set_max_motor_impulse(PN_stdfloat max_impulse) {
 
 
   _constraint->setMaxMotorImpulse(max_impulse);
   _constraint->setMaxMotorImpulse(max_impulse);
 }
 }
@@ -212,9 +212,9 @@ set_max_motor_impulse(float max_impulse) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletHingeConstraint::
 void BulletHingeConstraint::
-set_motor_target(const LQuaternionf &quat, float dt) {
+set_motor_target(const LQuaternion &quat, PN_stdfloat dt) {
 
 
-  _constraint->setMotorTarget(LQuaternionf_to_btQuat(quat), dt);
+  _constraint->setMotorTarget(LQuaternion_to_btQuat(quat), dt);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -223,7 +223,7 @@ set_motor_target(const LQuaternionf &quat, float dt) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletHingeConstraint::
 void BulletHingeConstraint::
-set_motor_target(float target_angle, float dt) {
+set_motor_target(PN_stdfloat target_angle, PN_stdfloat dt) {
 
 
   _constraint->setMotorTarget(target_angle, dt);
   _constraint->setMotorTarget(target_angle, dt);
 }
 }

+ 15 - 15
panda/src/bullet/bulletHingeConstraint.h

@@ -37,32 +37,32 @@ class EXPCL_PANDABULLET BulletHingeConstraint : public BulletConstraint {
 
 
 PUBLISHED:
 PUBLISHED:
   BulletHingeConstraint(const BulletRigidBodyNode *node_a, 
   BulletHingeConstraint(const BulletRigidBodyNode *node_a, 
-                        const LPoint3f &pivot_a,
-                        const LVector3f &axis_a,
+                        const LPoint3 &pivot_a,
+                        const LVector3 &axis_a,
                         bool use_frame_a=false);
                         bool use_frame_a=false);
   BulletHingeConstraint(const BulletRigidBodyNode *node_a,
   BulletHingeConstraint(const BulletRigidBodyNode *node_a,
                         const BulletRigidBodyNode *node_b,
                         const BulletRigidBodyNode *node_b,
-                        const LPoint3f &pivot_a,
-                        const LPoint3f &pivot_b,
-                        const LVector3f &axis_a,
-                        const LVector3f &axis_b,
+                        const LPoint3 &pivot_a,
+                        const LPoint3 &pivot_b,
+                        const LVector3 &axis_a,
+                        const LVector3 &axis_b,
                         bool use_frame_a=false);
                         bool use_frame_a=false);
   INLINE ~BulletHingeConstraint();
   INLINE ~BulletHingeConstraint();
 
 
-  float get_hinge_angle();
-  float get_lower_limit() const;
-  float get_upper_limit() const;
+  PN_stdfloat get_hinge_angle();
+  PN_stdfloat get_lower_limit() const;
+  PN_stdfloat get_upper_limit() const;
   bool get_angular_only() const;
   bool get_angular_only() const;
 
 
   void set_angular_only(bool value);
   void set_angular_only(bool value);
-  void set_limit(float low, float high, float softness=0.9f, float bias=0.3f, float relaxation=1.0f);
-  void set_axis(const LVector3f &axis);
+  void set_limit(PN_stdfloat low, PN_stdfloat high, PN_stdfloat softness=0.9f, PN_stdfloat bias=0.3f, PN_stdfloat relaxation=1.0f);
+  void set_axis(const LVector3 &axis);
 
 
-  void enable_angular_motor(bool enable, float target_velocity, float max_impulse);
+  void enable_angular_motor(bool enable, PN_stdfloat target_velocity, PN_stdfloat max_impulse);
   void enable_motor(bool enable);
   void enable_motor(bool enable);
-  void set_max_motor_impulse(float max_impulse);
-  void set_motor_target(const LQuaternionf &quat, float dt);
-  void set_motor_target(float target_angle, float dt);
+  void set_max_motor_impulse(PN_stdfloat max_impulse);
+  void set_motor_target(const LQuaternion &quat, PN_stdfloat dt);
+  void set_motor_target(PN_stdfloat target_angle, PN_stdfloat dt);
 
 
 public:
 public:
   virtual btTypedConstraint *ptr() const;
   virtual btTypedConstraint *ptr() const;

+ 12 - 12
panda/src/bullet/bulletManifoldPoint.cxx

@@ -40,10 +40,10 @@ get_lift_time() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletManifoldPoint::
+PN_stdfloat BulletManifoldPoint::
 get_distance() const {
 get_distance() const {
 
 
-  return _pt.getDistance();
+  return (PN_stdfloat)_pt.getDistance();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -51,10 +51,10 @@ get_distance() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletManifoldPoint::
+PN_stdfloat BulletManifoldPoint::
 get_applied_impulse() const {
 get_applied_impulse() const {
 
 
-  return _pt.getAppliedImpulse();
+  return (PN_stdfloat)_pt.getAppliedImpulse();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -62,10 +62,10 @@ get_applied_impulse() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LPoint3f BulletManifoldPoint::
+LPoint3 BulletManifoldPoint::
 get_position_world_on_a() const {
 get_position_world_on_a() const {
 
 
-  return btVector3_to_LPoint3f(_pt.getPositionWorldOnA());
+  return btVector3_to_LPoint3(_pt.getPositionWorldOnA());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -73,10 +73,10 @@ get_position_world_on_a() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LPoint3f BulletManifoldPoint::
+LPoint3 BulletManifoldPoint::
 get_position_world_on_b() const {
 get_position_world_on_b() const {
 
 
-  return btVector3_to_LPoint3f(_pt.getPositionWorldOnB());
+  return btVector3_to_LPoint3(_pt.getPositionWorldOnB());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -84,10 +84,10 @@ get_position_world_on_b() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LPoint3f BulletManifoldPoint::
+LPoint3 BulletManifoldPoint::
 get_local_point_a() const {
 get_local_point_a() const {
 
 
-  return btVector3_to_LPoint3f(_pt.m_localPointA);
+  return btVector3_to_LPoint3(_pt.m_localPointA);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -95,9 +95,9 @@ get_local_point_a() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LPoint3f BulletManifoldPoint::
+LPoint3 BulletManifoldPoint::
 get_local_point_b() const {
 get_local_point_b() const {
 
 
-  return btVector3_to_LPoint3f(_pt.m_localPointB);
+  return btVector3_to_LPoint3(_pt.m_localPointB);
 }
 }
 
 

+ 6 - 6
panda/src/bullet/bulletManifoldPoint.h

@@ -32,12 +32,12 @@ PUBLISHED:
   INLINE ~BulletManifoldPoint();
   INLINE ~BulletManifoldPoint();
 
 
   int get_lift_time() const;
   int get_lift_time() const;
-  float get_distance() const;
-  float get_applied_impulse() const;
-  LPoint3f get_position_world_on_a() const;
-  LPoint3f get_position_world_on_b() const;
-  LPoint3f get_local_point_a() const;
-  LPoint3f get_local_point_b() const;
+  PN_stdfloat get_distance() const;
+  PN_stdfloat get_applied_impulse() const;
+  LPoint3 get_position_world_on_a() const;
+  LPoint3 get_position_world_on_b() const;
+  LPoint3 get_local_point_a() const;
+  LPoint3 get_local_point_b() const;
 
 
 public:
 public:
   BulletManifoldPoint(btManifoldPoint &pt);
   BulletManifoldPoint(btManifoldPoint &pt);

+ 4 - 4
panda/src/bullet/bulletPersistentManifold.cxx

@@ -30,10 +30,10 @@ BulletPersistentManifold(btPersistentManifold *manifold) : _manifold(manifold) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletPersistentManifold::
+PN_stdfloat BulletPersistentManifold::
 get_contact_breaking_threshold() const {
 get_contact_breaking_threshold() const {
 
 
-  return _manifold->getContactBreakingThreshold();
+  return (PN_stdfloat)_manifold->getContactBreakingThreshold();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -41,10 +41,10 @@ get_contact_breaking_threshold() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletPersistentManifold::
+PN_stdfloat BulletPersistentManifold::
 get_contact_processing_threshold() const {
 get_contact_processing_threshold() const {
 
 
-  return _manifold->getContactProcessingThreshold();
+  return (PN_stdfloat)_manifold->getContactProcessingThreshold();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////

+ 2 - 2
panda/src/bullet/bulletPersistentManifold.h

@@ -39,8 +39,8 @@ PUBLISHED:
   BulletManifoldPoint *get_manifold_point(int idx) const;
   BulletManifoldPoint *get_manifold_point(int idx) const;
   MAKE_SEQ(get_manifold_points, get_num_manifold_points, get_manifold_point);
   MAKE_SEQ(get_manifold_points, get_num_manifold_points, get_manifold_point);
 
 
-  float get_contact_breaking_threshold() const;
-  float get_contact_processing_threshold() const;
+  PN_stdfloat get_contact_breaking_threshold() const;
+  PN_stdfloat get_contact_processing_threshold() const;
 
 
   void clear_manifold();
   void clear_manifold();
 
 

+ 4 - 4
panda/src/bullet/bulletPlaneShape.I

@@ -28,10 +28,10 @@ INLINE BulletPlaneShape::
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletPlaneShape::
+INLINE PN_stdfloat BulletPlaneShape::
 get_plane_constant() const {
 get_plane_constant() const {
 
 
-  return _shape->getPlaneConstant();
+  return (PN_stdfloat)_shape->getPlaneConstant();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -39,9 +39,9 @@ get_plane_constant() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE LVector3f BulletPlaneShape::
+INLINE LVector3 BulletPlaneShape::
 get_plane_normal() const {
 get_plane_normal() const {
 
 
-  return btVector3_to_LVector3f(_shape->getPlaneNormal());
+  return btVector3_to_LVector3(_shape->getPlaneNormal());
 }
 }
 
 

+ 4 - 4
panda/src/bullet/bulletPlaneShape.cxx

@@ -22,9 +22,9 @@ TypeHandle BulletPlaneShape::_type_handle;
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 BulletPlaneShape::
 BulletPlaneShape::
-BulletPlaneShape(const LVector3f &normal, float constant) {
+BulletPlaneShape(const LVector3 &normal, PN_stdfloat constant) {
 
 
-  btVector3 btNormal = LVecBase3f_to_btVector3(normal);
+  btVector3 btNormal = LVecBase3_to_btVector3(normal);
 
 
   _shape = new btStaticPlaneShape(btNormal, constant);
   _shape = new btStaticPlaneShape(btNormal, constant);
   _shape->setUserPointer(this);
   _shape->setUserPointer(this);
@@ -49,8 +49,8 @@ ptr() const {
 BulletPlaneShape *BulletPlaneShape::
 BulletPlaneShape *BulletPlaneShape::
 make_from_solid(const CollisionPlane *solid) {
 make_from_solid(const CollisionPlane *solid) {
 
 
-  LVector3f normal = solid->get_normal();
-  float constant = solid->dist_to_plane(LPoint3f(0, 0, 0));
+  LVector3 normal = solid->get_normal();
+  PN_stdfloat constant = solid->dist_to_plane(LPoint3(0, 0, 0));
 
 
   return new BulletPlaneShape(normal, constant);
   return new BulletPlaneShape(normal, constant);
 }
 }

+ 3 - 3
panda/src/bullet/bulletPlaneShape.h

@@ -31,11 +31,11 @@
 class EXPCL_PANDABULLET BulletPlaneShape : public BulletShape {
 class EXPCL_PANDABULLET BulletPlaneShape : public BulletShape {
 
 
 PUBLISHED:
 PUBLISHED:
-  BulletPlaneShape(const LVector3f &normal, float constant);
+  BulletPlaneShape(const LVector3 &normal, PN_stdfloat constant);
   INLINE ~BulletPlaneShape();
   INLINE ~BulletPlaneShape();
 
 
-  INLINE LVector3f get_plane_normal() const;
-  INLINE float get_plane_constant() const;
+  INLINE LVector3 get_plane_normal() const;
+  INLINE PN_stdfloat get_plane_constant() const;
 
 
   static BulletPlaneShape *make_from_solid(const CollisionPlane *solid);
   static BulletPlaneShape *make_from_solid(const CollisionPlane *solid);
 
 

+ 6 - 6
panda/src/bullet/bulletRigidBodyNode.I

@@ -31,7 +31,7 @@ INLINE BulletRigidBodyNode::
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletRigidBodyNode::
 INLINE void BulletRigidBodyNode::
-set_linear_damping(float value) {
+set_linear_damping(PN_stdfloat value) {
 
 
   _rigid->setDamping(value, _rigid->getAngularDamping());
   _rigid->setDamping(value, _rigid->getAngularDamping());
 }
 }
@@ -42,7 +42,7 @@ set_linear_damping(float value) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletRigidBodyNode::
 INLINE void BulletRigidBodyNode::
-set_angular_damping(float value) {
+set_angular_damping(PN_stdfloat value) {
 
 
   _rigid->setDamping(_rigid->getLinearDamping(), value);
   _rigid->setDamping(_rigid->getLinearDamping(), value);
 }
 }
@@ -52,10 +52,10 @@ set_angular_damping(float value) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletRigidBodyNode::
+INLINE PN_stdfloat BulletRigidBodyNode::
 get_linear_damping() const {
 get_linear_damping() const {
 
 
-  return _rigid->getLinearDamping();
+  return (PN_stdfloat)_rigid->getLinearDamping();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -63,9 +63,9 @@ get_linear_damping() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletRigidBodyNode::
+INLINE PN_stdfloat BulletRigidBodyNode::
 get_angular_damping() const {
 get_angular_damping() const {
 
 
-  return _rigid->getAngularDamping();
+  return (PN_stdfloat)_rigid->getAngularDamping();
 }
 }
 
 

+ 46 - 46
panda/src/bullet/bulletRigidBodyNode.cxx

@@ -99,7 +99,7 @@ shape_changed() {
 //               zero can be considered an infinite mass.
 //               zero can be considered an infinite mass.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletRigidBodyNode::
 void BulletRigidBodyNode::
-set_mass(float mass) {
+set_mass(PN_stdfloat mass) {
 
 
   btScalar bt_mass = mass;
   btScalar bt_mass = mass;
   btVector3 bt_inertia(0.0, 0.0, 0.0);
   btVector3 bt_inertia(0.0, 0.0, 0.0);
@@ -119,7 +119,7 @@ set_mass(float mass) {
 //               A value of zero means that the body is staic, i.e.
 //               A value of zero means that the body is staic, i.e.
 //               has an infinite mass.
 //               has an infinite mass.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletRigidBodyNode::
+PN_stdfloat BulletRigidBodyNode::
 get_mass() const {
 get_mass() const {
 
 
   btScalar inv_mass = _rigid->getInvMass();
   btScalar inv_mass = _rigid->getInvMass();
@@ -145,7 +145,7 @@ get_mass() const {
 //               (c) the scale of the body changed.
 //               (c) the scale of the body changed.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletRigidBodyNode::
 void BulletRigidBodyNode::
-set_inertia(const LVecBase3f &inertia) {
+set_inertia(const LVecBase3 &inertia) {
 
 
   btVector3 inv_inertia(
   btVector3 inv_inertia(
     inertia.get_x() == 0.0 ? btScalar(0.0) : btScalar(1.0 / inertia.get_x()),
     inertia.get_x() == 0.0 ? btScalar(0.0) : btScalar(1.0 / inertia.get_x()),
@@ -165,11 +165,11 @@ set_inertia(const LVecBase3f &inertia) {
 //               value of zero means infinite inertia along this
 //               value of zero means infinite inertia along this
 //               direction.
 //               direction.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVector3f BulletRigidBodyNode::
+LVector3 BulletRigidBodyNode::
 get_inertia() const {
 get_inertia() const {
 
 
   btVector3 inv_inertia = _rigid->getInvInertiaDiagLocal();
   btVector3 inv_inertia = _rigid->getInvInertiaDiagLocal();
-  LVector3f inertia(
+  LVector3 inertia(
     inv_inertia.x() == btScalar(0.0) ? 0.0 : 1.0 / inv_inertia.x(),
     inv_inertia.x() == btScalar(0.0) ? 0.0 : 1.0 / inv_inertia.x(),
     inv_inertia.y() == btScalar(0.0) ? 0.0 : 1.0 / inv_inertia.y(),
     inv_inertia.y() == btScalar(0.0) ? 0.0 : 1.0 / inv_inertia.y(),
     inv_inertia.z() == btScalar(0.0) ? 0.0 : 1.0 / inv_inertia.z()
     inv_inertia.z() == btScalar(0.0) ? 0.0 : 1.0 / inv_inertia.z()
@@ -184,13 +184,13 @@ get_inertia() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletRigidBodyNode::
 void BulletRigidBodyNode::
-apply_force(const LVector3f &force, const LPoint3f &pos) {
+apply_force(const LVector3 &force, const LPoint3 &pos) {
 
 
   nassertv_always(!force.is_nan());
   nassertv_always(!force.is_nan());
   nassertv_always(!pos.is_nan());
   nassertv_always(!pos.is_nan());
 
 
-  _rigid->applyForce(LVecBase3f_to_btVector3(force),
-                     LVecBase3f_to_btVector3(pos));
+  _rigid->applyForce(LVecBase3_to_btVector3(force),
+                     LVecBase3_to_btVector3(pos));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -199,11 +199,11 @@ apply_force(const LVector3f &force, const LPoint3f &pos) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletRigidBodyNode::
 void BulletRigidBodyNode::
-apply_central_force(const LVector3f &force) {
+apply_central_force(const LVector3 &force) {
 
 
   nassertv_always(!force.is_nan());
   nassertv_always(!force.is_nan());
 
 
-  _rigid->applyCentralForce(LVecBase3f_to_btVector3(force));
+  _rigid->applyCentralForce(LVecBase3_to_btVector3(force));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -212,11 +212,11 @@ apply_central_force(const LVector3f &force) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletRigidBodyNode::
 void BulletRigidBodyNode::
-apply_torque(const LVector3f &torque) {
+apply_torque(const LVector3 &torque) {
 
 
   nassertv_always(!torque.is_nan());
   nassertv_always(!torque.is_nan());
 
 
-  _rigid->applyTorque(LVecBase3f_to_btVector3(torque));
+  _rigid->applyTorque(LVecBase3_to_btVector3(torque));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -225,11 +225,11 @@ apply_torque(const LVector3f &torque) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletRigidBodyNode::
 void BulletRigidBodyNode::
-apply_torque_impulse(const LVector3f &torque) {
+apply_torque_impulse(const LVector3 &torque) {
 
 
   nassertv_always(!torque.is_nan());
   nassertv_always(!torque.is_nan());
 
 
-  _rigid->applyTorqueImpulse(LVecBase3f_to_btVector3(torque));
+  _rigid->applyTorqueImpulse(LVecBase3_to_btVector3(torque));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -238,13 +238,13 @@ apply_torque_impulse(const LVector3f &torque) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletRigidBodyNode::
 void BulletRigidBodyNode::
-apply_impulse(const LVector3f &impulse, const LPoint3f &pos) {
+apply_impulse(const LVector3 &impulse, const LPoint3 &pos) {
 
 
   nassertv_always(!impulse.is_nan());
   nassertv_always(!impulse.is_nan());
   nassertv_always(!pos.is_nan());
   nassertv_always(!pos.is_nan());
 
 
-  _rigid->applyImpulse(LVecBase3f_to_btVector3(impulse),
-                       LVecBase3f_to_btVector3(pos));
+  _rigid->applyImpulse(LVecBase3_to_btVector3(impulse),
+                       LVecBase3_to_btVector3(pos));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -253,11 +253,11 @@ apply_impulse(const LVector3f &impulse, const LPoint3f &pos) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletRigidBodyNode::
 void BulletRigidBodyNode::
-apply_central_impulse(const LVector3f &impulse) {
+apply_central_impulse(const LVector3 &impulse) {
 
 
   nassertv_always(!impulse.is_nan());
   nassertv_always(!impulse.is_nan());
 
 
-  _rigid->applyCentralImpulse(LVecBase3f_to_btVector3(impulse));
+  _rigid->applyCentralImpulse(LVecBase3_to_btVector3(impulse));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -273,8 +273,8 @@ transform_changed() {
   NodePath np = NodePath::any_path((PandaNode *)this);
   NodePath np = NodePath::any_path((PandaNode *)this);
   CPT(TransformState) ts = np.get_net_transform();
   CPT(TransformState) ts = np.get_net_transform();
 
 
-  LMatrix4f m_sync = _sync->get_mat();
-  LMatrix4f m_ts = ts->get_mat();
+  LMatrix4 m_sync = _sync->get_mat();
+  LMatrix4 m_ts = ts->get_mat();
 
 
   if (!m_sync.almost_equal(m_ts)) {
   if (!m_sync.almost_equal(m_ts)) {
     _sync = ts;
     _sync = ts;
@@ -283,8 +283,8 @@ transform_changed() {
     _rigid->setCenterOfMassTransform(trans);
     _rigid->setCenterOfMassTransform(trans);
 
 
     if (ts->has_scale()) {
     if (ts->has_scale()) {
-      LVecBase3f scale = ts->get_scale();
-      if (!scale.almost_equal(LVecBase3f(1.0f, 1.0f, 1.0f))) {
+      LVecBase3 scale = ts->get_scale();
+      if (!scale.almost_equal(LVecBase3(1.0f, 1.0f, 1.0f))) {
         for (int i=0; i<get_num_shapes(); i++) {
         for (int i=0; i<get_num_shapes(); i++) {
           PT(BulletShape) shape = _shapes[i];
           PT(BulletShape) shape = _shapes[i];
           shape->set_local_scale(scale);
           shape->set_local_scale(scale);
@@ -321,13 +321,13 @@ void BulletRigidBodyNode::
 sync_b2p() {
 sync_b2p() {
 
 
   NodePath np = NodePath::any_path((PandaNode *)this);
   NodePath np = NodePath::any_path((PandaNode *)this);
-  LVecBase3f scale = np.get_net_transform()->get_scale();
+  LVecBase3 scale = np.get_net_transform()->get_scale();
 
 
   btTransform trans = _rigid->getWorldTransform();
   btTransform trans = _rigid->getWorldTransform();
   CPT(TransformState) ts = btTrans_to_TransformState(trans, scale);
   CPT(TransformState) ts = btTrans_to_TransformState(trans, scale);
 
 
-  LMatrix4f m_sync = _sync->get_mat();
-  LMatrix4f m_ts = ts->get_mat();
+  LMatrix4 m_sync = _sync->get_mat();
+  LMatrix4 m_ts = ts->get_mat();
 
 
   if (!m_sync.almost_equal(m_ts)) {
   if (!m_sync.almost_equal(m_ts)) {
     _sync = ts;
     _sync = ts;
@@ -342,10 +342,10 @@ sync_b2p() {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVector3f BulletRigidBodyNode::
+LVector3 BulletRigidBodyNode::
 get_linear_velocity() const {
 get_linear_velocity() const {
 
 
-  return btVector3_to_LVector3f(_rigid->getLinearVelocity());
+  return btVector3_to_LVector3(_rigid->getLinearVelocity());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -353,10 +353,10 @@ get_linear_velocity() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVector3f BulletRigidBodyNode::
+LVector3 BulletRigidBodyNode::
 get_angular_velocity() const {
 get_angular_velocity() const {
 
 
-  return btVector3_to_LVector3f(_rigid->getAngularVelocity());
+  return btVector3_to_LVector3(_rigid->getAngularVelocity());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -365,11 +365,11 @@ get_angular_velocity() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletRigidBodyNode::
 void BulletRigidBodyNode::
-set_linear_velocity(const LVector3f &velocity) {
+set_linear_velocity(const LVector3 &velocity) {
 
 
   nassertv_always(!velocity.is_nan());
   nassertv_always(!velocity.is_nan());
 
 
-  _rigid->setLinearVelocity(LVecBase3f_to_btVector3(velocity));
+  _rigid->setLinearVelocity(LVecBase3_to_btVector3(velocity));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -378,11 +378,11 @@ set_linear_velocity(const LVector3f &velocity) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletRigidBodyNode::
 void BulletRigidBodyNode::
-set_angular_velocity(const LVector3f &velocity) {
+set_angular_velocity(const LVector3 &velocity) {
 
 
   nassertv_always(!velocity.is_nan());
   nassertv_always(!velocity.is_nan());
 
 
-  _rigid->setAngularVelocity(LVecBase3f_to_btVector3(velocity));
+  _rigid->setAngularVelocity(LVecBase3_to_btVector3(velocity));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -401,7 +401,7 @@ clear_forces() {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletRigidBodyNode::
+PN_stdfloat BulletRigidBodyNode::
 get_linear_sleep_threshold() const {
 get_linear_sleep_threshold() const {
 
 
   return _rigid->getLinearSleepingThreshold();
   return _rigid->getLinearSleepingThreshold();
@@ -412,7 +412,7 @@ get_linear_sleep_threshold() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletRigidBodyNode::
+PN_stdfloat BulletRigidBodyNode::
 get_angular_sleep_threshold() const {
 get_angular_sleep_threshold() const {
 
 
   return _rigid->getAngularSleepingThreshold();
   return _rigid->getAngularSleepingThreshold();
@@ -424,7 +424,7 @@ get_angular_sleep_threshold() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletRigidBodyNode::
 void BulletRigidBodyNode::
-set_linear_sleep_threshold(float threshold) {
+set_linear_sleep_threshold(PN_stdfloat threshold) {
 
 
   _rigid->setSleepingThresholds(_rigid->getLinearSleepingThreshold(), threshold);
   _rigid->setSleepingThresholds(_rigid->getLinearSleepingThreshold(), threshold);
 }
 }
@@ -435,7 +435,7 @@ set_linear_sleep_threshold(float threshold) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletRigidBodyNode::
 void BulletRigidBodyNode::
-set_angular_sleep_threshold(float threshold) {
+set_angular_sleep_threshold(PN_stdfloat threshold) {
 
 
   _rigid->setSleepingThresholds(threshold, _rigid->getAngularSleepingThreshold());
   _rigid->setSleepingThresholds(threshold, _rigid->getAngularSleepingThreshold());
 }
 }
@@ -446,11 +446,11 @@ set_angular_sleep_threshold(float threshold) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletRigidBodyNode::
 void BulletRigidBodyNode::
-set_gravity(const LVector3f &gravity) {
+set_gravity(const LVector3 &gravity) {
 
 
   nassertv_always(!gravity.is_nan());
   nassertv_always(!gravity.is_nan());
 
 
-  _rigid->setGravity(LVecBase3f_to_btVector3(gravity));
+  _rigid->setGravity(LVecBase3_to_btVector3(gravity));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -458,10 +458,10 @@ set_gravity(const LVector3f &gravity) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVector3f BulletRigidBodyNode::
+LVector3 BulletRigidBodyNode::
 get_gravity() const {
 get_gravity() const {
 
 
-  return btVector3_to_LVector3f(_rigid->getGravity());
+  return btVector3_to_LVector3(_rigid->getGravity());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -470,9 +470,9 @@ get_gravity() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletRigidBodyNode::
 void BulletRigidBodyNode::
-set_linear_factor(const LVector3f &factor) {
+set_linear_factor(const LVector3 &factor) {
 
 
-  _rigid->setLinearFactor(LVecBase3f_to_btVector3(factor));
+  _rigid->setLinearFactor(LVecBase3_to_btVector3(factor));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -481,9 +481,9 @@ set_linear_factor(const LVector3f &factor) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletRigidBodyNode::
 void BulletRigidBodyNode::
-set_angular_factor(const LVector3f &factor) {
+set_angular_factor(const LVector3 &factor) {
 
 
-  _rigid->setAngularFactor(LVecBase3f_to_btVector3(factor));
+  _rigid->setAngularFactor(LVecBase3_to_btVector3(factor));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////

+ 26 - 26
panda/src/bullet/bulletRigidBodyNode.h

@@ -37,45 +37,45 @@ PUBLISHED:
   INLINE ~BulletRigidBodyNode();
   INLINE ~BulletRigidBodyNode();
 
 
   // Mass & inertia
   // Mass & inertia
-  void set_mass(float mass);
-  float get_mass() const;
-  void set_inertia(const LVecBase3f &inertia);
-  LVector3f get_inertia() const;
+  void set_mass(PN_stdfloat mass);
+  PN_stdfloat get_mass() const;
+  void set_inertia(const LVecBase3 &inertia);
+  LVector3 get_inertia() const;
 
 
   // Velocity
   // Velocity
-  LVector3f get_linear_velocity() const;
-  LVector3f get_angular_velocity() const;
-  void set_linear_velocity(const LVector3f &velocity);
-  void set_angular_velocity(const LVector3f &velocity);
+  LVector3 get_linear_velocity() const;
+  LVector3 get_angular_velocity() const;
+  void set_linear_velocity(const LVector3 &velocity);
+  void set_angular_velocity(const LVector3 &velocity);
 
 
   // Damping
   // Damping
-  INLINE float get_linear_damping() const;
-  INLINE float get_angular_damping() const;
-  INLINE void set_linear_damping(float value);
-  INLINE void set_angular_damping(float value);
+  INLINE PN_stdfloat get_linear_damping() const;
+  INLINE PN_stdfloat get_angular_damping() const;
+  INLINE void set_linear_damping(PN_stdfloat value);
+  INLINE void set_angular_damping(PN_stdfloat value);
 
 
   // Forces
   // Forces
   void clear_forces();
   void clear_forces();
-  void apply_force(const LVector3f &force, const LPoint3f &pos);
-  void apply_central_force(const LVector3f &force);
-  void apply_impulse(const LVector3f &impulse, const LPoint3f &pos);
-  void apply_central_impulse(const LVector3f &impulse);
-  void apply_torque(const LVector3f &torque);
-  void apply_torque_impulse(const LVector3f &torque);
+  void apply_force(const LVector3 &force, const LPoint3 &pos);
+  void apply_central_force(const LVector3 &force);
+  void apply_impulse(const LVector3 &impulse, const LPoint3 &pos);
+  void apply_central_impulse(const LVector3 &impulse);
+  void apply_torque(const LVector3 &torque);
+  void apply_torque_impulse(const LVector3 &torque);
 
 
   // Deactivation thresholds
   // Deactivation thresholds
-  float get_linear_sleep_threshold() const;
-  float get_angular_sleep_threshold() const;
-  void set_linear_sleep_threshold(float threshold);
-  void set_angular_sleep_threshold(float threshold);
+  PN_stdfloat get_linear_sleep_threshold() const;
+  PN_stdfloat get_angular_sleep_threshold() const;
+  void set_linear_sleep_threshold(PN_stdfloat threshold);
+  void set_angular_sleep_threshold(PN_stdfloat threshold);
 
 
   // Gravity
   // Gravity
-  void set_gravity(const LVector3f &gravity);
-  LVector3f get_gravity() const;
+  void set_gravity(const LVector3 &gravity);
+  LVector3 get_gravity() const;
 
 
   // Restrict movement
   // Restrict movement
-  void set_linear_factor(const LVector3f &factor);
-  void set_angular_factor(const LVector3f &factor);
+  void set_linear_factor(const LVector3 &factor);
+  void set_angular_factor(const LVector3 &factor);
 
 
 public:
 public:
   virtual btCollisionObject *get_object() const;
   virtual btCollisionObject *get_object() const;

+ 6 - 6
panda/src/bullet/bulletShape.cxx

@@ -33,7 +33,7 @@ get_name() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletShape::
+PN_stdfloat BulletShape::
 get_margin() const {
 get_margin() const {
 
 
   return ptr()->getMargin();
   return ptr()->getMargin();
@@ -45,7 +45,7 @@ get_margin() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletShape::
 void BulletShape::
-set_margin(float margin) {
+set_margin(PN_stdfloat margin) {
 
 
   ptr()->setMargin(margin);
   ptr()->setMargin(margin);
 }
 }
@@ -55,10 +55,10 @@ set_margin(float margin) {
 //       Access: Public
 //       Access: Public
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVecBase3f BulletShape::
+LVecBase3 BulletShape::
 get_local_scale() const {
 get_local_scale() const {
 
 
-  return btVector3_to_LVecBase3f(ptr()->getLocalScaling());
+  return btVector3_to_LVecBase3(ptr()->getLocalScaling());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -67,9 +67,9 @@ get_local_scale() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletShape::
 void BulletShape::
-set_local_scale(const LVecBase3f &scale) {
+set_local_scale(const LVecBase3 &scale) {
 
 
   nassertv(!scale.is_nan());
   nassertv(!scale.is_nan());
-  ptr()->setLocalScaling(LVecBase3f_to_btVector3(scale));
+  ptr()->setLocalScaling(LVecBase3_to_btVector3(scale));
 }
 }
 
 

+ 4 - 4
panda/src/bullet/bulletShape.h

@@ -38,16 +38,16 @@ PUBLISHED:
   INLINE bool is_non_moving() const;
   INLINE bool is_non_moving() const;
   INLINE bool is_soft_body() const;
   INLINE bool is_soft_body() const;
 
 
-  void set_margin(float margin);
+  void set_margin(PN_stdfloat margin);
   const char *get_name() const;
   const char *get_name() const;
 
 
-  float get_margin() const;
+  PN_stdfloat get_margin() const;
 
 
 public:
 public:
   virtual btCollisionShape *ptr() const = 0;
   virtual btCollisionShape *ptr() const = 0;
 
 
-  LVecBase3f get_local_scale() const;
-  void set_local_scale(const LVecBase3f &scale);
+  LVecBase3 get_local_scale() const;
+  void set_local_scale(const LVecBase3 &scale);
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 public:
 public:

+ 34 - 34
panda/src/bullet/bulletSliderConstraint.cxx

@@ -72,10 +72,10 @@ ptr() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletSliderConstraint::
+PN_stdfloat BulletSliderConstraint::
 get_lower_linear_limit() const {
 get_lower_linear_limit() const {
 
 
-  return _constraint->getLowerLinLimit();
+  return (PN_stdfloat)_constraint->getLowerLinLimit();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -83,10 +83,10 @@ get_lower_linear_limit() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletSliderConstraint::
+PN_stdfloat BulletSliderConstraint::
 get_upper_linear_limit() const {
 get_upper_linear_limit() const {
 
 
-  return _constraint->getUpperLinLimit();
+  return (PN_stdfloat)_constraint->getUpperLinLimit();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -94,7 +94,7 @@ get_upper_linear_limit() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletSliderConstraint::
+PN_stdfloat BulletSliderConstraint::
 get_lower_angular_limit() const {
 get_lower_angular_limit() const {
 
 
   return rad_2_deg(_constraint->getLowerAngLimit());
   return rad_2_deg(_constraint->getLowerAngLimit());
@@ -105,7 +105,7 @@ get_lower_angular_limit() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletSliderConstraint::
+PN_stdfloat BulletSliderConstraint::
 get_upper_angular_limit() const {
 get_upper_angular_limit() const {
 
 
   return rad_2_deg(_constraint->getUpperAngLimit());
   return rad_2_deg(_constraint->getUpperAngLimit());
@@ -117,9 +117,9 @@ get_upper_angular_limit() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSliderConstraint::
 void BulletSliderConstraint::
-set_lower_linear_limit(float value) {
+set_lower_linear_limit(PN_stdfloat value) {
 
 
-  _constraint->setLowerLinLimit(value);
+  _constraint->setLowerLinLimit((btScalar)value);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -128,9 +128,9 @@ set_lower_linear_limit(float value) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSliderConstraint::
 void BulletSliderConstraint::
-set_upper_linear_limit(float value) {
+set_upper_linear_limit(PN_stdfloat value) {
 
 
-  _constraint->setUpperLinLimit(value);
+  _constraint->setUpperLinLimit((btScalar)value);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -139,9 +139,9 @@ set_upper_linear_limit(float value) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSliderConstraint::
 void BulletSliderConstraint::
-set_lower_angular_limit(float value) {
+set_lower_angular_limit(PN_stdfloat value) {
 
 
-  _constraint->setLowerAngLimit(deg_2_rad(value));
+  _constraint->setLowerAngLimit((btScalar)deg_2_rad(value));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -150,9 +150,9 @@ set_lower_angular_limit(float value) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSliderConstraint::
 void BulletSliderConstraint::
-set_upper_angular_limit(float value) {
+set_upper_angular_limit(PN_stdfloat value) {
 
 
-  _constraint->setUpperAngLimit(deg_2_rad(value));
+  _constraint->setUpperAngLimit((btScalar)deg_2_rad(value));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -160,10 +160,10 @@ set_upper_angular_limit(float value) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletSliderConstraint::
+PN_stdfloat BulletSliderConstraint::
 get_linear_pos() const {
 get_linear_pos() const {
 
 
-  return _constraint->getLinearPos();
+  return (PN_stdfloat)_constraint->getLinearPos();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -171,10 +171,10 @@ get_linear_pos() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletSliderConstraint::
+PN_stdfloat BulletSliderConstraint::
 get_angular_pos() const {
 get_angular_pos() const {
 
 
-  return _constraint->getAngularPos();
+  return (PN_stdfloat)_constraint->getAngularPos();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -194,9 +194,9 @@ set_powered_linear_motor(bool on) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSliderConstraint::
 void BulletSliderConstraint::
-set_target_linear_motor_velocity(float target_velocity) {
+set_target_linear_motor_velocity(PN_stdfloat target_velocity) {
 
 
-  _constraint->setTargetLinMotorVelocity(target_velocity);
+  _constraint->setTargetLinMotorVelocity((btScalar)target_velocity);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -205,9 +205,9 @@ set_target_linear_motor_velocity(float target_velocity) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSliderConstraint::
 void BulletSliderConstraint::
-set_max_linear_motor_force(float max_force) {
+set_max_linear_motor_force(PN_stdfloat max_force) {
 
 
-  _constraint->setMaxLinMotorForce(max_force);
+  _constraint->setMaxLinMotorForce((btScalar)max_force);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -226,10 +226,10 @@ get_powered_linear_motor() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletSliderConstraint::
+PN_stdfloat BulletSliderConstraint::
 get_target_linear_motor_velocity() const {
 get_target_linear_motor_velocity() const {
 
 
-  return _constraint->getTargetLinMotorVelocity();
+  return (PN_stdfloat)_constraint->getTargetLinMotorVelocity();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -237,10 +237,10 @@ get_target_linear_motor_velocity() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletSliderConstraint::
+PN_stdfloat BulletSliderConstraint::
 get_max_linear_motor_force() const {
 get_max_linear_motor_force() const {
 
 
-  return _constraint->getMaxLinMotorForce();
+  return (PN_stdfloat)_constraint->getMaxLinMotorForce();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -260,9 +260,9 @@ set_powered_angular_motor(bool on) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSliderConstraint::
 void BulletSliderConstraint::
-set_target_angular_motor_velocity(float target_velocity) {
+set_target_angular_motor_velocity(PN_stdfloat target_velocity) {
 
 
-  _constraint->setTargetAngMotorVelocity(target_velocity);
+  _constraint->setTargetAngMotorVelocity((btScalar)target_velocity);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -271,9 +271,9 @@ set_target_angular_motor_velocity(float target_velocity) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSliderConstraint::
 void BulletSliderConstraint::
-set_max_angular_motor_force(float max_force) {
+set_max_angular_motor_force(PN_stdfloat max_force) {
 
 
-  _constraint->setMaxAngMotorForce(max_force);
+  _constraint->setMaxAngMotorForce((btScalar)max_force);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -292,10 +292,10 @@ get_powered_angular_motor() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletSliderConstraint::
+PN_stdfloat BulletSliderConstraint::
 get_target_angular_motor_velocity() const {
 get_target_angular_motor_velocity() const {
 
 
-  return _constraint->getTargetAngMotorVelocity();
+  return (PN_stdfloat)_constraint->getTargetAngMotorVelocity();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -303,9 +303,9 @@ get_target_angular_motor_velocity() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletSliderConstraint::
+PN_stdfloat BulletSliderConstraint::
 get_max_angular_motor_force() const {
 get_max_angular_motor_force() const {
 
 
-  return _constraint->getMaxAngMotorForce();
+  return (PN_stdfloat)_constraint->getMaxAngMotorForce();
 }
 }
 
 

+ 18 - 18
panda/src/bullet/bulletSliderConstraint.h

@@ -42,34 +42,34 @@ PUBLISHED:
                          bool use_frame_a);
                          bool use_frame_a);
   INLINE ~BulletSliderConstraint();
   INLINE ~BulletSliderConstraint();
 
 
-  float get_linear_pos() const;
-  float get_angular_pos() const;
+  PN_stdfloat get_linear_pos() const;
+  PN_stdfloat get_angular_pos() const;
 
 
   // Limits
   // Limits
-  float get_lower_linear_limit() const;
-  float get_upper_linear_limit() const;
-  float get_lower_angular_limit() const;
-  float get_upper_angular_limit() const;
-  void set_lower_linear_limit(float value);
-  void set_upper_linear_limit(float value);
-  void set_lower_angular_limit(float value);
-  void set_upper_angular_limit(float value);
+  PN_stdfloat get_lower_linear_limit() const;
+  PN_stdfloat get_upper_linear_limit() const;
+  PN_stdfloat get_lower_angular_limit() const;
+  PN_stdfloat get_upper_angular_limit() const;
+  void set_lower_linear_limit(PN_stdfloat value);
+  void set_upper_linear_limit(PN_stdfloat value);
+  void set_lower_angular_limit(PN_stdfloat value);
+  void set_upper_angular_limit(PN_stdfloat value);
 
 
   // Linear motor
   // Linear motor
   void set_powered_linear_motor(bool on);
   void set_powered_linear_motor(bool on);
-  void set_target_linear_motor_velocity (float target_velocity);
-  void set_max_linear_motor_force(float max_force);
+  void set_target_linear_motor_velocity (PN_stdfloat target_velocity);
+  void set_max_linear_motor_force(PN_stdfloat max_force);
   bool get_powered_linear_motor() const;
   bool get_powered_linear_motor() const;
-  float get_target_linear_motor_velocity() const;
-  float get_max_linear_motor_force() const;
+  PN_stdfloat get_target_linear_motor_velocity() const;
+  PN_stdfloat get_max_linear_motor_force() const;
 
 
   // Angular motor
   // Angular motor
   void set_powered_angular_motor(bool on);
   void set_powered_angular_motor(bool on);
-  void set_target_angular_motor_velocity (float target_velocity);
-  void set_max_angular_motor_force(float max_force);
+  void set_target_angular_motor_velocity (PN_stdfloat target_velocity);
+  void set_max_angular_motor_force(PN_stdfloat max_force);
   bool get_powered_angular_motor() const;
   bool get_powered_angular_motor() const;
-  float get_target_angular_motor_velocity() const;
-  float get_max_angular_motor_force() const;
+  PN_stdfloat get_target_angular_motor_velocity() const;
+  PN_stdfloat get_max_angular_motor_force() const;
 
 
 public:
 public:
   virtual btTypedConstraint *ptr() const;
   virtual btTypedConstraint *ptr() const;

+ 80 - 80
panda/src/bullet/bulletSoftBodyConfig.I

@@ -27,10 +27,10 @@ INLINE BulletSoftBodyConfig::
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property kVCF.
 //  Description: Getter for property kVCF.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_velocities_correction_factor() const {
 get_velocities_correction_factor() const {
 
 
-  return _cfg.kVCF;
+  return (PN_stdfloat)_cfg.kVCF;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -39,9 +39,9 @@ get_velocities_correction_factor() const {
 //  Description: Setter for property kVCF.
 //  Description: Setter for property kVCF.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_velocities_correction_factor(float value) {
+set_velocities_correction_factor(PN_stdfloat value) {
 
 
-  _cfg.kVCF = value;
+  _cfg.kVCF = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -49,10 +49,10 @@ set_velocities_correction_factor(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property kDP.
 //  Description: Getter for property kDP.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_damping_coefficient() const {
 get_damping_coefficient() const {
 
 
-  return _cfg.kDP;
+  return (PN_stdfloat)_cfg.kDP;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -61,9 +61,9 @@ get_damping_coefficient() const {
 //  Description: Setter for property kDP.
 //  Description: Setter for property kDP.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_damping_coefficient(float value) {
+set_damping_coefficient(PN_stdfloat value) {
 
 
-  _cfg.kDP = value;
+  _cfg.kDP = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -71,10 +71,10 @@ set_damping_coefficient(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property kDG.
 //  Description: Getter for property kDG.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_drag_coefficient() const {
 get_drag_coefficient() const {
 
 
-  return _cfg.kDG;
+  return (PN_stdfloat)_cfg.kDG;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -83,9 +83,9 @@ get_drag_coefficient() const {
 //  Description: Setter for property kDG.
 //  Description: Setter for property kDG.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_drag_coefficient(float value) {
+set_drag_coefficient(PN_stdfloat value) {
 
 
-  _cfg.kDG = value;
+  _cfg.kDG = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -93,10 +93,10 @@ set_drag_coefficient(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property kLF.
 //  Description: Getter for property kLF.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_lift_coefficient() const {
 get_lift_coefficient() const {
 
 
-  return _cfg.kLF;
+  return (PN_stdfloat)_cfg.kLF;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -105,9 +105,9 @@ get_lift_coefficient() const {
 //  Description: Setter for property kLF.
 //  Description: Setter for property kLF.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_lift_coefficient(float value) {
+set_lift_coefficient(PN_stdfloat value) {
 
 
-  _cfg.kLF = value;
+  _cfg.kLF = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -115,10 +115,10 @@ set_lift_coefficient(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property kPR.
 //  Description: Getter for property kPR.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_pressure_coefficient() const {
 get_pressure_coefficient() const {
 
 
-  return _cfg.kPR;
+  return (PN_stdfloat)_cfg.kPR;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -127,9 +127,9 @@ get_pressure_coefficient() const {
 //  Description: Setter for property kPR.
 //  Description: Setter for property kPR.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_pressure_coefficient(float value) {
+set_pressure_coefficient(PN_stdfloat value) {
 
 
-  _cfg.kPR = value;
+  _cfg.kPR = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -137,10 +137,10 @@ set_pressure_coefficient(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property kVC.
 //  Description: Getter for property kVC.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_volume_conversation_coefficient() const {
 get_volume_conversation_coefficient() const {
 
 
-  return _cfg.kVC;
+  return (PN_stdfloat)_cfg.kVC;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -149,9 +149,9 @@ get_volume_conversation_coefficient() const {
 //  Description: Setter for property kVC.
 //  Description: Setter for property kVC.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_volume_conversation_coefficient(float value) {
+set_volume_conversation_coefficient(PN_stdfloat value) {
 
 
-  _cfg.kVC = value;
+  _cfg.kVC = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -159,10 +159,10 @@ set_volume_conversation_coefficient(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property kDF.
 //  Description: Getter for property kDF.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_dynamic_friction_coefficient() const {
 get_dynamic_friction_coefficient() const {
 
 
-  return _cfg.kDF;
+  return (PN_stdfloat)_cfg.kDF;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -171,9 +171,9 @@ get_dynamic_friction_coefficient() const {
 //  Description: Setter for property kDF.
 //  Description: Setter for property kDF.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_dynamic_friction_coefficient(float value) {
+set_dynamic_friction_coefficient(PN_stdfloat value) {
 
 
-  _cfg.kDF = value;
+  _cfg.kDF = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -181,10 +181,10 @@ set_dynamic_friction_coefficient(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property kMT.
 //  Description: Getter for property kMT.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_pose_matching_coefficient() const {
 get_pose_matching_coefficient() const {
 
 
-  return _cfg.kMT;
+  return (PN_stdfloat)_cfg.kMT;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -193,9 +193,9 @@ get_pose_matching_coefficient() const {
 //  Description: Setter for property kMT.
 //  Description: Setter for property kMT.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_pose_matching_coefficient(float value) {
+set_pose_matching_coefficient(PN_stdfloat value) {
 
 
-  _cfg.kMT = value;
+  _cfg.kMT = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -203,10 +203,10 @@ set_pose_matching_coefficient(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property kCHR.
 //  Description: Getter for property kCHR.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_rigid_contacts_hardness() const {
 get_rigid_contacts_hardness() const {
 
 
-  return _cfg.kCHR;
+  return (PN_stdfloat)_cfg.kCHR;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -215,9 +215,9 @@ get_rigid_contacts_hardness() const {
 //  Description: Setter for property kCHR.
 //  Description: Setter for property kCHR.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_rigid_contacts_hardness(float value) {
+set_rigid_contacts_hardness(PN_stdfloat value) {
 
 
-  _cfg.kCHR = value;
+  _cfg.kCHR = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -225,10 +225,10 @@ set_rigid_contacts_hardness(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property kKHR.
 //  Description: Getter for property kKHR.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_kinetic_contacts_hardness() const {
 get_kinetic_contacts_hardness() const {
 
 
-  return _cfg.kKHR;
+  return (PN_stdfloat)_cfg.kKHR;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -237,9 +237,9 @@ get_kinetic_contacts_hardness() const {
 //  Description: Setter for property kKHR.
 //  Description: Setter for property kKHR.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_kinetic_contacts_hardness(float value) {
+set_kinetic_contacts_hardness(PN_stdfloat value) {
 
 
-  _cfg.kKHR = value;
+  _cfg.kKHR = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -247,10 +247,10 @@ set_kinetic_contacts_hardness(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property kSHR.
 //  Description: Getter for property kSHR.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_soft_contacts_hardness() const {
 get_soft_contacts_hardness() const {
 
 
-  return _cfg.kSHR;
+  return (PN_stdfloat)_cfg.kSHR;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -259,9 +259,9 @@ get_soft_contacts_hardness() const {
 //  Description: Setter for property kSHR.
 //  Description: Setter for property kSHR.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_soft_contacts_hardness(float value) {
+set_soft_contacts_hardness(PN_stdfloat value) {
 
 
-  _cfg.kSHR = value;
+  _cfg.kSHR = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -269,10 +269,10 @@ set_soft_contacts_hardness(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property kAHR.
 //  Description: Getter for property kAHR.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_anchors_hardness() const {
 get_anchors_hardness() const {
 
 
-  return _cfg.kAHR;
+  return (PN_stdfloat)_cfg.kAHR;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -281,9 +281,9 @@ get_anchors_hardness() const {
 //  Description: Setter for property kAHR.
 //  Description: Setter for property kAHR.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_anchors_hardness(float value) {
+set_anchors_hardness(PN_stdfloat value) {
 
 
-  _cfg.kAHR = value;
+  _cfg.kAHR = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -291,10 +291,10 @@ set_anchors_hardness(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property kSRHR_CL.
 //  Description: Getter for property kSRHR_CL.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_soft_vs_rigid_hardness() const {
 get_soft_vs_rigid_hardness() const {
 
 
-  return _cfg.kSRHR_CL;
+  return (PN_stdfloat)_cfg.kSRHR_CL;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -303,9 +303,9 @@ get_soft_vs_rigid_hardness() const {
 //  Description: Setter for property kSRHR_CL.
 //  Description: Setter for property kSRHR_CL.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_soft_vs_rigid_hardness(float value) {
+set_soft_vs_rigid_hardness(PN_stdfloat value) {
 
 
-  _cfg.kSRHR_CL = value;
+  _cfg.kSRHR_CL = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -313,10 +313,10 @@ set_soft_vs_rigid_hardness(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property kSKHR_CL.
 //  Description: Getter for property kSKHR_CL.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_soft_vs_kinetic_hardness() const {
 get_soft_vs_kinetic_hardness() const {
 
 
-  return _cfg.kSKHR_CL;
+  return (PN_stdfloat)_cfg.kSKHR_CL;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -325,9 +325,9 @@ get_soft_vs_kinetic_hardness() const {
 //  Description: Setter for property kSKHR_CL.
 //  Description: Setter for property kSKHR_CL.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_soft_vs_kinetic_hardness(float value) {
+set_soft_vs_kinetic_hardness(PN_stdfloat value) {
 
 
-  _cfg.kSKHR_CL = value;
+  _cfg.kSKHR_CL = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -335,10 +335,10 @@ set_soft_vs_kinetic_hardness(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property kSSHR_CL.
 //  Description: Getter for property kSSHR_CL.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_soft_vs_soft_hardness() const {
 get_soft_vs_soft_hardness() const {
 
 
-  return _cfg.kSSHR_CL;
+  return (PN_stdfloat)_cfg.kSSHR_CL;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -347,9 +347,9 @@ get_soft_vs_soft_hardness() const {
 //  Description: Setter for property kSSHR_CL.
 //  Description: Setter for property kSSHR_CL.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_soft_vs_soft_hardness(float value) {
+set_soft_vs_soft_hardness(PN_stdfloat value) {
 
 
-  _cfg.kSSHR_CL = value;
+  _cfg.kSSHR_CL = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -357,10 +357,10 @@ set_soft_vs_soft_hardness(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property kSR_SPLT_CL.
 //  Description: Getter for property kSR_SPLT_CL.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_soft_vs_rigid_impulse_split() const {
 get_soft_vs_rigid_impulse_split() const {
 
 
-  return _cfg.kSR_SPLT_CL;
+  return (PN_stdfloat)_cfg.kSR_SPLT_CL;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -369,9 +369,9 @@ get_soft_vs_rigid_impulse_split() const {
 //  Description: Setter for property kSR_SPLT_CL.
 //  Description: Setter for property kSR_SPLT_CL.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_soft_vs_rigid_impulse_split(float value) {
+set_soft_vs_rigid_impulse_split(PN_stdfloat value) {
 
 
-  _cfg.kSR_SPLT_CL = value;
+  _cfg.kSR_SPLT_CL = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -379,10 +379,10 @@ set_soft_vs_rigid_impulse_split(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property kSK_SPLT_CL.
 //  Description: Getter for property kSK_SPLT_CL.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_soft_vs_kinetic_impulse_split() const {
 get_soft_vs_kinetic_impulse_split() const {
 
 
-  return _cfg.kSK_SPLT_CL;
+  return (PN_stdfloat)_cfg.kSK_SPLT_CL;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -391,9 +391,9 @@ get_soft_vs_kinetic_impulse_split() const {
 //  Description: Setter for property kSK_SPLT_CL.
 //  Description: Setter for property kSK_SPLT_CL.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_soft_vs_kinetic_impulse_split(float value) {
+set_soft_vs_kinetic_impulse_split(PN_stdfloat value) {
 
 
-  _cfg.kSK_SPLT_CL = value;
+  _cfg.kSK_SPLT_CL = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -401,10 +401,10 @@ set_soft_vs_kinetic_impulse_split(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property kSS_SPLT_CL.
 //  Description: Getter for property kSS_SPLT_CL.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_soft_vs_soft_impulse_split() const {
 get_soft_vs_soft_impulse_split() const {
 
 
-  return _cfg.kSS_SPLT_CL;
+  return (PN_stdfloat)_cfg.kSS_SPLT_CL;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -413,9 +413,9 @@ get_soft_vs_soft_impulse_split() const {
 //  Description: Setter for property kSS_SPLT_CL.
 //  Description: Setter for property kSS_SPLT_CL.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_soft_vs_soft_impulse_split(float value) {
+set_soft_vs_soft_impulse_split(PN_stdfloat value) {
 
 
-  _cfg.kSS_SPLT_CL = value;
+  _cfg.kSS_SPLT_CL = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -423,10 +423,10 @@ set_soft_vs_soft_impulse_split(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property maxvolume.
 //  Description: Getter for property maxvolume.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_maxvolume() const {
 get_maxvolume() const {
 
 
-  return _cfg.maxvolume;
+  return (PN_stdfloat)_cfg.maxvolume;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -435,9 +435,9 @@ get_maxvolume() const {
 //  Description: Setter for property maxvolume.
 //  Description: Setter for property maxvolume.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_maxvolume(float value) {
+set_maxvolume(PN_stdfloat value) {
 
 
-  _cfg.maxvolume = value;
+  _cfg.maxvolume = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -445,10 +445,10 @@ set_maxvolume(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for property timescale.
 //  Description: Getter for property timescale.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyConfig::
+INLINE PN_stdfloat BulletSoftBodyConfig::
 get_timescale() const {
 get_timescale() const {
 
 
-  return _cfg.timescale;
+  return (PN_stdfloat)_cfg.timescale;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -457,9 +457,9 @@ get_timescale() const {
 //  Description: Setter for property timescale.
 //  Description: Setter for property timescale.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyConfig::
 INLINE void BulletSoftBodyConfig::
-set_timescale(float value) {
+set_timescale(PN_stdfloat value) {
 
 
-  _cfg.timescale = value;
+  _cfg.timescale = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////

+ 40 - 40
panda/src/bullet/bulletSoftBodyConfig.h

@@ -53,51 +53,51 @@ PUBLISHED:
   void set_aero_model(AeroModel value);
   void set_aero_model(AeroModel value);
   AeroModel get_aero_model() const;
   AeroModel get_aero_model() const;
 
 
-  INLINE void set_velocities_correction_factor(float value);
-  INLINE void set_damping_coefficient(float value);
-  INLINE void set_drag_coefficient(float value);
-  INLINE void set_lift_coefficient(float value);
-  INLINE void set_pressure_coefficient(float value);
-  INLINE void set_volume_conversation_coefficient(float value);
-  INLINE void set_dynamic_friction_coefficient(float value);
-  INLINE void set_pose_matching_coefficient(float value);
-  INLINE void set_rigid_contacts_hardness(float value);
-  INLINE void set_kinetic_contacts_hardness(float value);
-  INLINE void set_soft_contacts_hardness(float value);
-  INLINE void set_anchors_hardness(float value);
-  INLINE void set_soft_vs_rigid_hardness(float value);
-  INLINE void set_soft_vs_kinetic_hardness(float value);
-  INLINE void set_soft_vs_soft_hardness(float value);
-  INLINE void set_soft_vs_rigid_impulse_split(float value);
-  INLINE void set_soft_vs_kinetic_impulse_split(float value);
-  INLINE void set_soft_vs_soft_impulse_split(float value);
-  INLINE void set_maxvolume(float value);
-  INLINE void set_timescale(float value);
+  INLINE void set_velocities_correction_factor(PN_stdfloat value);
+  INLINE void set_damping_coefficient(PN_stdfloat value);
+  INLINE void set_drag_coefficient(PN_stdfloat value);
+  INLINE void set_lift_coefficient(PN_stdfloat value);
+  INLINE void set_pressure_coefficient(PN_stdfloat value);
+  INLINE void set_volume_conversation_coefficient(PN_stdfloat value);
+  INLINE void set_dynamic_friction_coefficient(PN_stdfloat value);
+  INLINE void set_pose_matching_coefficient(PN_stdfloat value);
+  INLINE void set_rigid_contacts_hardness(PN_stdfloat value);
+  INLINE void set_kinetic_contacts_hardness(PN_stdfloat value);
+  INLINE void set_soft_contacts_hardness(PN_stdfloat value);
+  INLINE void set_anchors_hardness(PN_stdfloat value);
+  INLINE void set_soft_vs_rigid_hardness(PN_stdfloat value);
+  INLINE void set_soft_vs_kinetic_hardness(PN_stdfloat value);
+  INLINE void set_soft_vs_soft_hardness(PN_stdfloat value);
+  INLINE void set_soft_vs_rigid_impulse_split(PN_stdfloat value);
+  INLINE void set_soft_vs_kinetic_impulse_split(PN_stdfloat value);
+  INLINE void set_soft_vs_soft_impulse_split(PN_stdfloat value);
+  INLINE void set_maxvolume(PN_stdfloat value);
+  INLINE void set_timescale(PN_stdfloat value);
   INLINE void set_positions_solver_iterations(int value);
   INLINE void set_positions_solver_iterations(int value);
   INLINE void set_velocities_solver_iterations(int value);
   INLINE void set_velocities_solver_iterations(int value);
   INLINE void set_drift_solver_iterations( int value);
   INLINE void set_drift_solver_iterations( int value);
   INLINE void set_cluster_solver_iterations(int value);
   INLINE void set_cluster_solver_iterations(int value);
 
 
-  INLINE float get_velocities_correction_factor() const;
-  INLINE float get_damping_coefficient() const;
-  INLINE float get_drag_coefficient() const;
-  INLINE float get_lift_coefficient() const;
-  INLINE float get_pressure_coefficient() const;
-  INLINE float get_volume_conversation_coefficient() const;
-  INLINE float get_dynamic_friction_coefficient() const;
-  INLINE float get_pose_matching_coefficient() const;
-  INLINE float get_rigid_contacts_hardness() const;
-  INLINE float get_kinetic_contacts_hardness() const;
-  INLINE float get_soft_contacts_hardness() const;
-  INLINE float get_anchors_hardness() const;
-  INLINE float get_soft_vs_rigid_hardness() const;
-  INLINE float get_soft_vs_kinetic_hardness() const;
-  INLINE float get_soft_vs_soft_hardness() const;
-  INLINE float get_soft_vs_rigid_impulse_split() const;
-  INLINE float get_soft_vs_kinetic_impulse_split() const;
-  INLINE float get_soft_vs_soft_impulse_split() const;
-  INLINE float get_maxvolume() const;
-  INLINE float get_timescale() const;
+  INLINE PN_stdfloat get_velocities_correction_factor() const;
+  INLINE PN_stdfloat get_damping_coefficient() const;
+  INLINE PN_stdfloat get_drag_coefficient() const;
+  INLINE PN_stdfloat get_lift_coefficient() const;
+  INLINE PN_stdfloat get_pressure_coefficient() const;
+  INLINE PN_stdfloat get_volume_conversation_coefficient() const;
+  INLINE PN_stdfloat get_dynamic_friction_coefficient() const;
+  INLINE PN_stdfloat get_pose_matching_coefficient() const;
+  INLINE PN_stdfloat get_rigid_contacts_hardness() const;
+  INLINE PN_stdfloat get_kinetic_contacts_hardness() const;
+  INLINE PN_stdfloat get_soft_contacts_hardness() const;
+  INLINE PN_stdfloat get_anchors_hardness() const;
+  INLINE PN_stdfloat get_soft_vs_rigid_hardness() const;
+  INLINE PN_stdfloat get_soft_vs_kinetic_hardness() const;
+  INLINE PN_stdfloat get_soft_vs_soft_hardness() const;
+  INLINE PN_stdfloat get_soft_vs_rigid_impulse_split() const;
+  INLINE PN_stdfloat get_soft_vs_kinetic_impulse_split() const;
+  INLINE PN_stdfloat get_soft_vs_soft_impulse_split() const;
+  INLINE PN_stdfloat get_maxvolume() const;
+  INLINE PN_stdfloat get_timescale() const;
   INLINE int get_positions_solver_iterations() const;
   INLINE int get_positions_solver_iterations() const;
   INLINE int get_velocities_solver_iterations() const;
   INLINE int get_velocities_solver_iterations() const;
   INLINE int get_drift_solver_iterations() const;
   INLINE int get_drift_solver_iterations() const;

+ 12 - 12
panda/src/bullet/bulletSoftBodyMaterial.I

@@ -52,10 +52,10 @@ get_material() const {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for the property m_kLST.
 //  Description: Getter for the property m_kLST.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyMaterial::
+INLINE PN_stdfloat BulletSoftBodyMaterial::
 getLinearStiffness() const {
 getLinearStiffness() const {
 
 
-  return _material.m_kLST;
+  return (PN_stdfloat)_material.m_kLST;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -64,9 +64,9 @@ getLinearStiffness() const {
 //  Description: Setter for the property m_kLST.
 //  Description: Setter for the property m_kLST.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyMaterial::
 INLINE void BulletSoftBodyMaterial::
-setLinearStiffness(float value) {
+setLinearStiffness(PN_stdfloat value) {
 
 
-  _material.m_kLST = value;
+  _material.m_kLST = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -74,10 +74,10 @@ setLinearStiffness(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for the property m_kAST.
 //  Description: Getter for the property m_kAST.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyMaterial::
+INLINE PN_stdfloat BulletSoftBodyMaterial::
 getAngularStiffness() const {
 getAngularStiffness() const {
 
 
-  return _material.m_kAST;
+  return (PN_stdfloat)_material.m_kAST;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -86,9 +86,9 @@ getAngularStiffness() const {
 //  Description: Setter for the property m_kAST.
 //  Description: Setter for the property m_kAST.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyMaterial::
 INLINE void BulletSoftBodyMaterial::
-setAngularStiffness(float value) {
+setAngularStiffness(PN_stdfloat value) {
 
 
-  _material.m_kAST = value;
+  _material.m_kAST = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -96,10 +96,10 @@ setAngularStiffness(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Getter for the property m_kVST.
 //  Description: Getter for the property m_kVST.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyMaterial::
+INLINE PN_stdfloat BulletSoftBodyMaterial::
 getVolumePreservation() const {
 getVolumePreservation() const {
 
 
-  return _material.m_kVST;
+  return (PN_stdfloat)_material.m_kVST;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -108,8 +108,8 @@ getVolumePreservation() const {
 //  Description: Setter for the property m_kVST.
 //  Description: Setter for the property m_kVST.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void BulletSoftBodyMaterial::
 INLINE void BulletSoftBodyMaterial::
-setVolumePreservation(float value) {
+setVolumePreservation(PN_stdfloat value) {
 
 
-  _material.m_kVST = value;
+  _material.m_kVST = (btScalar)value;
 }
 }
 
 

+ 6 - 6
panda/src/bullet/bulletSoftBodyMaterial.h

@@ -29,13 +29,13 @@ PUBLISHED:
   INLINE ~BulletSoftBodyMaterial();
   INLINE ~BulletSoftBodyMaterial();
   INLINE static BulletSoftBodyMaterial empty();
   INLINE static BulletSoftBodyMaterial empty();
 
 
-  INLINE void setLinearStiffness(float value);
-  INLINE void setAngularStiffness(float value);
-  INLINE void setVolumePreservation(float value);
+  INLINE void setLinearStiffness(PN_stdfloat value);
+  INLINE void setAngularStiffness(PN_stdfloat value);
+  INLINE void setVolumePreservation(PN_stdfloat value);
 
 
-  INLINE float getLinearStiffness() const;
-  INLINE float getAngularStiffness() const;
-  INLINE float getVolumePreservation() const;
+  INLINE PN_stdfloat getLinearStiffness() const;
+  INLINE PN_stdfloat getAngularStiffness() const;
+  INLINE PN_stdfloat getVolumePreservation() const;
 
 
 public:
 public:
   BulletSoftBodyMaterial(btSoftBody::Material &material);
   BulletSoftBodyMaterial(btSoftBody::Material &material);

+ 11 - 11
panda/src/bullet/bulletSoftBodyNode.I

@@ -53,10 +53,10 @@ empty() {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE LPoint3f BulletSoftBodyNodeElement::
+INLINE LPoint3 BulletSoftBodyNodeElement::
 get_pos() const {
 get_pos() const {
 
 
-  return btVector3_to_LPoint3f(_node.m_x);
+  return btVector3_to_LPoint3(_node.m_x);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -64,10 +64,10 @@ get_pos() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE LVector3f BulletSoftBodyNodeElement::
+INLINE LVector3 BulletSoftBodyNodeElement::
 get_normal() const {
 get_normal() const {
 
 
-  return btVector3_to_LVector3f(_node.m_n);
+  return btVector3_to_LVector3(_node.m_n);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -75,10 +75,10 @@ get_normal() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE LVector3f BulletSoftBodyNodeElement::
+INLINE LVector3 BulletSoftBodyNodeElement::
 get_velocity() const {
 get_velocity() const {
 
 
-  return btVector3_to_LVector3f(_node.m_v);
+  return btVector3_to_LVector3(_node.m_v);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -86,10 +86,10 @@ get_velocity() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyNodeElement::
+INLINE PN_stdfloat BulletSoftBodyNodeElement::
 get_inv_mass() const {
 get_inv_mass() const {
 
 
-  return _node.m_im;
+  return (PN_stdfloat)_node.m_im;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -97,10 +97,10 @@ get_inv_mass() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSoftBodyNodeElement::
+INLINE PN_stdfloat BulletSoftBodyNodeElement::
 get_area() const {
 get_area() const {
 
 
-  return _node.m_area;
+  return (PN_stdfloat)_node.m_area;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -111,6 +111,6 @@ get_area() const {
 INLINE int BulletSoftBodyNodeElement::
 INLINE int BulletSoftBodyNodeElement::
 is_attached() const {
 is_attached() const {
 
 
-  return _node.m_battach;
+  return (PN_stdfloat)_node.m_battach;
 }
 }
 
 

+ 62 - 62
panda/src/bullet/bulletSoftBodyNode.cxx

@@ -189,8 +189,8 @@ transform_changed() {
   NodePath np = NodePath::any_path((PandaNode *)this);
   NodePath np = NodePath::any_path((PandaNode *)this);
   CPT(TransformState) ts = np.get_net_transform();
   CPT(TransformState) ts = np.get_net_transform();
 
 
-  LMatrix4f m_sync = _sync->get_mat();
-  LMatrix4f m_ts = ts->get_mat();
+  LMatrix4 m_sync = _sync->get_mat();
+  LMatrix4 m_ts = ts->get_mat();
 
 
   if (!m_sync.almost_equal(m_ts)) {
   if (!m_sync.almost_equal(m_ts)) {
     _sync = ts;
     _sync = ts;
@@ -201,8 +201,8 @@ transform_changed() {
     _soft->transform(trans);
     _soft->transform(trans);
 
 
     if (ts->has_scale()) {
     if (ts->has_scale()) {
-      LVecBase3f scale = ts->get_scale();
-      if (!scale.almost_equal(LVecBase3f(1.0f, 1.0f, 1.0f))) {
+      LVecBase3 scale = ts->get_scale();
+      if (!scale.almost_equal(LVecBase3(1.0f, 1.0f, 1.0f))) {
         for (int i=0; i<get_num_shapes(); i++) {
         for (int i=0; i<get_num_shapes(); i++) {
           PT(BulletShape) shape = _shapes[i];
           PT(BulletShape) shape = _shapes[i];
           shape->set_local_scale(scale);
           shape->set_local_scale(scale);
@@ -250,8 +250,8 @@ sync_b2p() {
 
 
       if (flips.get_data1i() > 0) n *= -1;
       if (flips.get_data1i() > 0) n *= -1;
 
 
-      vertices.set_data3f(v.getX(), v.getY(), v.getZ());
-      normals.set_data3f(n.getX(), n.getY(), n.getZ());
+      vertices.set_data3((PN_stdfloat)v.getX(), (PN_stdfloat)v.getY(), (PN_stdfloat)v.getZ());
+      normals.set_data3((PN_stdfloat)n.getX(), (PN_stdfloat)n.getY(), (PN_stdfloat)n.getZ());
     }
     }
   }
   }
 
 
@@ -260,7 +260,7 @@ sync_b2p() {
 
 
     for (int i=0; i < nodes.size(); i++) {
     for (int i=0; i < nodes.size(); i++) {
       btVector3 pos = nodes[i].m_x;
       btVector3 pos = nodes[i].m_x;
-      _curve->set_vertex(i, btVector3_to_LPoint3f(pos));
+      _curve->set_vertex(i, btVector3_to_LPoint3(pos));
     }
     }
   }
   }
 
 
@@ -274,7 +274,7 @@ sync_b2p() {
     for (int u=0; u < num_u; u++) {
     for (int u=0; u < num_u; u++) {
       for (int v=0; v < num_v; v++) {
       for (int v=0; v < num_v; v++) {
         btVector3 pos = nodes[u * num_u + v].m_x;
         btVector3 pos = nodes[u * num_u + v].m_x;
-        _surface->set_vertex(u, v, btVector3_to_LPoint3f(pos));
+        _surface->set_vertex(u, v, btVector3_to_LPoint3(pos));
       }
       }
     }
     }
   }
   }
@@ -283,10 +283,10 @@ sync_b2p() {
   // set_bounds does not store the pointer - it makes a copy using
   // set_bounds does not store the pointer - it makes a copy using
   // volume->make_copy().
   // volume->make_copy().
   BoundingBox bb = this->get_aabb();
   BoundingBox bb = this->get_aabb();
-  LVecBase3f pos = bb.get_approx_center();
+  LVecBase3 pos = bb.get_approx_center();
 
 
   NodePath np = NodePath::any_path((PandaNode *)this);
   NodePath np = NodePath::any_path((PandaNode *)this);
-  LVecBase3f scale = np.get_net_transform()->get_scale();
+  LVecBase3 scale = np.get_net_transform()->get_scale();
 
 
   CPT(TransformState) ts = TransformState::make_pos(pos);
   CPT(TransformState) ts = TransformState::make_pos(pos);
   ts = ts->set_scale(scale);
   ts = ts->set_scale(scale);
@@ -309,10 +309,10 @@ sync_b2p() {
 //               if local=false, and in local space if local=true.
 //               if local=false, and in local space if local=true.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 int BulletSoftBodyNode::
 int BulletSoftBodyNode::
-get_closest_node_index(LVecBase3f point, bool local) {
+get_closest_node_index(LVecBase3 point, bool local) {
 
 
   btScalar max_dist_sqr = 1e30;
   btScalar max_dist_sqr = 1e30;
-  btVector3 point_x = LVecBase3f_to_btVector3(point);
+  btVector3 point_x = LVecBase3_to_btVector3(point);
 
 
   btTransform trans = btTransform::getIdentity();
   btTransform trans = btTransform::getIdentity();
   if (local == true) {
   if (local == true) {
@@ -369,7 +369,7 @@ link_geom(Geom *geom) {
   GeomVertexRewriter indices(vdata, BulletHelper::get_sb_index());
   GeomVertexRewriter indices(vdata, BulletHelper::get_sb_index());
 
 
   while (!vertices.is_at_end()) {
   while (!vertices.is_at_end()) {
-    LVecBase3f point = vertices.get_data3f();
+    LVecBase3 point = vertices.get_data3();
     int node_idx = get_closest_node_index(point, true);
     int node_idx = get_closest_node_index(point, true);
     indices.set_data1i(node_idx);
     indices.set_data1i(node_idx);
   }
   }
@@ -448,8 +448,8 @@ get_aabb() const {
   _soft->getAabb(pMin, pMax);
   _soft->getAabb(pMin, pMax);
 
 
   return BoundingBox(
   return BoundingBox(
-    btVector3_to_LPoint3f(pMin),
-    btVector3_to_LPoint3f(pMax)
+    btVector3_to_LPoint3(pMin),
+    btVector3_to_LPoint3(pMax)
     );
     );
 }
 }
 
 
@@ -459,7 +459,7 @@ get_aabb() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSoftBodyNode::
 void BulletSoftBodyNode::
-set_volume_mass(float mass) {
+set_volume_mass(PN_stdfloat mass) {
 
 
   _soft->setVolumeMass(mass);
   _soft->setVolumeMass(mass);
 }
 }
@@ -470,7 +470,7 @@ set_volume_mass(float mass) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSoftBodyNode::
 void BulletSoftBodyNode::
-set_total_mass(float mass, bool fromfaces) {
+set_total_mass(PN_stdfloat mass, bool fromfaces) {
 
 
   _soft->setTotalMass(mass, fromfaces);
   _soft->setTotalMass(mass, fromfaces);
 }
 }
@@ -481,7 +481,7 @@ set_total_mass(float mass, bool fromfaces) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSoftBodyNode::
 void BulletSoftBodyNode::
-set_volume_density(float density) {
+set_volume_density(PN_stdfloat density) {
 
 
   _soft->setVolumeDensity(density);
   _soft->setVolumeDensity(density);
 }
 }
@@ -492,7 +492,7 @@ set_volume_density(float density) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSoftBodyNode::
 void BulletSoftBodyNode::
-set_total_density(float density) {
+set_total_density(PN_stdfloat density) {
 
 
   _soft->setTotalDensity(density);
   _soft->setTotalDensity(density);
 }
 }
@@ -503,7 +503,7 @@ set_total_density(float density) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSoftBodyNode::
 void BulletSoftBodyNode::
-set_mass(int node, float mass) {
+set_mass(int node, PN_stdfloat mass) {
 
 
   _soft->setMass(node, mass);
   _soft->setMass(node, mass);
 }
 }
@@ -513,7 +513,7 @@ set_mass(int node, float mass) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletSoftBodyNode::
+PN_stdfloat BulletSoftBodyNode::
 get_mass(int node) const {
 get_mass(int node) const {
 
 
   return _soft->getMass(node);
   return _soft->getMass(node);
@@ -524,7 +524,7 @@ get_mass(int node) const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletSoftBodyNode::
+PN_stdfloat BulletSoftBodyNode::
 get_total_mass() const {
 get_total_mass() const {
 
 
   return _soft->getTotalMass();
   return _soft->getTotalMass();
@@ -535,7 +535,7 @@ get_total_mass() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletSoftBodyNode::
+PN_stdfloat BulletSoftBodyNode::
 get_volume() const {
 get_volume() const {
 
 
   return _soft->getVolume();
   return _soft->getVolume();
@@ -547,10 +547,10 @@ get_volume() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSoftBodyNode::
 void BulletSoftBodyNode::
-add_force(const LVector3f &force) {
+add_force(const LVector3 &force) {
 
 
   nassertv(!force.is_nan());
   nassertv(!force.is_nan());
-  _soft->addForce(LVecBase3f_to_btVector3(force));
+  _soft->addForce(LVecBase3_to_btVector3(force));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -559,10 +559,10 @@ add_force(const LVector3f &force) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSoftBodyNode::
 void BulletSoftBodyNode::
-add_force(const LVector3f &force, int node) {
+add_force(const LVector3 &force, int node) {
 
 
   nassertv(!force.is_nan());
   nassertv(!force.is_nan());
-  _soft->addForce(LVecBase3f_to_btVector3(force), node);
+  _soft->addForce(LVecBase3_to_btVector3(force), node);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -571,10 +571,10 @@ add_force(const LVector3f &force, int node) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSoftBodyNode::
 void BulletSoftBodyNode::
-set_velocity(const LVector3f &velocity) {
+set_velocity(const LVector3 &velocity) {
 
 
   nassertv(!velocity.is_nan());
   nassertv(!velocity.is_nan());
-  _soft->setVelocity(LVecBase3f_to_btVector3(velocity));
+  _soft->setVelocity(LVecBase3_to_btVector3(velocity));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -583,10 +583,10 @@ set_velocity(const LVector3f &velocity) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSoftBodyNode::
 void BulletSoftBodyNode::
-add_velocity(const LVector3f &velocity) {
+add_velocity(const LVector3 &velocity) {
 
 
   nassertv(!velocity.is_nan());
   nassertv(!velocity.is_nan());
-  _soft->addVelocity(LVecBase3f_to_btVector3(velocity));
+  _soft->addVelocity(LVecBase3_to_btVector3(velocity));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -595,10 +595,10 @@ add_velocity(const LVector3f &velocity) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSoftBodyNode::
 void BulletSoftBodyNode::
-add_velocity(const LVector3f &velocity, int node) {
+add_velocity(const LVector3 &velocity, int node) {
 
 
   nassertv(!velocity.is_nan());
   nassertv(!velocity.is_nan());
-  _soft->addVelocity(LVecBase3f_to_btVector3(velocity), node);
+  _soft->addVelocity(LVecBase3_to_btVector3(velocity), node);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -650,10 +650,10 @@ get_num_clusters() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVecBase3f BulletSoftBodyNode::
+LVecBase3 BulletSoftBodyNode::
 cluster_com(int cluster) const {
 cluster_com(int cluster) const {
 
 
-  return btVector3_to_LVecBase3f(_soft->clusterCom(cluster));
+  return btVector3_to_LVecBase3(_soft->clusterCom(cluster));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -690,7 +690,7 @@ append_anchor(int node, BulletRigidBodyNode *body, bool disable) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSoftBodyNode::
 void BulletSoftBodyNode::
-append_anchor(int node, BulletRigidBodyNode *body, const LVector3f &pivot, bool disable) {
+append_anchor(int node, BulletRigidBodyNode *body, const LVector3 &pivot, bool disable) {
 
 
   nassertv(node < _soft->m_nodes.size())
   nassertv(node < _soft->m_nodes.size())
   nassertv(body);
   nassertv(body);
@@ -699,7 +699,7 @@ append_anchor(int node, BulletRigidBodyNode *body, const LVector3f &pivot, bool
   body->sync_p2b();
   body->sync_p2b();
 
 
   btRigidBody *ptr =(btRigidBody *)body->get_object();
   btRigidBody *ptr =(btRigidBody *)body->get_object();
-  _soft->appendAnchor(node, ptr, LVecBase3f_to_btVector3(pivot), disable);
+  _soft->appendAnchor(node, ptr, LVecBase3_to_btVector3(pivot), disable);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -721,11 +721,11 @@ BulletSoftBodyNodeElement(btSoftBody::Node &node) : _node(node) {
 //               is found -1 is returned.
 //               is found -1 is returned.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 int BulletSoftBodyNode::
 int BulletSoftBodyNode::
-get_point_index(LVecBase3f p, PTA_LVecBase3f points) {
+get_point_index(LVecBase3 p, PTA_LVecBase3 points) {
 
 
-  float eps = 1.0e-6f; // TODO make this a config option
+  PN_stdfloat eps = 1.0e-6f; // TODO make this a config option
 
 
-  for (PTA_LVecBase3f::size_type i=0; i<points.size(); i++) {
+  for (PTA_LVecBase3::size_type i=0; i<points.size(); i++) {
     if (points[i].almost_equal(p, eps)) {
     if (points[i].almost_equal(p, eps)) {
       return i; // Found
       return i; // Found
     }
     }
@@ -764,12 +764,12 @@ next_line(const char* buffer) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 PT(BulletSoftBodyNode) BulletSoftBodyNode::
 PT(BulletSoftBodyNode) BulletSoftBodyNode::
-make_rope(BulletSoftBodyWorldInfo &info, const LPoint3f &from, const LPoint3f &to, int res, int fixeds) {
+make_rope(BulletSoftBodyWorldInfo &info, const LPoint3 &from, const LPoint3 &to, int res, int fixeds) {
 
 
   btSoftBody *body = btSoftBodyHelpers::CreateRope(
   btSoftBody *body = btSoftBodyHelpers::CreateRope(
     info.get_info(),
     info.get_info(),
-    LVecBase3f_to_btVector3(from),
-    LVecBase3f_to_btVector3(to),
+    LVecBase3_to_btVector3(from),
+    LVecBase3_to_btVector3(to),
     res,
     res,
     fixeds);
     fixeds);
 
 
@@ -784,14 +784,14 @@ make_rope(BulletSoftBodyWorldInfo &info, const LPoint3f &from, const LPoint3f &t
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 PT(BulletSoftBodyNode) BulletSoftBodyNode::
 PT(BulletSoftBodyNode) BulletSoftBodyNode::
-make_patch(BulletSoftBodyWorldInfo &info, const LPoint3f &corner00, const LPoint3f &corner10, const LPoint3f &corner01, const LPoint3f &corner11, int resx, int resy, int fixeds, bool gendiags) {
+make_patch(BulletSoftBodyWorldInfo &info, const LPoint3 &corner00, const LPoint3 &corner10, const LPoint3 &corner01, const LPoint3 &corner11, int resx, int resy, int fixeds, bool gendiags) {
 
 
   btSoftBody *body = btSoftBodyHelpers::CreatePatch(
   btSoftBody *body = btSoftBodyHelpers::CreatePatch(
     info.get_info(),
     info.get_info(),
-    LVecBase3f_to_btVector3(corner00),
-    LVecBase3f_to_btVector3(corner10),
-    LVecBase3f_to_btVector3(corner01),
-    LVecBase3f_to_btVector3(corner11),
+    LVecBase3_to_btVector3(corner00),
+    LVecBase3_to_btVector3(corner10),
+    LVecBase3_to_btVector3(corner01),
+    LVecBase3_to_btVector3(corner11),
     resx,
     resx,
     resy,
     resy,
     fixeds,
     fixeds,
@@ -808,12 +808,12 @@ make_patch(BulletSoftBodyWorldInfo &info, const LPoint3f &corner00, const LPoint
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 PT(BulletSoftBodyNode) BulletSoftBodyNode::
 PT(BulletSoftBodyNode) BulletSoftBodyNode::
-make_ellipsoid(BulletSoftBodyWorldInfo &info, const LPoint3f &center, const LVecBase3f &radius, int res) {
+make_ellipsoid(BulletSoftBodyWorldInfo &info, const LPoint3 &center, const LVecBase3 &radius, int res) {
 
 
   btSoftBody *body = btSoftBodyHelpers::CreateEllipsoid(
   btSoftBody *body = btSoftBodyHelpers::CreateEllipsoid(
     info.get_info(),
     info.get_info(),
-    LVecBase3f_to_btVector3(center),
-    LVecBase3f_to_btVector3(radius),
+    LVecBase3_to_btVector3(center),
+    LVecBase3_to_btVector3(radius),
     res);
     res);
 
 
   PT(BulletSoftBodyNode) node = new BulletSoftBodyNode(body);
   PT(BulletSoftBodyNode) node = new BulletSoftBodyNode(body);
@@ -827,16 +827,16 @@ make_ellipsoid(BulletSoftBodyWorldInfo &info, const LPoint3f &center, const LVec
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 PT(BulletSoftBodyNode) BulletSoftBodyNode::
 PT(BulletSoftBodyNode) BulletSoftBodyNode::
-make_tri_mesh(BulletSoftBodyWorldInfo &info, PTA_LVecBase3f points, PTA_int indices, bool randomizeConstraints) {
+make_tri_mesh(BulletSoftBodyWorldInfo &info, PTA_LVecBase3 points, PTA_int indices, bool randomizeConstraints) {
 
 
   // Eliminate duplicate vertices
   // Eliminate duplicate vertices
-  PTA_LVecBase3f mapped_points;
+  PTA_LVecBase3 mapped_points;
   PTA_int mapped_indices;
   PTA_int mapped_indices;
 
 
   pmap<int, int> mapping;
   pmap<int, int> mapping;
 
 
-  for (PTA_LVecBase3f::size_type i=0; i<points.size(); i++) {
-    LVecBase3f p = points[i];
+  for (PTA_LVecBase3::size_type i=0; i<points.size(); i++) {
+    LVecBase3 p = points[i];
     int j = get_point_index(p, mapped_points);
     int j = get_point_index(p, mapped_points);
     if (j < 0) {
     if (j < 0) {
       mapping[i] = mapped_points.size();
       mapping[i] = mapped_points.size();
@@ -899,7 +899,7 @@ PT(BulletSoftBodyNode) BulletSoftBodyNode::
 make_tri_mesh(BulletSoftBodyWorldInfo &info, const Geom *geom, bool randomizeConstraints) {
 make_tri_mesh(BulletSoftBodyWorldInfo &info, const Geom *geom, bool randomizeConstraints) {
 
 
   // Read vertex data
   // Read vertex data
-  PTA_LVecBase3f points;
+  PTA_LVecBase3 points;
   PTA_int indices;
   PTA_int indices;
 
 
   CPT(GeomVertexData) vdata = geom->get_vertex_data();
   CPT(GeomVertexData) vdata = geom->get_vertex_data();
@@ -909,7 +909,7 @@ make_tri_mesh(BulletSoftBodyWorldInfo &info, const Geom *geom, bool randomizeCon
   GeomVertexReader vreader(vdata, InternalName::get_vertex());
   GeomVertexReader vreader(vdata, InternalName::get_vertex());
 
 
   while (!vreader.is_at_end()) {
   while (!vreader.is_at_end()) {
-    LVecBase3f v = vreader.get_data3f();
+    LVecBase3 v = vreader.get_data3();
     points.push_back(v);
     points.push_back(v);
   }
   }
 
 
@@ -940,14 +940,14 @@ make_tri_mesh(BulletSoftBodyWorldInfo &info, const Geom *geom, bool randomizeCon
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 PT(BulletSoftBodyNode) BulletSoftBodyNode::
 PT(BulletSoftBodyNode) BulletSoftBodyNode::
-make_tet_mesh(BulletSoftBodyWorldInfo &info, PTA_LVecBase3f points, PTA_int indices, bool tetralinks) {
+make_tet_mesh(BulletSoftBodyWorldInfo &info, PTA_LVecBase3 points, PTA_int indices, bool tetralinks) {
 
 
   // Points
   // Points
   btAlignedObjectArray<btVector3> pos;
   btAlignedObjectArray<btVector3> pos;
   pos.resize(points.size());
   pos.resize(points.size());
-  for (PTA_LVecBase3f::size_type i=0; i<points.size(); i++) {
-    LVecBase3f point = points[i];
-    pos[i] = LVecBase3f_to_btVector3(point);
+  for (PTA_LVecBase3::size_type i=0; i<points.size(); i++) {
+    LVecBase3 point = points[i];
+    pos[i] = LVecBase3_to_btVector3(point);
   }
   }
 
 
   // Body
   // Body
@@ -1005,7 +1005,7 @@ make_tet_mesh(BulletSoftBodyWorldInfo &info, const char *ele, const char *face,
 
 
   for (int i=0; i<pos.size(); ++i) {
   for (int i=0; i<pos.size(); ++i) {
     int index = 0;
     int index = 0;
-    float x, y, z;
+    PN_stdfloat x, y, z;
 
 
     sscanf(node, "%d %f %f %f", &index, &x, &y, &z);
     sscanf(node, "%d %f %f %f", &index, &x, &y, &z);
     node += next_line(node);
     node += next_line(node);

+ 32 - 32
panda/src/bullet/bulletSoftBodyNode.h

@@ -44,11 +44,11 @@ PUBLISHED:
   INLINE ~BulletSoftBodyNodeElement();
   INLINE ~BulletSoftBodyNodeElement();
   INLINE static BulletSoftBodyNodeElement empty();
   INLINE static BulletSoftBodyNodeElement empty();
 
 
-  INLINE LPoint3f get_pos() const;
-  INLINE LVector3f get_velocity() const;
-  INLINE LVector3f get_normal() const;
-  INLINE float get_inv_mass() const;
-  INLINE float get_area() const;
+  INLINE LPoint3 get_pos() const;
+  INLINE LVector3 get_velocity() const;
+  INLINE LVector3 get_normal() const;
+  INLINE PN_stdfloat get_inv_mass() const;
+  INLINE PN_stdfloat get_area() const;
   INLINE int is_attached() const;
   INLINE int is_attached() const;
 
 
 public:
 public:
@@ -77,23 +77,23 @@ PUBLISHED:
   void randomize_constraints(); 
   void randomize_constraints(); 
 
 
   // Mass, volume, density
   // Mass, volume, density
-  void set_volume_mass(float mass);
-  void set_volume_density(float density);
-  void set_total_mass(float mass, bool fromfaces=false);
-  void set_total_density(float density);
-  void set_mass(int node, float mass);
+  void set_volume_mass(PN_stdfloat mass);
+  void set_volume_density(PN_stdfloat density);
+  void set_total_mass(PN_stdfloat mass, bool fromfaces=false);
+  void set_total_density(PN_stdfloat density);
+  void set_mass(int node, PN_stdfloat mass);
 
 
-  float get_mass(int node) const;
-  float get_total_mass() const;
-  float get_volume() const;
+  PN_stdfloat get_mass(int node) const;
+  PN_stdfloat get_total_mass() const;
+  PN_stdfloat get_volume() const;
 
 
   // Force
   // Force
-  void add_force(const LVector3f &force);
-  void add_force(const LVector3f &force, int node);
+  void add_force(const LVector3 &force);
+  void add_force(const LVector3 &force, int node);
 
 
-  void set_velocity(const LVector3f &velocity);
-  void add_velocity(const LVector3f &velocity);
-  void add_velocity(const LVector3f &velocity, int node);
+  void set_velocity(const LVector3 &velocity);
+  void add_velocity(const LVector3 &velocity);
+  void add_velocity(const LVector3 &velocity, int node);
 
 
   void set_pose(bool bvolume, bool bframe);
   void set_pose(bool bvolume, bool bframe);
 
 
@@ -104,7 +104,7 @@ PUBLISHED:
   void release_cluster(int index);
   void release_cluster(int index);
   void release_clusters();
   void release_clusters();
   int get_num_clusters() const;
   int get_num_clusters() const;
-  LVecBase3f cluster_com(int cluster) const;
+  LVecBase3 cluster_com(int cluster) const;
 
 
   // Rendering
   // Rendering
   void link_geom(Geom *geom);
   void link_geom(Geom *geom);
@@ -120,7 +120,7 @@ PUBLISHED:
   void append_anchor(int node, BulletRigidBodyNode *body, 
   void append_anchor(int node, BulletRigidBodyNode *body, 
       bool disable=false);
       bool disable=false);
   void append_anchor(int node, BulletRigidBodyNode *body, 
   void append_anchor(int node, BulletRigidBodyNode *body, 
-      const LVector3f &pivot,
+      const LVector3 &pivot,
       bool disable=false);
       bool disable=false);
 
 
   // Materials
   // Materials
@@ -135,22 +135,22 @@ PUBLISHED:
   BulletSoftBodyNodeElement get_node(int idx) const;
   BulletSoftBodyNodeElement get_node(int idx) const;
   MAKE_SEQ(get_nodes, get_num_nodes, get_node);
   MAKE_SEQ(get_nodes, get_num_nodes, get_node);
 
 
-  int get_closest_node_index(LVecBase3f point, bool local);
+  int get_closest_node_index(LVecBase3 point, bool local);
 
 
   // Factory
   // Factory
   static PT(BulletSoftBodyNode) make_rope(
   static PT(BulletSoftBodyNode) make_rope(
       BulletSoftBodyWorldInfo &info,
       BulletSoftBodyWorldInfo &info,
-      const LPoint3f &from,
-      const LPoint3f &to,
+      const LPoint3 &from,
+      const LPoint3 &to,
       int res,
       int res,
       int fixeds);
       int fixeds);
 
 
   static PT(BulletSoftBodyNode) make_patch(
   static PT(BulletSoftBodyNode) make_patch(
       BulletSoftBodyWorldInfo &info,
       BulletSoftBodyWorldInfo &info,
-      const LPoint3f &corner00,
-      const LPoint3f &corner10,
-      const LPoint3f &corner01,
-      const LPoint3f &corner11,
+      const LPoint3 &corner00,
+      const LPoint3 &corner10,
+      const LPoint3 &corner01,
+      const LPoint3 &corner11,
       int resx,
       int resx,
       int resy,
       int resy,
       int fixeds,
       int fixeds,
@@ -158,8 +158,8 @@ PUBLISHED:
 
 
   static PT(BulletSoftBodyNode) make_ellipsoid(
   static PT(BulletSoftBodyNode) make_ellipsoid(
       BulletSoftBodyWorldInfo &info,
       BulletSoftBodyWorldInfo &info,
-      const LPoint3f &center,
-      const LVecBase3f &radius,
+      const LPoint3 &center,
+      const LVecBase3 &radius,
       int res);
       int res);
 
 
   static PT(BulletSoftBodyNode) make_tri_mesh(
   static PT(BulletSoftBodyNode) make_tri_mesh(
@@ -169,13 +169,13 @@ PUBLISHED:
 
 
   static PT(BulletSoftBodyNode) make_tri_mesh(
   static PT(BulletSoftBodyNode) make_tri_mesh(
       BulletSoftBodyWorldInfo &info,
       BulletSoftBodyWorldInfo &info,
-      PTA_LVecBase3f points, 
+      PTA_LVecBase3 points, 
       PTA_int indices,
       PTA_int indices,
       bool randomizeConstraints=true);
       bool randomizeConstraints=true);
 
 
   static PT(BulletSoftBodyNode) make_tet_mesh(
   static PT(BulletSoftBodyNode) make_tet_mesh(
       BulletSoftBodyWorldInfo &info,
       BulletSoftBodyWorldInfo &info,
-      PTA_LVecBase3f points,
+      PTA_LVecBase3 points,
       PTA_int indices,
       PTA_int indices,
       bool tetralinks=true);
       bool tetralinks=true);
 
 
@@ -204,7 +204,7 @@ private:
   PT(NurbsCurveEvaluator) _curve;
   PT(NurbsCurveEvaluator) _curve;
   PT(NurbsSurfaceEvaluator) _surface;
   PT(NurbsSurfaceEvaluator) _surface;
 
 
-  static int get_point_index(LVecBase3f p, PTA_LVecBase3f points);
+  static int get_point_index(LVecBase3 p, PTA_LVecBase3 points);
   static int next_line(const char *buffer);
   static int next_line(const char *buffer);
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////

+ 20 - 20
panda/src/bullet/bulletSoftBodyWorldInfo.cxx

@@ -41,9 +41,9 @@ garbage_collect(int lifetime) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSoftBodyWorldInfo::
 void BulletSoftBodyWorldInfo::
-set_air_density(float density) {
+set_air_density(PN_stdfloat density) {
 
 
-  _info.air_density = density;
+  _info.air_density = (btScalar)density;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -52,9 +52,9 @@ set_air_density(float density) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSoftBodyWorldInfo::
 void BulletSoftBodyWorldInfo::
-set_water_density(float density) {
+set_water_density(PN_stdfloat density) {
 
 
-  _info.water_density = density;
+  _info.water_density = (btScalar)density;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -63,9 +63,9 @@ set_water_density(float density) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSoftBodyWorldInfo::
 void BulletSoftBodyWorldInfo::
-set_water_offset(float offset) {
+set_water_offset(PN_stdfloat offset) {
 
 
-  _info.water_offset = offset;
+  _info.water_offset = (btScalar)offset;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -74,10 +74,10 @@ set_water_offset(float offset) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSoftBodyWorldInfo::
 void BulletSoftBodyWorldInfo::
-set_water_normal(const LVector3f &normal) {
+set_water_normal(const LVector3 &normal) {
 
 
   nassertv(!normal.is_nan());
   nassertv(!normal.is_nan());
-  _info.water_normal = LVecBase3f_to_btVector3(normal);
+  _info.water_normal = LVecBase3_to_btVector3(normal);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -86,10 +86,10 @@ set_water_normal(const LVector3f &normal) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSoftBodyWorldInfo::
 void BulletSoftBodyWorldInfo::
-set_gravity(const LVector3f &gravity) {
+set_gravity(const LVector3 &gravity) {
 
 
   nassertv(!gravity.is_nan());
   nassertv(!gravity.is_nan());
-  _info.m_gravity = LVecBase3f_to_btVector3(gravity);
+  _info.m_gravity = LVecBase3_to_btVector3(gravity);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -97,10 +97,10 @@ set_gravity(const LVector3f &gravity) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletSoftBodyWorldInfo::
+PN_stdfloat BulletSoftBodyWorldInfo::
 get_air_density() const {
 get_air_density() const {
 
 
-  return _info.air_density;
+  return (PN_stdfloat)_info.air_density;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -108,10 +108,10 @@ get_air_density() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletSoftBodyWorldInfo::
+PN_stdfloat BulletSoftBodyWorldInfo::
 get_water_density() const {
 get_water_density() const {
 
 
-  return _info.water_density;
+  return (PN_stdfloat)_info.water_density;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -119,10 +119,10 @@ get_water_density() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletSoftBodyWorldInfo::
+PN_stdfloat BulletSoftBodyWorldInfo::
 get_water_offset() const {
 get_water_offset() const {
 
 
-  return _info.water_offset;
+  return (PN_stdfloat)_info.water_offset;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -130,10 +130,10 @@ get_water_offset() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVector3f BulletSoftBodyWorldInfo::
+LVector3 BulletSoftBodyWorldInfo::
 get_water_normal() const {
 get_water_normal() const {
 
 
-  return btVector3_to_LVector3f(_info.water_normal);
+  return btVector3_to_LVector3(_info.water_normal);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -141,9 +141,9 @@ get_water_normal() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVector3f BulletSoftBodyWorldInfo::
+LVector3 BulletSoftBodyWorldInfo::
 get_gravity() const {
 get_gravity() const {
 
 
-  return btVector3_to_LVector3f(_info.m_gravity);
+  return btVector3_to_LVector3(_info.m_gravity);
 }
 }
 
 

+ 11 - 11
panda/src/bullet/bulletSoftBodyWorldInfo.h

@@ -31,17 +31,17 @@ class EXPCL_PANDABULLET BulletSoftBodyWorldInfo {
 PUBLISHED:
 PUBLISHED:
   INLINE ~BulletSoftBodyWorldInfo();
   INLINE ~BulletSoftBodyWorldInfo();
 
 
-  void set_air_density(float density);
-  void set_water_density(float density);
-  void set_water_offset(float offset);
-  void set_water_normal(const LVector3f &normal);
-  void set_gravity(const LVector3f &gravity);
-
-  float get_air_density() const;
-  float get_water_density() const;
-  float get_water_offset() const;
-  LVector3f get_water_normal() const;
-  LVector3f get_gravity() const;
+  void set_air_density(PN_stdfloat density);
+  void set_water_density(PN_stdfloat density);
+  void set_water_offset(PN_stdfloat offset);
+  void set_water_normal(const LVector3 &normal);
+  void set_gravity(const LVector3 &gravity);
+
+  PN_stdfloat get_air_density() const;
+  PN_stdfloat get_water_density() const;
+  PN_stdfloat get_water_offset() const;
+  LVector3 get_water_normal() const;
+  LVector3 get_gravity() const;
 
 
   void garbage_collect(int lifetime=256);
   void garbage_collect(int lifetime=256);
 
 

+ 1 - 1
panda/src/bullet/bulletSphereShape.I

@@ -28,7 +28,7 @@ INLINE BulletSphereShape::
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-INLINE float BulletSphereShape::
+INLINE PN_stdfloat BulletSphereShape::
 get_radius() const {
 get_radius() const {
 
 
   return _shape->getRadius();
   return _shape->getRadius();

+ 1 - 1
panda/src/bullet/bulletSphereShape.cxx

@@ -22,7 +22,7 @@ TypeHandle BulletSphereShape::_type_handle;
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 BulletSphereShape::
 BulletSphereShape::
-BulletSphereShape(float radius) {
+BulletSphereShape(PN_stdfloat radius) {
 
 
   _shape = new btSphereShape(radius);
   _shape = new btSphereShape(radius);
   _shape->setUserPointer(this);
   _shape->setUserPointer(this);

+ 2 - 2
panda/src/bullet/bulletSphereShape.h

@@ -30,10 +30,10 @@
 class EXPCL_PANDABULLET BulletSphereShape : public BulletShape {
 class EXPCL_PANDABULLET BulletSphereShape : public BulletShape {
 
 
 PUBLISHED:
 PUBLISHED:
-  BulletSphereShape(float radius);
+  BulletSphereShape(PN_stdfloat radius);
   INLINE ~BulletSphereShape();
   INLINE ~BulletSphereShape();
 
 
-  INLINE float get_radius() const;
+  INLINE PN_stdfloat get_radius() const;
 
 
   static BulletSphereShape *make_from_solid(const CollisionSphere *solid);
   static BulletSphereShape *make_from_solid(const CollisionSphere *solid);
 
 

+ 14 - 14
panda/src/bullet/bulletSphericalConstraint.cxx

@@ -24,10 +24,10 @@ TypeHandle BulletSphericalConstraint::_type_handle;
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 BulletSphericalConstraint::
 BulletSphericalConstraint::
 BulletSphericalConstraint(const BulletRigidBodyNode *node_a, 
 BulletSphericalConstraint(const BulletRigidBodyNode *node_a, 
-                          const LPoint3f &pivot_a) {
+                          const LPoint3 &pivot_a) {
 
 
   btRigidBody *ptr_a = btRigidBody::upcast(node_a->get_object());
   btRigidBody *ptr_a = btRigidBody::upcast(node_a->get_object());
-  btVector3 pos_a = LVecBase3f_to_btVector3(pivot_a);
+  btVector3 pos_a = LVecBase3_to_btVector3(pivot_a);
 
 
   _constraint = new btPoint2PointConstraint(*ptr_a, pos_a);
   _constraint = new btPoint2PointConstraint(*ptr_a, pos_a);
 }
 }
@@ -40,14 +40,14 @@ BulletSphericalConstraint(const BulletRigidBodyNode *node_a,
 BulletSphericalConstraint::
 BulletSphericalConstraint::
 BulletSphericalConstraint(const BulletRigidBodyNode *node_a,
 BulletSphericalConstraint(const BulletRigidBodyNode *node_a,
                           const BulletRigidBodyNode *node_b,
                           const BulletRigidBodyNode *node_b,
-                          const LPoint3f &pivot_a,
-                          const LPoint3f &pivot_b) {
+                          const LPoint3 &pivot_a,
+                          const LPoint3 &pivot_b) {
 
 
   btRigidBody *ptr_a = btRigidBody::upcast(node_a->get_object());
   btRigidBody *ptr_a = btRigidBody::upcast(node_a->get_object());
-  btVector3 pos_a = LVecBase3f_to_btVector3(pivot_a);
+  btVector3 pos_a = LVecBase3_to_btVector3(pivot_a);
 
 
   btRigidBody *ptr_b = btRigidBody::upcast(node_b->get_object());
   btRigidBody *ptr_b = btRigidBody::upcast(node_b->get_object());
-  btVector3 pos_b = LVecBase3f_to_btVector3(pivot_b);
+  btVector3 pos_b = LVecBase3_to_btVector3(pivot_b);
 
 
   _constraint = new btPoint2PointConstraint(*ptr_a, *ptr_b, pos_a, pos_b);
   _constraint = new btPoint2PointConstraint(*ptr_a, *ptr_b, pos_a, pos_b);
 }
 }
@@ -69,10 +69,10 @@ ptr() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSphericalConstraint::
 void BulletSphericalConstraint::
-set_pivot_a(const LPoint3f &pivot_a) {
+set_pivot_a(const LPoint3 &pivot_a) {
 
 
   nassertv(!pivot_a.is_nan());
   nassertv(!pivot_a.is_nan());
-  _constraint->setPivotA(LVecBase3f_to_btVector3(pivot_a));
+  _constraint->setPivotA(LVecBase3_to_btVector3(pivot_a));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -81,10 +81,10 @@ set_pivot_a(const LPoint3f &pivot_a) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletSphericalConstraint::
 void BulletSphericalConstraint::
-set_pivot_b(const LPoint3f &pivot_b) {
+set_pivot_b(const LPoint3 &pivot_b) {
 
 
   nassertv(!pivot_b.is_nan());
   nassertv(!pivot_b.is_nan());
-  _constraint->setPivotA(LVecBase3f_to_btVector3(pivot_b));
+  _constraint->setPivotA(LVecBase3_to_btVector3(pivot_b));
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -92,10 +92,10 @@ set_pivot_b(const LPoint3f &pivot_b) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LPoint3f BulletSphericalConstraint::
+LPoint3 BulletSphericalConstraint::
 get_pivot_in_a() const {
 get_pivot_in_a() const {
 
 
-  return btVector3_to_LPoint3f(_constraint->getPivotInA());
+  return btVector3_to_LPoint3(_constraint->getPivotInA());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -103,9 +103,9 @@ get_pivot_in_a() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LPoint3f BulletSphericalConstraint::
+LPoint3 BulletSphericalConstraint::
 get_pivot_in_b() const {
 get_pivot_in_b() const {
 
 
-  return btVector3_to_LPoint3f(_constraint->getPivotInB());
+  return btVector3_to_LPoint3(_constraint->getPivotInB());
 }
 }
 
 

+ 7 - 7
panda/src/bullet/bulletSphericalConstraint.h

@@ -39,18 +39,18 @@ class EXPCL_PANDABULLET BulletSphericalConstraint : public BulletConstraint {
 
 
 PUBLISHED:
 PUBLISHED:
   BulletSphericalConstraint(const BulletRigidBodyNode *node_a, 
   BulletSphericalConstraint(const BulletRigidBodyNode *node_a, 
-                            const LPoint3f &pivot_a);
+                            const LPoint3 &pivot_a);
   BulletSphericalConstraint(const BulletRigidBodyNode *node_a,
   BulletSphericalConstraint(const BulletRigidBodyNode *node_a,
                             const BulletRigidBodyNode *node_b,
                             const BulletRigidBodyNode *node_b,
-                            const LPoint3f &pivot_a,
-                            const LPoint3f &pivot_b);
+                            const LPoint3 &pivot_a,
+                            const LPoint3 &pivot_b);
   INLINE ~BulletSphericalConstraint();
   INLINE ~BulletSphericalConstraint();
 
 
-  void set_pivot_a(const LPoint3f &pivot_a);
-  void set_pivot_b(const LPoint3f &pivot_b);
+  void set_pivot_a(const LPoint3 &pivot_a);
+  void set_pivot_b(const LPoint3 &pivot_b);
 
 
-  LPoint3f get_pivot_in_a() const;
-  LPoint3f get_pivot_in_b() const;
+  LPoint3 get_pivot_in_a() const;
+  LPoint3 get_pivot_in_b() const;
 
 
 public:
 public:
   virtual btTypedConstraint *ptr() const;
   virtual btTypedConstraint *ptr() const;

+ 15 - 15
panda/src/bullet/bulletTriangleMesh.cxx

@@ -60,16 +60,16 @@ preallocate(int num_verts, int num_indices) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletTriangleMesh::
 void BulletTriangleMesh::
-add_triangle(const LPoint3f &p0, const LPoint3f &p1, const LPoint3f &p2, bool remove_duplicate_vertices) {
+add_triangle(const LPoint3 &p0, const LPoint3 &p1, const LPoint3 &p2, bool remove_duplicate_vertices) {
 
 
   nassertv(!p0.is_nan());
   nassertv(!p0.is_nan());
   nassertv(!p1.is_nan());
   nassertv(!p1.is_nan());
   nassertv(!p2.is_nan());
   nassertv(!p2.is_nan());
 
 
   _mesh->addTriangle(
   _mesh->addTriangle(
-    LVecBase3f_to_btVector3(p0),
-    LVecBase3f_to_btVector3(p1),
-    LVecBase3f_to_btVector3(p2),
+    LVecBase3_to_btVector3(p0),
+    LVecBase3_to_btVector3(p1),
+    LVecBase3_to_btVector3(p2),
     remove_duplicate_vertices);
     remove_duplicate_vertices);
 }
 }
 
 
@@ -79,7 +79,7 @@ add_triangle(const LPoint3f &p0, const LPoint3f &p1, const LPoint3f &p2, bool re
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletTriangleMesh::
 void BulletTriangleMesh::
-set_welding_distance(float distance) {
+set_welding_distance(PN_stdfloat distance) {
 
 
   _mesh->m_weldingThreshold = distance;
   _mesh->m_weldingThreshold = distance;
 }
 }
@@ -89,7 +89,7 @@ set_welding_distance(float distance) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletTriangleMesh::
+PN_stdfloat BulletTriangleMesh::
 get_welding_distance() const {
 get_welding_distance() const {
 
 
   return _mesh->m_weldingThreshold;
   return _mesh->m_weldingThreshold;
@@ -104,23 +104,23 @@ void BulletTriangleMesh::
 add_geom(const Geom *geom, bool remove_duplicate_vertices) {
 add_geom(const Geom *geom, bool remove_duplicate_vertices) {
 
 
   // Collect points
   // Collect points
-  pvector<LPoint3f> points;
+  pvector<LPoint3> points;
 
 
   CPT(GeomVertexData) vdata = geom->get_vertex_data();
   CPT(GeomVertexData) vdata = geom->get_vertex_data();
   GeomVertexReader reader = GeomVertexReader(vdata, InternalName::get_vertex());
   GeomVertexReader reader = GeomVertexReader(vdata, InternalName::get_vertex());
 
 
   while (!reader.is_at_end()) {
   while (!reader.is_at_end()) {
-    points.push_back(reader.get_data3f());
+    points.push_back(reader.get_data3());
   }
   }
 
 
   // Convert points
   // Convert points
   btVector3 *vertices = new btVector3[points.size()];
   btVector3 *vertices = new btVector3[points.size()];
 
 
   int i = 0;
   int i = 0;
-  pvector<LPoint3f>::const_iterator it;
+  pvector<LPoint3>::const_iterator it;
   for (it=points.begin(); it!=points.end(); it++) {
   for (it=points.begin(); it!=points.end(); it++) {
-    LPoint3f v = *it;
-    vertices[i] = LVecBase3f_to_btVector3(v);
+    LPoint3 v = *it;
+    vertices[i] = LVecBase3_to_btVector3(v);
     i++;
     i++;
   }
   }
 
 
@@ -152,16 +152,16 @@ add_geom(const Geom *geom, bool remove_duplicate_vertices) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletTriangleMesh::
 void BulletTriangleMesh::
-add_array(const PTA_LVecBase3f &points, const PTA_int &indices, bool remove_duplicate_vertices) {
+add_array(const PTA_LVecBase3 &points, const PTA_int &indices, bool remove_duplicate_vertices) {
 
 
   // Convert vertices
   // Convert vertices
   btVector3 *vertices = new btVector3[points.size()];
   btVector3 *vertices = new btVector3[points.size()];
 
 
   int i = 0;
   int i = 0;
-  PTA_LVecBase3f::const_iterator it;
+  PTA_LVecBase3::const_iterator it;
   for (it=points.begin(); it!=points.end(); it++) {
   for (it=points.begin(); it!=points.end(); it++) {
-    LVecBase3f v = *it;
-    vertices[i] = LVecBase3f_to_btVector3(v);
+    LVecBase3 v = *it;
+    vertices[i] = LVecBase3_to_btVector3(v);
     i++;
     i++;
   }
   }
 
 

+ 6 - 6
panda/src/bullet/bulletTriangleMesh.h

@@ -37,21 +37,21 @@ PUBLISHED:
   BulletTriangleMesh();
   BulletTriangleMesh();
   INLINE ~BulletTriangleMesh();
   INLINE ~BulletTriangleMesh();
 
 
-  void add_triangle(const LPoint3f &p0,
-                    const LPoint3f &p1,
-                    const LPoint3f &p2,
+  void add_triangle(const LPoint3 &p0,
+                    const LPoint3 &p1,
+                    const LPoint3 &p2,
                     bool remove_duplicate_vertices=false);
                     bool remove_duplicate_vertices=false);
-  void add_array(const PTA_LVecBase3f &points,
+  void add_array(const PTA_LVecBase3 &points,
                  const PTA_int &indices,
                  const PTA_int &indices,
                  bool remove_duplicate_vertices=false);
                  bool remove_duplicate_vertices=false);
   void add_geom(const Geom *geom, 
   void add_geom(const Geom *geom, 
                 bool remove_duplicate_vertices=false);
                 bool remove_duplicate_vertices=false);
 
 
-  void set_welding_distance(float distance);
+  void set_welding_distance(PN_stdfloat distance);
   void preallocate(int num_verts, int num_indices);
   void preallocate(int num_verts, int num_indices);
 
 
   int get_num_triangles() const;
   int get_num_triangles() const;
-  float get_welding_distance() const;
+  PN_stdfloat get_welding_distance() const;
 
 
   virtual void output(ostream &out) const;
   virtual void output(ostream &out) const;
   virtual void write(ostream &out, int indent_level) const;
   virtual void write(ostream &out, int indent_level) const;

+ 4 - 4
panda/src/bullet/bulletTriangleMeshShape.cxx

@@ -39,7 +39,7 @@ BulletTriangleMeshShape(BulletTriangleMesh *mesh, bool dynamic, bool compress, b
   // Assert that mesh has at least one triangle
   // Assert that mesh has at least one triangle
   if (mesh->get_num_triangles() == 0) {
   if (mesh->get_num_triangles() == 0) {
     bullet_cat.warning() << "mesh has zero triangles! adding degenerated triangle." << endl;
     bullet_cat.warning() << "mesh has zero triangles! adding degenerated triangle." << endl;
-    mesh->add_triangle(LPoint3f::zero(), LPoint3f::zero(), LPoint3f::zero());
+    mesh->add_triangle(LPoint3::zero(), LPoint3::zero(), LPoint3::zero());
   }
   }
 
 
   // Retain a pointer to the mesh, to prevent it from being deleted
   // Retain a pointer to the mesh, to prevent it from being deleted
@@ -90,14 +90,14 @@ ptr() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletTriangleMeshShape::
 void BulletTriangleMeshShape::
-refit_tree(const LPoint3f &aabb_min, const LPoint3f &aabb_max) {
+refit_tree(const LPoint3 &aabb_min, const LPoint3 &aabb_max) {
 
 
   nassertv(!aabb_max.is_nan());
   nassertv(!aabb_max.is_nan());
   nassertv(!aabb_max.is_nan());
   nassertv(!aabb_max.is_nan());
 
 
   nassertv(this->is_static());
   nassertv(this->is_static());
 
 
-  _bvh_shape->refitTree(LVecBase3f_to_btVector3(aabb_min),
-                        LVecBase3f_to_btVector3(aabb_max));
+  _bvh_shape->refitTree(LVecBase3_to_btVector3(aabb_min),
+                        LVecBase3_to_btVector3(aabb_max));
 }
 }
 
 

+ 1 - 1
panda/src/bullet/bulletTriangleMeshShape.h

@@ -34,7 +34,7 @@ PUBLISHED:
   BulletTriangleMeshShape(BulletTriangleMesh *mesh, bool dynamic, bool compress=true, bool bvh=true);
   BulletTriangleMeshShape(BulletTriangleMesh *mesh, bool dynamic, bool compress=true, bool bvh=true);
   INLINE ~BulletTriangleMeshShape();
   INLINE ~BulletTriangleMeshShape();
 
 
-  void refit_tree(const LPoint3f &aabb_min, const LPoint3f &aabb_max);
+  void refit_tree(const LPoint3 &aabb_min, const LPoint3 &aabb_max);
 
 
   INLINE bool is_static() const;
   INLINE bool is_static() const;
   INLINE bool is_dynamic() const;
   INLINE bool is_dynamic() const;

+ 24 - 24
panda/src/bullet/bulletVehicle.I

@@ -66,9 +66,9 @@ get_num_wheels() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletVehicleTuning::
 void BulletVehicleTuning::
-set_suspension_stiffness(float value) {
+set_suspension_stiffness(PN_stdfloat value) {
 
 
-  _.m_suspensionStiffness = value;
+  _.m_suspensionStiffness = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -77,9 +77,9 @@ set_suspension_stiffness(float value) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletVehicleTuning::
 void BulletVehicleTuning::
-set_suspension_compression(float value) {
+set_suspension_compression(PN_stdfloat value) {
 
 
-  _.m_suspensionCompression = value;
+  _.m_suspensionCompression = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -88,9 +88,9 @@ set_suspension_compression(float value) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletVehicleTuning::
 void BulletVehicleTuning::
-set_suspension_damping(float value) {
+set_suspension_damping(PN_stdfloat value) {
 
 
-  _.m_suspensionDamping = value;
+  _.m_suspensionDamping = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -99,9 +99,9 @@ set_suspension_damping(float value) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletVehicleTuning::
 void BulletVehicleTuning::
-set_max_suspension_travel_cm(float value) {
+set_max_suspension_travel_cm(PN_stdfloat value) {
 
 
-  _.m_maxSuspensionTravelCm = value;
+  _.m_maxSuspensionTravelCm = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -110,9 +110,9 @@ set_max_suspension_travel_cm(float value) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletVehicleTuning::
 void BulletVehicleTuning::
-set_friction_slip(float value) {
+set_friction_slip(PN_stdfloat value) {
 
 
-  _.m_frictionSlip = value;
+  _.m_frictionSlip = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -121,9 +121,9 @@ set_friction_slip(float value) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletVehicleTuning::
 void BulletVehicleTuning::
-set_max_suspension_force(float value) {
+set_max_suspension_force(PN_stdfloat value) {
 
 
-  _.m_maxSuspensionForce = value;
+  _.m_maxSuspensionForce = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -131,10 +131,10 @@ set_max_suspension_force(float value) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletVehicleTuning::
+PN_stdfloat BulletVehicleTuning::
 get_suspension_stiffness() const {
 get_suspension_stiffness() const {
 
 
-  return _.m_suspensionStiffness;
+  return (PN_stdfloat)_.m_suspensionStiffness;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -142,10 +142,10 @@ get_suspension_stiffness() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletVehicleTuning::
+PN_stdfloat BulletVehicleTuning::
 get_suspension_compression() const {
 get_suspension_compression() const {
 
 
-  return _.m_suspensionCompression;
+  return (PN_stdfloat)_.m_suspensionCompression;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -153,10 +153,10 @@ get_suspension_compression() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletVehicleTuning::
+PN_stdfloat BulletVehicleTuning::
 get_suspension_damping() const {
 get_suspension_damping() const {
 
 
-  return _.m_suspensionDamping;
+  return (PN_stdfloat)_.m_suspensionDamping;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -164,10 +164,10 @@ get_suspension_damping() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletVehicleTuning::
+PN_stdfloat BulletVehicleTuning::
 get_max_suspension_travel_cm() const {
 get_max_suspension_travel_cm() const {
 
 
-  return _.m_maxSuspensionTravelCm;
+  return (PN_stdfloat)_.m_maxSuspensionTravelCm;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -175,10 +175,10 @@ get_max_suspension_travel_cm() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletVehicleTuning::
+PN_stdfloat BulletVehicleTuning::
 get_friction_slip() const {
 get_friction_slip() const {
 
 
-  return _.m_frictionSlip;
+  return (PN_stdfloat)_.m_frictionSlip;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -186,9 +186,9 @@ get_friction_slip() const {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletVehicleTuning::
+PN_stdfloat BulletVehicleTuning::
 get_max_suspension_force() const {
 get_max_suspension_force() const {
 
 
-  return _.m_maxSuspensionForce;
+  return (PN_stdfloat)_.m_maxSuspensionForce;
 }
 }
 
 

+ 9 - 9
panda/src/bullet/bulletVehicle.cxx

@@ -68,10 +68,10 @@ set_coordinate_system(BulletUpAxis up) {
 //               actual direction of movement. The forward vetcor
 //               actual direction of movement. The forward vetcor
 //               is given in global coordinates.
 //               is given in global coordinates.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVector3f BulletVehicle::
+LVector3 BulletVehicle::
 get_forward_vector() const {
 get_forward_vector() const {
 
 
-  return btVector3_to_LVector3f(_vehicle->getForwardVector());
+  return btVector3_to_LVector3(_vehicle->getForwardVector());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -93,10 +93,10 @@ get_chassis() {
 //  Description: Returns the current speed in kilometers per hour.
 //  Description: Returns the current speed in kilometers per hour.
 //               Convert to miles using: km/h * 0.62 = mph
 //               Convert to miles using: km/h * 0.62 = mph
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletVehicle::
+PN_stdfloat BulletVehicle::
 get_current_speed_km_hour() const {
 get_current_speed_km_hour() const {
 
 
-  return _vehicle->getCurrentSpeedKmHour();
+  return (PN_stdfloat)_vehicle->getCurrentSpeedKmHour();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -116,7 +116,7 @@ reset_suspension() {
 //  Description: Returns the steering angle of the wheel with index
 //  Description: Returns the steering angle of the wheel with index
 //               idx in degrees.
 //               idx in degrees.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletVehicle::
+PN_stdfloat BulletVehicle::
 get_steering_value(int idx) const {
 get_steering_value(int idx) const {
 
 
   nassertr(idx < get_num_wheels(), 0.0f);
   nassertr(idx < get_num_wheels(), 0.0f);
@@ -130,7 +130,7 @@ get_steering_value(int idx) const {
 //               with index idx.
 //               with index idx.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletVehicle::
 void BulletVehicle::
-set_steering_value(float steering, int idx) {
+set_steering_value(PN_stdfloat steering, int idx) {
 
 
   nassertv(idx < get_num_wheels());
   nassertv(idx < get_num_wheels());
   _vehicle->setSteeringValue(deg_2_rad(steering), idx);
   _vehicle->setSteeringValue(deg_2_rad(steering), idx);
@@ -143,7 +143,7 @@ set_steering_value(float steering, int idx) {
 //               acceleration.
 //               acceleration.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletVehicle::
 void BulletVehicle::
-apply_engine_force(float force, int idx) {
+apply_engine_force(PN_stdfloat force, int idx) {
 
 
   nassertv(idx < get_num_wheels());
   nassertv(idx < get_num_wheels());
   _vehicle->applyEngineForce(force, idx);
   _vehicle->applyEngineForce(force, idx);
@@ -155,7 +155,7 @@ apply_engine_force(float force, int idx) {
 //  Description: Applies braking force to the wheel with index idx.
 //  Description: Applies braking force to the wheel with index idx.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletVehicle::
 void BulletVehicle::
-set_brake(float brake, int idx) {
+set_brake(PN_stdfloat brake, int idx) {
 
 
   nassertv(idx < get_num_wheels());
   nassertv(idx < get_num_wheels());
   _vehicle->setBrake(brake, idx);
   _vehicle->setBrake(brake, idx);
@@ -167,7 +167,7 @@ set_brake(float brake, int idx) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletVehicle::
 void BulletVehicle::
-set_pitch_control(float pitch) {
+set_pitch_control(PN_stdfloat pitch) {
 
 
   _vehicle->setPitchControl(pitch);
   _vehicle->setPitchControl(pitch);
 }
 }

+ 20 - 20
panda/src/bullet/bulletVehicle.h

@@ -39,19 +39,19 @@ class BulletWheel;
 class BulletVehicleTuning {
 class BulletVehicleTuning {
 
 
 PUBLISHED:
 PUBLISHED:
-  INLINE void set_suspension_stiffness(float value);
-  INLINE void set_suspension_compression(float value);
-  INLINE void set_suspension_damping(float value);
-  INLINE void set_max_suspension_travel_cm(float value);
-  INLINE void set_friction_slip(float value);
-  INLINE void set_max_suspension_force(float value);
-
-  INLINE float get_suspension_stiffness() const;
-  INLINE float get_suspension_compression() const;
-  INLINE float get_suspension_damping() const;
-  INLINE float get_max_suspension_travel_cm() const;
-  INLINE float get_friction_slip() const;
-  INLINE float get_max_suspension_force() const;
+  INLINE void set_suspension_stiffness(PN_stdfloat value);
+  INLINE void set_suspension_compression(PN_stdfloat value);
+  INLINE void set_suspension_damping(PN_stdfloat value);
+  INLINE void set_max_suspension_travel_cm(PN_stdfloat value);
+  INLINE void set_friction_slip(PN_stdfloat value);
+  INLINE void set_max_suspension_force(PN_stdfloat value);
+
+  INLINE PN_stdfloat get_suspension_stiffness() const;
+  INLINE PN_stdfloat get_suspension_compression() const;
+  INLINE PN_stdfloat get_suspension_damping() const;
+  INLINE PN_stdfloat get_max_suspension_travel_cm() const;
+  INLINE PN_stdfloat get_friction_slip() const;
+  INLINE PN_stdfloat get_max_suspension_force() const;
 
 
 private:
 private:
   btRaycastVehicle::btVehicleTuning _;
   btRaycastVehicle::btVehicleTuning _;
@@ -70,17 +70,17 @@ PUBLISHED:
   INLINE ~BulletVehicle();
   INLINE ~BulletVehicle();
 
 
   void set_coordinate_system(BulletUpAxis up);
   void set_coordinate_system(BulletUpAxis up);
-  void set_steering_value(float steering, int idx);
-  void set_brake(float brake, int idx);
-  void set_pitch_control(float pitch);
+  void set_steering_value(PN_stdfloat steering, int idx);
+  void set_brake(PN_stdfloat brake, int idx);
+  void set_pitch_control(PN_stdfloat pitch);
 
 
   BulletRigidBodyNode *get_chassis();
   BulletRigidBodyNode *get_chassis();
-  float get_current_speed_km_hour() const;
-  float get_steering_value(int idx) const;
-  LVector3f get_forward_vector() const;
+  PN_stdfloat get_current_speed_km_hour() const;
+  PN_stdfloat get_steering_value(int idx) const;
+  LVector3 get_forward_vector() const;
 
 
   void reset_suspension();
   void reset_suspension();
-  void apply_engine_force(float force, int idx);
+  void apply_engine_force(PN_stdfloat force, int idx);
 
 
   // Wheels
   // Wheels
   BulletWheel create_wheel();
   BulletWheel create_wheel();

+ 86 - 86
panda/src/bullet/bulletWheel.cxx

@@ -30,10 +30,10 @@ BulletWheel(btWheelInfo &info) : _info(info) {
 //  Description: Returns the length of the suspension when the
 //  Description: Returns the length of the suspension when the
 //               vehicle is standing still.
 //               vehicle is standing still.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletWheel::
+PN_stdfloat BulletWheel::
 get_suspension_rest_length() const {
 get_suspension_rest_length() const {
 
 
-  return _info.getSuspensionRestLength();
+  return (PN_stdfloat)_info.getSuspensionRestLength();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -42,9 +42,9 @@ get_suspension_rest_length() const {
 //  Description: Sets how stiff the suspension shall be.
 //  Description: Sets how stiff the suspension shall be.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_suspension_stiffness(float value) {
+set_suspension_stiffness(PN_stdfloat value) {
 
 
-  _info.m_suspensionStiffness = value;
+  _info.m_suspensionStiffness = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -52,10 +52,10 @@ set_suspension_stiffness(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Returns the stiffness of the suspension.
 //  Description: Returns the stiffness of the suspension.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletWheel::
+PN_stdfloat BulletWheel::
 get_suspension_stiffness() const {
 get_suspension_stiffness() const {
 
 
-  return _info.m_suspensionStiffness;
+  return (PN_stdfloat)_info.m_suspensionStiffness;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -65,9 +65,9 @@ get_suspension_stiffness() const {
 //               out of the resting position in centimeters.
 //               out of the resting position in centimeters.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_max_suspension_travel_cm(float value) {
+set_max_suspension_travel_cm(PN_stdfloat value) {
 
 
-  _info.m_maxSuspensionTravelCm = value;
+  _info.m_maxSuspensionTravelCm = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -75,10 +75,10 @@ set_max_suspension_travel_cm(float value) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletWheel::
+PN_stdfloat BulletWheel::
 get_max_suspension_travel_cm() const {
 get_max_suspension_travel_cm() const {
 
 
-  return _info.m_maxSuspensionTravelCm;
+  return (PN_stdfloat)_info.m_maxSuspensionTravelCm;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -87,9 +87,9 @@ get_max_suspension_travel_cm() const {
 //  Description: Sets the slipperyness of the tyre.
 //  Description: Sets the slipperyness of the tyre.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_friction_slip(float value) {
+set_friction_slip(PN_stdfloat value) {
 
 
-  _info.m_frictionSlip = value;
+  _info.m_frictionSlip = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -97,10 +97,10 @@ set_friction_slip(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Returns how slippery the tyres are.
 //  Description: Returns how slippery the tyres are.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletWheel::
+PN_stdfloat BulletWheel::
 get_friction_slip() const {
 get_friction_slip() const {
 
 
-  return _info.m_frictionSlip;
+  return (PN_stdfloat)_info.m_frictionSlip;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -110,9 +110,9 @@ get_friction_slip() const {
 //               handle.
 //               handle.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_max_suspension_force(float value) {
+set_max_suspension_force(PN_stdfloat value) {
 
 
-  _info.m_maxSuspensionForce = value;
+  _info.m_maxSuspensionForce = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -121,10 +121,10 @@ set_max_suspension_force(float value) {
 //  Description: Returns the maximum force (weight) the suspension
 //  Description: Returns the maximum force (weight) the suspension
 //               can handle.
 //               can handle.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletWheel::
+PN_stdfloat BulletWheel::
 get_max_suspension_force() const {
 get_max_suspension_force() const {
 
 
-  return _info.m_maxSuspensionForce;
+  return (PN_stdfloat)_info.m_maxSuspensionForce;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -134,9 +134,9 @@ get_max_suspension_force() const {
 //               gets compressed.
 //               gets compressed.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_wheels_damping_compression(float value) {
+set_wheels_damping_compression(PN_stdfloat value) {
 
 
-  _info.m_wheelsDampingCompression = value;
+  _info.m_wheelsDampingCompression = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -145,10 +145,10 @@ set_wheels_damping_compression(float value) {
 //  Description: Returns the  damping applied to the compressing
 //  Description: Returns the  damping applied to the compressing
 //               suspension.
 //               suspension.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletWheel::
+PN_stdfloat BulletWheel::
 get_wheels_damping_compression() const {
 get_wheels_damping_compression() const {
 
 
-  return _info.m_wheelsDampingCompression;
+  return (PN_stdfloat)_info.m_wheelsDampingCompression;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -158,9 +158,9 @@ get_wheels_damping_compression() const {
 //               relaxes.
 //               relaxes.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_wheels_damping_relaxation(float value) {
+set_wheels_damping_relaxation(PN_stdfloat value) {
 
 
-  _info.m_wheelsDampingRelaxation = value;
+  _info.m_wheelsDampingRelaxation = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -169,10 +169,10 @@ set_wheels_damping_relaxation(float value) {
 //  Description: Returns the damping applied to the relaxing
 //  Description: Returns the damping applied to the relaxing
 //               suspension.
 //               suspension.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletWheel::
+PN_stdfloat BulletWheel::
 get_wheels_damping_relaxation() const {
 get_wheels_damping_relaxation() const {
 
 
-  return _info.m_wheelsDampingRelaxation;
+  return (PN_stdfloat)_info.m_wheelsDampingRelaxation;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -185,9 +185,9 @@ get_wheels_damping_relaxation() const {
 //               of mass up and down.
 //               of mass up and down.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_roll_influence(float value) {
+set_roll_influence(PN_stdfloat value) {
 
 
-  _info.m_rollInfluence = value;
+  _info.m_rollInfluence = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -196,10 +196,10 @@ set_roll_influence(float value) {
 //  Description: Returns the factor by which roll forces are scaled.
 //  Description: Returns the factor by which roll forces are scaled.
 //               See set_roll_influence.
 //               See set_roll_influence.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletWheel::
+PN_stdfloat BulletWheel::
 get_roll_influence() const {
 get_roll_influence() const {
 
 
-  return _info.m_rollInfluence;
+  return (PN_stdfloat)_info.m_rollInfluence;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -208,9 +208,9 @@ get_roll_influence() const {
 //  Description: Sets the wheel radius.
 //  Description: Sets the wheel radius.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_wheel_radius(float value) {
+set_wheel_radius(PN_stdfloat value) {
 
 
-  _info.m_wheelsRadius = value;
+  _info.m_wheelsRadius = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -218,10 +218,10 @@ set_wheel_radius(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Returns the wheel radius.
 //  Description: Returns the wheel radius.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletWheel::
+PN_stdfloat BulletWheel::
 get_wheel_radius() const {
 get_wheel_radius() const {
 
 
-  return _info.m_wheelsRadius;
+  return (PN_stdfloat)_info.m_wheelsRadius;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -230,9 +230,9 @@ get_wheel_radius() const {
 //  Description: Sets the steering angle.
 //  Description: Sets the steering angle.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_steering(float value) {
+set_steering(PN_stdfloat value) {
 
 
-  _info.m_steering = value;
+  _info.m_steering = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -240,10 +240,10 @@ set_steering(float value) {
 //       Access: Published
 //       Access: Published
 //  Description: Returns the steering angle in degrees.
 //  Description: Returns the steering angle in degrees.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletWheel::
+PN_stdfloat BulletWheel::
 get_steering() const {
 get_steering() const {
 
 
-  return _info.m_steering;
+  return (PN_stdfloat)_info.m_steering;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -252,9 +252,9 @@ get_steering() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_rotation(float value) {
+set_rotation(PN_stdfloat value) {
 
 
-  _info.m_rotation = value;
+  _info.m_rotation = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -262,10 +262,10 @@ set_rotation(float value) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletWheel::
+PN_stdfloat BulletWheel::
 get_rotation() const {
 get_rotation() const {
 
 
-  return _info.m_rotation;
+  return (PN_stdfloat)_info.m_rotation;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -274,9 +274,9 @@ get_rotation() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_delta_rotation(float value) {
+set_delta_rotation(PN_stdfloat value) {
 
 
-  _info.m_deltaRotation = value;
+  _info.m_deltaRotation = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -284,10 +284,10 @@ set_delta_rotation(float value) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletWheel::
+PN_stdfloat BulletWheel::
 get_delta_rotation() const {
 get_delta_rotation() const {
 
 
-  return _info.m_deltaRotation;
+  return (PN_stdfloat)_info.m_deltaRotation;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -297,9 +297,9 @@ get_delta_rotation() const {
 //               wheel.
 //               wheel.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_engine_force(float value) {
+set_engine_force(PN_stdfloat value) {
 
 
-  _info.m_engineForce = value;
+  _info.m_engineForce = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -308,10 +308,10 @@ set_engine_force(float value) {
 //  Description: Returns the amount of accelleration force currently
 //  Description: Returns the amount of accelleration force currently
 //               applied.
 //               applied.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletWheel::
+PN_stdfloat BulletWheel::
 get_engine_force() const {
 get_engine_force() const {
 
 
-  return _info.m_engineForce;
+  return (PN_stdfloat)_info.m_engineForce;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -320,9 +320,9 @@ get_engine_force() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_brake(float value) {
+set_brake(PN_stdfloat value) {
 
 
-  _info.m_brake = value;
+  _info.m_brake = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -331,10 +331,10 @@ set_brake(float value) {
 //  Description: Returns the amount of braking force currently
 //  Description: Returns the amount of braking force currently
 //               applied.
 //               applied.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletWheel::
+PN_stdfloat BulletWheel::
 get_brake() const {
 get_brake() const {
 
 
-  return _info.m_brake;
+  return (PN_stdfloat)_info.m_brake;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -343,9 +343,9 @@ get_brake() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_skid_info(float value) {
+set_skid_info(PN_stdfloat value) {
 
 
-  _info.m_skidInfo = value;
+  _info.m_skidInfo = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -353,10 +353,10 @@ set_skid_info(float value) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletWheel::
+PN_stdfloat BulletWheel::
 get_skid_info() const {
 get_skid_info() const {
 
 
-  return _info.m_skidInfo;
+  return (PN_stdfloat)_info.m_skidInfo;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -365,9 +365,9 @@ get_skid_info() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_wheels_suspension_force(float value) {
+set_wheels_suspension_force(PN_stdfloat value) {
 
 
-  _info.m_wheelsSuspensionForce = value;
+  _info.m_wheelsSuspensionForce = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -375,10 +375,10 @@ set_wheels_suspension_force(float value) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletWheel::
+PN_stdfloat BulletWheel::
 get_wheels_suspension_force() const {
 get_wheels_suspension_force() const {
 
 
-  return _info.m_wheelsSuspensionForce;
+  return (PN_stdfloat)_info.m_wheelsSuspensionForce;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -387,9 +387,9 @@ get_wheels_suspension_force() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_suspension_relative_velocity(float value) {
+set_suspension_relative_velocity(PN_stdfloat value) {
 
 
-  _info.m_suspensionRelativeVelocity = value;
+  _info.m_suspensionRelativeVelocity = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -397,10 +397,10 @@ set_suspension_relative_velocity(float value) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletWheel::
+PN_stdfloat BulletWheel::
 get_suspension_relative_velocity() const {
 get_suspension_relative_velocity() const {
 
 
-  return _info.m_suspensionRelativeVelocity;
+  return (PN_stdfloat)_info.m_suspensionRelativeVelocity;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -409,9 +409,9 @@ get_suspension_relative_velocity() const {
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_clipped_inv_connection_point_cs(float value) {
+set_clipped_inv_connection_point_cs(PN_stdfloat value) {
 
 
-  _info.m_clippedInvContactDotSuspension = value;
+  _info.m_clippedInvContactDotSuspension = (btScalar)value;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -419,10 +419,10 @@ set_clipped_inv_connection_point_cs(float value) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-float BulletWheel::
+PN_stdfloat BulletWheel::
 get_clipped_inv_connection_point_cs() const {
 get_clipped_inv_connection_point_cs() const {
 
 
-  return _info.m_clippedInvContactDotSuspension;
+  return (PN_stdfloat)_info.m_clippedInvContactDotSuspension;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -432,10 +432,10 @@ get_clipped_inv_connection_point_cs() const {
 //               chassis.
 //               chassis.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_chassis_connection_point_cs(const LPoint3f &pos) {
+set_chassis_connection_point_cs(const LPoint3 &pos) {
 
 
   nassertv(!pos.is_nan());
   nassertv(!pos.is_nan());
-  _info.m_chassisConnectionPointCS = LVecBase3f_to_btVector3(pos);
+  _info.m_chassisConnectionPointCS = LVecBase3_to_btVector3(pos);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -444,10 +444,10 @@ set_chassis_connection_point_cs(const LPoint3f &pos) {
 //  Description: Returns the point where the wheel is connected to
 //  Description: Returns the point where the wheel is connected to
 //               the chassis.
 //               the chassis.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LPoint3f BulletWheel::
+LPoint3 BulletWheel::
 get_chassis_connection_point_cs() const {
 get_chassis_connection_point_cs() const {
 
 
-  return btVector3_to_LPoint3f(_info.m_chassisConnectionPointCS);
+  return btVector3_to_LPoint3(_info.m_chassisConnectionPointCS);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -457,10 +457,10 @@ get_chassis_connection_point_cs() const {
 //               orthogonal to the axle vector.)
 //               orthogonal to the axle vector.)
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_wheel_direction_cs(const LVector3f &dir) {
+set_wheel_direction_cs(const LVector3 &dir) {
 
 
   nassertv(!dir.is_nan());
   nassertv(!dir.is_nan());
-  _info.m_wheelDirectionCS = LVecBase3f_to_btVector3(dir);
+  _info.m_wheelDirectionCS = LVecBase3_to_btVector3(dir);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -469,10 +469,10 @@ set_wheel_direction_cs(const LVector3f &dir) {
 //  Description: Returns the wheel's forward vector relative to the
 //  Description: Returns the wheel's forward vector relative to the
 //               chassis.
 //               chassis.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVector3f BulletWheel::
+LVector3 BulletWheel::
 get_wheel_direction_cs() const {
 get_wheel_direction_cs() const {
 
 
-  return btVector3_to_LVector3f(_info.m_wheelDirectionCS);
+  return btVector3_to_LVector3(_info.m_wheelDirectionCS);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -481,10 +481,10 @@ get_wheel_direction_cs() const {
 //  Description: Determines the wheel axle normal vector.
 //  Description: Determines the wheel axle normal vector.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_wheel_axle_cs(const LVector3f &axle) {
+set_wheel_axle_cs(const LVector3 &axle) {
 
 
   nassertv(!axle.is_nan());
   nassertv(!axle.is_nan());
-  _info.m_wheelAxleCS = LVecBase3f_to_btVector3(axle);
+  _info.m_wheelAxleCS = LVecBase3_to_btVector3(axle);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -492,10 +492,10 @@ set_wheel_axle_cs(const LVector3f &axle) {
 //       Access: Published
 //       Access: Published
 //  Description: Returns the normal vector of the wheel axle.
 //  Description: Returns the normal vector of the wheel axle.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVector3f BulletWheel::
+LVector3 BulletWheel::
 get_wheel_axle_cs() const {
 get_wheel_axle_cs() const {
 
 
-  return btVector3_to_LVector3f(_info.m_wheelAxleCS);
+  return btVector3_to_LVector3(_info.m_wheelAxleCS);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -504,10 +504,10 @@ get_wheel_axle_cs() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWheel::
 void BulletWheel::
-set_world_transform(const LMatrix4f &mat) {
+set_world_transform(const LMatrix4 &mat) {
 
 
   nassertv(!mat.is_nan());
   nassertv(!mat.is_nan());
-  _info.m_worldTransform = LMatrix4f_to_btTrans(mat);
+  _info.m_worldTransform = LMatrix4_to_btTrans(mat);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -515,10 +515,10 @@ set_world_transform(const LMatrix4f &mat) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LMatrix4f BulletWheel::
+LMatrix4 BulletWheel::
 get_world_transform() const {
 get_world_transform() const {
 
 
-  return btTrans_to_LMatrix4f(_info.m_worldTransform);
+  return btTrans_to_LMatrix4(_info.m_worldTransform);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////

+ 43 - 43
panda/src/bullet/bulletWheel.h

@@ -36,52 +36,52 @@ class EXPCL_PANDABULLET BulletWheel {
 PUBLISHED:
 PUBLISHED:
   INLINE ~BulletWheel();
   INLINE ~BulletWheel();
 
 
-  void set_suspension_stiffness(float value);
-  void set_max_suspension_travel_cm(float value);
-  void set_friction_slip(float value);
-  void set_max_suspension_force(float value);
-  void set_wheels_damping_compression(float value);
-  void set_wheels_damping_relaxation(float value);
-  void set_roll_influence(float value);
-  void set_wheel_radius(float value);
-  void set_steering(float value);
-  void set_rotation(float value);
-  void set_delta_rotation(float value);
-  void set_engine_force(float value);
-  void set_brake(float value);
-  void set_skid_info(float value);
-  void set_wheels_suspension_force(float value);
-  void set_suspension_relative_velocity(float value);
-  void set_clipped_inv_connection_point_cs(float value);
-  void set_chassis_connection_point_cs(const LPoint3f &pos);
-  void set_wheel_direction_cs(const LVector3f &dir);
-  void set_wheel_axle_cs(const LVector3f &axle);
-  void set_world_transform(const LMatrix4f &mat);
+  void set_suspension_stiffness(PN_stdfloat value);
+  void set_max_suspension_travel_cm(PN_stdfloat value);
+  void set_friction_slip(PN_stdfloat value);
+  void set_max_suspension_force(PN_stdfloat value);
+  void set_wheels_damping_compression(PN_stdfloat value);
+  void set_wheels_damping_relaxation(PN_stdfloat value);
+  void set_roll_influence(PN_stdfloat value);
+  void set_wheel_radius(PN_stdfloat value);
+  void set_steering(PN_stdfloat value);
+  void set_rotation(PN_stdfloat value);
+  void set_delta_rotation(PN_stdfloat value);
+  void set_engine_force(PN_stdfloat value);
+  void set_brake(PN_stdfloat value);
+  void set_skid_info(PN_stdfloat value);
+  void set_wheels_suspension_force(PN_stdfloat value);
+  void set_suspension_relative_velocity(PN_stdfloat value);
+  void set_clipped_inv_connection_point_cs(PN_stdfloat value);
+  void set_chassis_connection_point_cs(const LPoint3 &pos);
+  void set_wheel_direction_cs(const LVector3 &dir);
+  void set_wheel_axle_cs(const LVector3 &axle);
+  void set_world_transform(const LMatrix4 &mat);
   void set_front_wheel(bool value);
   void set_front_wheel(bool value);
   void set_node(PandaNode *node);
   void set_node(PandaNode *node);
 
 
-  float get_suspension_rest_length() const;
-  float get_suspension_stiffness() const;
-  float get_max_suspension_travel_cm() const;
-  float get_friction_slip() const;
-  float get_max_suspension_force() const;
-  float get_wheels_damping_compression() const;
-  float get_wheels_damping_relaxation() const;
-  float get_roll_influence() const;
-  float get_wheel_radius() const;
-  float get_steering() const;
-  float get_rotation() const;
-  float get_delta_rotation() const;
-  float get_engine_force() const;
-  float get_brake() const;
-  float get_skid_info() const;
-  float get_wheels_suspension_force() const;
-  float get_suspension_relative_velocity() const;
-  float get_clipped_inv_connection_point_cs() const;
-  LPoint3f get_chassis_connection_point_cs() const;
-  LVector3f get_wheel_direction_cs() const;
-  LVector3f get_wheel_axle_cs() const;
-  LMatrix4f get_world_transform() const;
+  PN_stdfloat get_suspension_rest_length() const;
+  PN_stdfloat get_suspension_stiffness() const;
+  PN_stdfloat get_max_suspension_travel_cm() const;
+  PN_stdfloat get_friction_slip() const;
+  PN_stdfloat get_max_suspension_force() const;
+  PN_stdfloat get_wheels_damping_compression() const;
+  PN_stdfloat get_wheels_damping_relaxation() const;
+  PN_stdfloat get_roll_influence() const;
+  PN_stdfloat get_wheel_radius() const;
+  PN_stdfloat get_steering() const;
+  PN_stdfloat get_rotation() const;
+  PN_stdfloat get_delta_rotation() const;
+  PN_stdfloat get_engine_force() const;
+  PN_stdfloat get_brake() const;
+  PN_stdfloat get_skid_info() const;
+  PN_stdfloat get_wheels_suspension_force() const;
+  PN_stdfloat get_suspension_relative_velocity() const;
+  PN_stdfloat get_clipped_inv_connection_point_cs() const;
+  LPoint3 get_chassis_connection_point_cs() const;
+  LVector3 get_wheel_direction_cs() const;
+  LVector3 get_wheel_axle_cs() const;
+  LMatrix4 get_world_transform() const;
   bool is_front_wheel() const;
   bool is_front_wheel() const;
   PandaNode *get_node() const;
   PandaNode *get_node() const;
 
 

+ 20 - 20
panda/src/bullet/bulletWorld.cxx

@@ -102,9 +102,9 @@ get_world_info() {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWorld::
 void BulletWorld::
-set_gravity(const LVector3f &gravity) {
+set_gravity(const LVector3 &gravity) {
 
 
-  _world->setGravity(LVecBase3f_to_btVector3(gravity));
+  _world->setGravity(LVecBase3_to_btVector3(gravity));
   _info.m_gravity = _world->getGravity();
   _info.m_gravity = _world->getGravity();
 }
 }
 
 
@@ -114,9 +114,9 @@ set_gravity(const LVector3f &gravity) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWorld::
 void BulletWorld::
-set_gravity(float gx, float gy, float gz) {
+set_gravity(PN_stdfloat gx, PN_stdfloat gy, PN_stdfloat gz) {
 
 
-  _world->setGravity(btVector3(gx, gy, gz));
+  _world->setGravity(btVector3((btScalar)gx, (btScalar)gy, (btScalar)gz));
   _info.m_gravity = _world->getGravity();
   _info.m_gravity = _world->getGravity();
 }
 }
 
 
@@ -125,10 +125,10 @@ set_gravity(float gx, float gy, float gz) {
 //       Access: Published
 //       Access: Published
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-const LVector3f BulletWorld::
+const LVector3 BulletWorld::
 get_gravity() const {
 get_gravity() const {
 
 
-  return btVector3_to_LVector3f(_world->getGravity());
+  return btVector3_to_LVector3(_world->getGravity());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -137,7 +137,7 @@ get_gravity() const {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWorld::
 void BulletWorld::
-do_physics(float dt, int substeps, float stepsize) {
+do_physics(PN_stdfloat dt, int substeps, PN_stdfloat stepsize) {
 
 
   _pstat_physics.start();
   _pstat_physics.start();
 
 
@@ -148,7 +148,7 @@ do_physics(float dt, int substeps, float stepsize) {
 
 
   // Simulation
   // Simulation
   _pstat_simulation.start();
   _pstat_simulation.start();
-  int n = _world->stepSimulation(dt, substeps, stepsize);
+  int n = _world->stepSimulation((btScalar)dt, substeps, (btScalar)stepsize);
   _pstat_simulation.stop();
   _pstat_simulation.stop();
 
 
   if (!n) {
   if (!n) {
@@ -181,7 +181,7 @@ do_physics(float dt, int substeps, float stepsize) {
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void BulletWorld::
 void BulletWorld::
-sync_p2b(float dt) {
+sync_p2b(PN_stdfloat dt) {
 
 
   for (int i=0; i < get_num_rigid_bodies(); i++) {
   for (int i=0; i < get_num_rigid_bodies(); i++) {
     get_rigid_body(i)->sync_p2b();
     get_rigid_body(i)->sync_p2b();
@@ -579,13 +579,13 @@ remove_constraint(BulletConstraint *constraint) {
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 BulletClosestHitRayResult BulletWorld::
 BulletClosestHitRayResult BulletWorld::
-ray_test_closest(const LPoint3f &from_pos, const LPoint3f &to_pos, const CollideMask &mask) const {
+ray_test_closest(const LPoint3 &from_pos, const LPoint3 &to_pos, const CollideMask &mask) const {
 
 
   nassertr(!from_pos.is_nan(), BulletClosestHitRayResult::empty());
   nassertr(!from_pos.is_nan(), BulletClosestHitRayResult::empty());
   nassertr(!to_pos.is_nan(), BulletClosestHitRayResult::empty());
   nassertr(!to_pos.is_nan(), BulletClosestHitRayResult::empty());
 
 
-  const btVector3 from = LVecBase3f_to_btVector3(from_pos);
-  const btVector3 to = LVecBase3f_to_btVector3(to_pos);
+  const btVector3 from = LVecBase3_to_btVector3(from_pos);
+  const btVector3 to = LVecBase3_to_btVector3(to_pos);
 
 
   BulletClosestHitRayResult cb(from, to, mask);
   BulletClosestHitRayResult cb(from, to, mask);
   _world->rayTest(from, to, cb);
   _world->rayTest(from, to, cb);
@@ -598,13 +598,13 @@ ray_test_closest(const LPoint3f &from_pos, const LPoint3f &to_pos, const Collide
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 BulletAllHitsRayResult BulletWorld::
 BulletAllHitsRayResult BulletWorld::
-ray_test_all(const LPoint3f &from_pos, const LPoint3f &to_pos, const CollideMask &mask) const {
+ray_test_all(const LPoint3 &from_pos, const LPoint3 &to_pos, const CollideMask &mask) const {
 
 
   nassertr(!from_pos.is_nan(), BulletAllHitsRayResult::empty());
   nassertr(!from_pos.is_nan(), BulletAllHitsRayResult::empty());
   nassertr(!to_pos.is_nan(), BulletAllHitsRayResult::empty());
   nassertr(!to_pos.is_nan(), BulletAllHitsRayResult::empty());
 
 
-  const btVector3 from = LVecBase3f_to_btVector3(from_pos);
-  const btVector3 to = LVecBase3f_to_btVector3(to_pos);
+  const btVector3 from = LVecBase3_to_btVector3(from_pos);
+  const btVector3 to = LVecBase3_to_btVector3(to_pos);
 
 
   BulletAllHitsRayResult cb(from, to, mask);
   BulletAllHitsRayResult cb(from, to, mask);
   _world->rayTest(from, to, cb);
   _world->rayTest(from, to, cb);
@@ -617,7 +617,7 @@ ray_test_all(const LPoint3f &from_pos, const LPoint3f &to_pos, const CollideMask
 //  Description:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 BulletClosestHitSweepResult BulletWorld::
 BulletClosestHitSweepResult BulletWorld::
-sweep_test_closest(BulletShape *shape, const TransformState &from_ts, const TransformState &to_ts, const CollideMask &mask, float penetration) const {
+sweep_test_closest(BulletShape *shape, const TransformState &from_ts, const TransformState &to_ts, const CollideMask &mask, PN_stdfloat penetration) const {
 
 
   nassertr(shape, BulletClosestHitSweepResult::empty());
   nassertr(shape, BulletClosestHitSweepResult::empty());
   nassertr(shape->is_convex(), BulletClosestHitSweepResult::empty());
   nassertr(shape->is_convex(), BulletClosestHitSweepResult::empty());
@@ -625,10 +625,10 @@ sweep_test_closest(BulletShape *shape, const TransformState &from_ts, const Tran
   nassertr(!to_ts.is_invalid(), BulletClosestHitSweepResult::empty());
   nassertr(!to_ts.is_invalid(), BulletClosestHitSweepResult::empty());
 
 
   const btConvexShape *convex = (const btConvexShape *) shape->ptr();
   const btConvexShape *convex = (const btConvexShape *) shape->ptr();
-  const btVector3 from_pos = LVecBase3f_to_btVector3(from_ts.get_pos());
-  const btVector3 to_pos = LVecBase3f_to_btVector3(to_ts.get_pos());
-  const btTransform from_trans = LMatrix4f_to_btTrans(from_ts.get_mat());
-  const btTransform to_trans = LMatrix4f_to_btTrans(to_ts.get_mat());
+  const btVector3 from_pos = LVecBase3_to_btVector3(from_ts.get_pos());
+  const btVector3 to_pos = LVecBase3_to_btVector3(to_ts.get_pos());
+  const btTransform from_trans = LMatrix4_to_btTrans(from_ts.get_mat());
+  const btTransform to_trans = LMatrix4_to_btTrans(to_ts.get_mat());
 
 
   BulletClosestHitSweepResult cb(from_pos, to_pos, mask);
   BulletClosestHitSweepResult cb(from_pos, to_pos, mask);
   _world->convexSweepTest(convex, from_trans, to_trans, cb, penetration);
   _world->convexSweepTest(convex, from_trans, to_trans, cb, penetration);

+ 10 - 10
panda/src/bullet/bulletWorld.h

@@ -52,11 +52,11 @@ PUBLISHED:
   BulletWorld();
   BulletWorld();
   INLINE ~BulletWorld();
   INLINE ~BulletWorld();
 
 
-  void set_gravity(const LVector3f &gravity);
-  void set_gravity(float gx, float gy, float gz);
-  const LVector3f get_gravity() const;
+  void set_gravity(const LVector3 &gravity);
+  void set_gravity(PN_stdfloat gx, PN_stdfloat gy, PN_stdfloat gz);
+  const LVector3 get_gravity() const;
 
 
-  void do_physics(float dt, int substeps=1, float stepsize=1.0f/60.0f);
+  void do_physics(PN_stdfloat dt, int substeps=1, PN_stdfloat stepsize=1.0f/60.0f);
 
 
   void set_debug_node(BulletDebugNode *node);
   void set_debug_node(BulletDebugNode *node);
   void clear_debug_node();
   void clear_debug_node();
@@ -113,13 +113,13 @@ PUBLISHED:
 
 
   // Raycast and other queries
   // Raycast and other queries
   BulletClosestHitRayResult ray_test_closest(
   BulletClosestHitRayResult ray_test_closest(
-    const LPoint3f &from_pos,
-    const LPoint3f &to_pos,
+    const LPoint3 &from_pos,
+    const LPoint3 &to_pos,
     const CollideMask &mask=CollideMask::all_on()) const;
     const CollideMask &mask=CollideMask::all_on()) const;
 
 
   BulletAllHitsRayResult ray_test_all(
   BulletAllHitsRayResult ray_test_all(
-    const LPoint3f &from_pos,
-    const LPoint3f &to_pos,
+    const LPoint3 &from_pos,
+    const LPoint3 &to_pos,
     const CollideMask &mask=CollideMask::all_on()) const;
     const CollideMask &mask=CollideMask::all_on()) const;
 
 
   BulletClosestHitSweepResult sweep_test_closest(
   BulletClosestHitSweepResult sweep_test_closest(
@@ -127,7 +127,7 @@ PUBLISHED:
     const TransformState &from_ts,
     const TransformState &from_ts,
     const TransformState &to_ts,
     const TransformState &to_ts,
     const CollideMask &mask=CollideMask::all_on(),
     const CollideMask &mask=CollideMask::all_on(),
-    float penetration=0.0f) const;
+    PN_stdfloat penetration=0.0f) const;
 
 
   BulletContactResult contact_test(PandaNode *node) const;
   BulletContactResult contact_test(PandaNode *node) const;
   BulletContactResult contact_test_pair(PandaNode *node0, PandaNode *node1) const;
   BulletContactResult contact_test_pair(PandaNode *node0, PandaNode *node1) const;
@@ -151,7 +151,7 @@ public:
   INLINE btDispatcher *get_dispatcher() const;
   INLINE btDispatcher *get_dispatcher() const;
 
 
 private:
 private:
-  void sync_p2b(float dt);
+  void sync_p2b(PN_stdfloat dt);
   void sync_b2p();
   void sync_b2p();
 
 
   typedef PTA(PT(BulletRigidBodyNode)) BulletRigidBodies;
   typedef PTA(PT(BulletRigidBodyNode)) BulletRigidBodies;

+ 62 - 48
panda/src/bullet/bullet_utils.cxx

@@ -17,118 +17,132 @@
 #include "transformState.h"
 #include "transformState.h"
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-//     Function: LVecBase3f_to_btVector3
+//     Function: LVecBase3_to_btVector3
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-btVector3 LVecBase3f_to_btVector3(const LVecBase3f &v) {
+btVector3 LVecBase3_to_btVector3(const LVecBase3 &v) {
 
 
-  return btVector3(v.get_x(), v.get_y(), v.get_z());
+  return btVector3((btScalar)v.get_x(),
+                   (btScalar)v.get_y(),
+                   (btScalar)v.get_z());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-//     Function: btVector3_to_LVecBase3f
+//     Function: btVector3_to_LVecBase3
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVecBase3f btVector3_to_LVecBase3f(const btVector3 &v) {
+LVecBase3 btVector3_to_LVecBase3(const btVector3 &v) {
 
 
-  return LVecBase3f(v.getX(), v.getY(), v.getZ());
+  return LVecBase3((PN_stdfloat)v.getX(),
+                   (PN_stdfloat)v.getY(),
+                   (PN_stdfloat)v.getZ());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-//     Function: btVector3_to_LVector3f
+//     Function: btVector3_to_LVector3
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LVector3f btVector3_to_LVector3f(const btVector3 &v) {
+LVector3 btVector3_to_LVector3(const btVector3 &v) {
 
 
-  return LVector3f(v.getX(), v.getY(), v.getZ());
+  return LVector3((PN_stdfloat)v.getX(),
+                  (PN_stdfloat)v.getY(),
+                  (PN_stdfloat)v.getZ());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-//     Function: btVector3_to_LPoint3f
+//     Function: btVector3_to_LPoint3
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LPoint3f btVector3_to_LPoint3f(const btVector3 &p) {
+LPoint3 btVector3_to_LPoint3(const btVector3 &p) {
 
 
-  return LPoint3f(p.getX(), p.getY(), p.getZ());
+  return LPoint3((PN_stdfloat)p.getX(),
+                 (PN_stdfloat)p.getY(),
+                 (PN_stdfloat)p.getZ());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-//     Function: LMatrix3f_to_btMatrix3x3
+//     Function: LMatrix3_to_btMatrix3x3
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-btMatrix3x3 LMatrix3f_to_btMatrix3x3(const LMatrix3f &m) {
+btMatrix3x3 LMatrix3_to_btMatrix3x3(const LMatrix3 &m) {
 
 
   btMatrix3x3 result;
   btMatrix3x3 result;
-  result.setFromOpenGLSubMatrix(m.get_data());
+  result.setFromOpenGLSubMatrix((const btScalar *)m.get_data());
   return result;
   return result;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-//     Function: btMatrix3x3_to_LMatrix3f
+//     Function: btMatrix3x3_to_LMatrix3
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LMatrix3f btMatrix3x3_to_LMatrix3f(const btMatrix3x3 &m) {
+LMatrix3 btMatrix3x3_to_LMatrix3(const btMatrix3x3 &m) {
 
 
-  float cells[9];
+  btScalar cells[9];
   m.getOpenGLSubMatrix(cells);
   m.getOpenGLSubMatrix(cells);
-  return LMatrix3f(cells[0], cells[1], cells[2],
-                   cells[3], cells[4], cells[5],
-                   cells[6], cells[7], cells[8]);
+  return LMatrix3((PN_stdfloat)cells[0], (PN_stdfloat)cells[1], (PN_stdfloat)cells[2],
+                  (PN_stdfloat)cells[3], (PN_stdfloat)cells[4], (PN_stdfloat)cells[5],
+                  (PN_stdfloat)cells[6], (PN_stdfloat)cells[7], (PN_stdfloat)cells[8]);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-//     Function: LQuaternionf_to_btQuat
+//     Function: LQuaternion_to_btQuat
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-btQuaternion LQuaternionf_to_btQuat(const LQuaternionf &q) {
+btQuaternion LQuaternion_to_btQuat(const LQuaternion &q) {
 
 
-  return btQuaternion(q.get_i(), q.get_j(), q.get_k(), q.get_r());
+  return btQuaternion((btScalar)q.get_i(),
+                      (btScalar)q.get_j(),
+                      (btScalar)q.get_k(),
+                      (btScalar)q.get_r());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-//     Function: btQuat_to_LQuaternionf
+//     Function: btQuat_to_LQuaternion
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LQuaternionf btQuat_to_LQuaternionf(const btQuaternion &q) {
+LQuaternion btQuat_to_LQuaternion(const btQuaternion &q) {
 
 
-  return LQuaternionf(q.getW(), q.getX(), q.getY(), q.getZ());
+  return LQuaternion((PN_stdfloat)q.getW(),
+                     (PN_stdfloat)q.getX(),
+                     (PN_stdfloat)q.getY(),
+                     (PN_stdfloat)q.getZ());
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-//     Function: LMatrix4f_to_btTrans
+//     Function: LMatrix4_to_btTrans
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-btTransform LMatrix4f_to_btTrans(const LMatrix4f &m) {
+btTransform LMatrix4_to_btTrans(const LMatrix4 &m) {
 
 
-  LQuaternionf quat;
+  LQuaternion quat;
   quat.set_from_matrix(m.get_upper_3());
   quat.set_from_matrix(m.get_upper_3());
 
 
-  btQuaternion btq = LQuaternionf_to_btQuat(quat);
-  btVector3 btv = LVecBase3f_to_btVector3(m.get_row3(3));
+  btQuaternion btq = LQuaternion_to_btQuat(quat);
+  btVector3 btv = LVecBase3_to_btVector3(m.get_row3(3));
 
 
   return btTransform(btq, btv);
   return btTransform(btq, btv);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-//     Function: btTrans_to_LMatrix4f
+//     Function: btTrans_to_LMatrix4
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-LMatrix4f btTrans_to_LMatrix4f(const btTransform &trans) {
+LMatrix4 btTrans_to_LMatrix4(const btTransform &trans) {
 
 
   return TransformState::make_pos_quat_scale(
   return TransformState::make_pos_quat_scale(
-    btVector3_to_LVector3f(trans.getOrigin()),
-    btQuat_to_LQuaternionf(trans.getRotation()),
-    LVector3f(1.0f, 1.0f, 1.0f))->get_mat();
+    btVector3_to_LVector3(trans.getOrigin()),
+    btQuat_to_LQuaternion(trans.getRotation()),
+    LVector3(1.0f, 1.0f, 1.0f))->get_mat();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: btTrans_to_TransformState
 //     Function: btTrans_to_TransformState
 //  Description: 
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-CPT(TransformState) btTrans_to_TransformState(const btTransform &trans, const LVecBase3f &scale) {
+CPT(TransformState) btTrans_to_TransformState(const btTransform &trans, const LVecBase3 &scale) {
 
 
-  LVecBase3f pos = btVector3_to_LVector3f(trans.getOrigin());
-  LQuaternionf quat = btQuat_to_LQuaternionf(trans.getRotation());
+  LVecBase3 pos = btVector3_to_LVector3(trans.getOrigin());
+  LQuaternion quat = btQuat_to_LQuaternion(trans.getRotation());
 
 
   return TransformState::make_pos_quat_scale(pos, quat, scale);
   return TransformState::make_pos_quat_scale(pos, quat, scale);
 }
 }
@@ -141,13 +155,13 @@ btTransform TransformState_to_btTrans(CPT(TransformState) ts) {
 
 
   ts = ts->set_scale(1.0);
   ts = ts->set_scale(1.0);
 
 
-  LMatrix4f m = ts->get_mat();
+  LMatrix4 m = ts->get_mat();
 
 
-  LQuaternionf quat;
+  LQuaternion quat;
   quat.set_from_matrix(m.get_upper_3());
   quat.set_from_matrix(m.get_upper_3());
 
 
-  btQuaternion btq = LQuaternionf_to_btQuat(quat);
-  btVector3 btv = LVecBase3f_to_btVector3(m.get_row3(3));
+  btQuaternion btq = LQuaternion_to_btQuat(quat);
+  btVector3 btv = LVecBase3_to_btVector3(m.get_row3(3));
 
 
   return btTransform(btq, btv);
   return btTransform(btq, btv);
 }
 }
@@ -193,13 +207,13 @@ void get_node_transform(btTransform &trans, PandaNode *node) {
   ts = ts->set_scale(1.0);
   ts = ts->set_scale(1.0);
 
 
   // Convert
   // Convert
-  LMatrix4f m = ts->get_mat();
+  LMatrix4 m = ts->get_mat();
 
 
-  LQuaternionf quat;
+  LQuaternion quat;
   quat.set_from_matrix(m.get_upper_3());
   quat.set_from_matrix(m.get_upper_3());
 
 
-  btQuaternion btq = LQuaternionf_to_btQuat(quat);
-  btVector3 btv = LVecBase3f_to_btVector3(m.get_row3(3));
+  btQuaternion btq = LQuaternion_to_btQuat(quat);
+  btVector3 btv = LVecBase3_to_btVector3(m.get_row3(3));
 
 
   trans.setRotation(btq);
   trans.setRotation(btq);
   trans.setOrigin(btv);
   trans.setOrigin(btv);

+ 11 - 11
panda/src/bullet/bullet_utils.h

@@ -28,22 +28,22 @@
 #include "nodePath.h"
 #include "nodePath.h"
 
 
 // Conversion from Panda3D to Bullet
 // Conversion from Panda3D to Bullet
-EXPCL_PANDABULLET btVector3 LVecBase3f_to_btVector3(const LVecBase3f &v);
-EXPCL_PANDABULLET btMatrix3x3 LMatrix3f_to_btMatrix3x3(const LMatrix3f &m);
-EXPCL_PANDABULLET btTransform LMatrix4f_to_btTrans(const LMatrix4f &m);
-EXPCL_PANDABULLET btQuaternion LQuaternionf_to_btQuat(const LQuaternionf &q);
+EXPCL_PANDABULLET btVector3 LVecBase3_to_btVector3(const LVecBase3 &v);
+EXPCL_PANDABULLET btMatrix3x3 LMatrix3_to_btMatrix3x3(const LMatrix3 &m);
+EXPCL_PANDABULLET btTransform LMatrix4_to_btTrans(const LMatrix4 &m);
+EXPCL_PANDABULLET btQuaternion LQuaternion_to_btQuat(const LQuaternion &q);
 
 
 // Conversion from Bullet to Panda3D
 // Conversion from Bullet to Panda3D
-EXPCL_PANDABULLET LVecBase3f btVector3_to_LVecBase3f(const btVector3 &v);
-EXPCL_PANDABULLET LVector3f btVector3_to_LVector3f(const btVector3 &v);
-EXPCL_PANDABULLET LPoint3f btVector3_to_LPoint3f(const btVector3 &p);
-EXPCL_PANDABULLET LMatrix3f btMatrix3x3_to_LMatrix3f(const btMatrix3x3 &m);
-EXPCL_PANDABULLET LMatrix4f btTrans_to_LMatrix4f(const btTransform &tf);
-EXPCL_PANDABULLET LQuaternionf btQuat_to_LQuaternionf(const btQuaternion &q);
+EXPCL_PANDABULLET LVecBase3 btVector3_to_LVecBase3(const btVector3 &v);
+EXPCL_PANDABULLET LVector3 btVector3_to_LVector3(const btVector3 &v);
+EXPCL_PANDABULLET LPoint3 btVector3_to_LPoint3(const btVector3 &p);
+EXPCL_PANDABULLET LMatrix3 btMatrix3x3_to_LMatrix3(const btMatrix3x3 &m);
+EXPCL_PANDABULLET LMatrix4 btTrans_to_LMatrix4(const btTransform &tf);
+EXPCL_PANDABULLET LQuaternion btQuat_to_LQuaternion(const btQuaternion &q);
 
 
 EXPCL_PANDABULLET CPT(TransformState) btTrans_to_TransformState(
 EXPCL_PANDABULLET CPT(TransformState) btTrans_to_TransformState(
   const btTransform &tf, 
   const btTransform &tf, 
-  const LVecBase3f &scale=LVecBase3f(1.0f, 1.0f, 1.0f));
+  const LVecBase3 &scale=LVecBase3(1.0f, 1.0f, 1.0f));
 
 
 EXPCL_PANDABULLET btTransform TransformState_to_btTrans(
 EXPCL_PANDABULLET btTransform TransformState_to_btTrans(
   CPT(TransformState) ts);
   CPT(TransformState) ts);