From 3345f207b8213cabdfb8f92621e4d4eb5af2105e Mon Sep 17 00:00:00 2001 From: enn0x Date: Wed, 8 Feb 2012 22:22:20 +0000 Subject: [PATCH] Fixed bug in CTOR for BulletCylinderShape, and added copy constructor for all shapes. --- panda/src/bullet/bulletBoxShape.I | 20 ++++++++++++ panda/src/bullet/bulletBoxShape.h | 2 ++ panda/src/bullet/bulletCapsuleShape.I | 20 ++++++++++++ panda/src/bullet/bulletCapsuleShape.h | 2 ++ panda/src/bullet/bulletConeShape.I | 20 ++++++++++++ panda/src/bullet/bulletConeShape.h | 2 ++ panda/src/bullet/bulletConvexHullShape.I | 20 ++++++++++++ panda/src/bullet/bulletConvexHullShape.h | 2 ++ .../src/bullet/bulletConvexPointCloudShape.I | 20 ++++++++++++ .../src/bullet/bulletConvexPointCloudShape.h | 2 ++ panda/src/bullet/bulletCylinderShape.I | 20 ++++++++++++ panda/src/bullet/bulletCylinderShape.cxx | 6 ++-- panda/src/bullet/bulletCylinderShape.h | 4 ++- panda/src/bullet/bulletHeightfieldShape.I | 31 +++++++++++++++++++ panda/src/bullet/bulletHeightfieldShape.cxx | 17 +++++----- panda/src/bullet/bulletHeightfieldShape.h | 4 +++ panda/src/bullet/bulletMultiSphereShape.I | 20 ++++++++++++ panda/src/bullet/bulletMultiSphereShape.h | 2 ++ panda/src/bullet/bulletPlaneShape.I | 20 ++++++++++++ panda/src/bullet/bulletPlaneShape.h | 2 ++ panda/src/bullet/bulletSphereShape.I | 20 ++++++++++++ panda/src/bullet/bulletSphereShape.h | 2 ++ panda/src/bullet/bulletTriangleMeshShape.I | 25 +++++++++++++++ panda/src/bullet/bulletTriangleMeshShape.h | 2 ++ 24 files changed, 273 insertions(+), 12 deletions(-) diff --git a/panda/src/bullet/bulletBoxShape.I b/panda/src/bullet/bulletBoxShape.I index ee3b3b524e..d4dd93669e 100644 --- a/panda/src/bullet/bulletBoxShape.I +++ b/panda/src/bullet/bulletBoxShape.I @@ -24,3 +24,23 @@ INLINE BulletBoxShape:: delete _shape; } +//////////////////////////////////////////////////////////////////// +// Function: BulletBoxShape::Copy Constructor +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE BulletBoxShape:: +BulletBoxShape(const BulletBoxShape ©) : + _shape(copy._shape) { +} + +//////////////////////////////////////////////////////////////////// +// Function: BulletBoxShape::Copy Assignment Operator +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void BulletBoxShape:: +operator = (const BulletBoxShape ©) { + _shape = copy._shape; +} + diff --git a/panda/src/bullet/bulletBoxShape.h b/panda/src/bullet/bulletBoxShape.h index 73602e2c40..90680cbee5 100644 --- a/panda/src/bullet/bulletBoxShape.h +++ b/panda/src/bullet/bulletBoxShape.h @@ -32,6 +32,8 @@ class EXPCL_PANDABULLET BulletBoxShape : public BulletShape { PUBLISHED: BulletBoxShape(const LVecBase3 &halfExtents); + INLINE BulletBoxShape(const BulletBoxShape ©); + INLINE void operator = (const BulletBoxShape ©); INLINE ~BulletBoxShape(); LVecBase3 get_half_extents_without_margin() const; diff --git a/panda/src/bullet/bulletCapsuleShape.I b/panda/src/bullet/bulletCapsuleShape.I index 90e018b7bb..a2f6974b9e 100644 --- a/panda/src/bullet/bulletCapsuleShape.I +++ b/panda/src/bullet/bulletCapsuleShape.I @@ -23,6 +23,26 @@ INLINE BulletCapsuleShape:: delete _shape; } +//////////////////////////////////////////////////////////////////// +// Function: BulletCapsuleShape::Copy Constructor +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE BulletCapsuleShape:: +BulletCapsuleShape(const BulletCapsuleShape ©) : + _shape(copy._shape) { +} + +//////////////////////////////////////////////////////////////////// +// Function: BulletCapsuleShape::Copy Assignment Operator +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void BulletCapsuleShape:: +operator = (const BulletCapsuleShape ©) { + _shape = copy._shape; +} + //////////////////////////////////////////////////////////////////// // Function: BulletCapsuleShape::get_radius // Access: Published diff --git a/panda/src/bullet/bulletCapsuleShape.h b/panda/src/bullet/bulletCapsuleShape.h index 49a93e0470..f3b8cb3d51 100644 --- a/panda/src/bullet/bulletCapsuleShape.h +++ b/panda/src/bullet/bulletCapsuleShape.h @@ -29,6 +29,8 @@ class EXPCL_PANDABULLET BulletCapsuleShape : public BulletShape { PUBLISHED: BulletCapsuleShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up=Z_up); + INLINE BulletCapsuleShape(const BulletCapsuleShape ©); + INLINE void operator = (const BulletCapsuleShape ©); INLINE ~BulletCapsuleShape(); INLINE PN_stdfloat get_radius() const; diff --git a/panda/src/bullet/bulletConeShape.I b/panda/src/bullet/bulletConeShape.I index 8cafef95e2..ae4bf960dc 100644 --- a/panda/src/bullet/bulletConeShape.I +++ b/panda/src/bullet/bulletConeShape.I @@ -23,6 +23,26 @@ INLINE BulletConeShape:: delete _shape; } +//////////////////////////////////////////////////////////////////// +// Function: BulletConeShape::Copy Constructor +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE BulletConeShape:: +BulletConeShape(const BulletConeShape ©) : + _shape(copy._shape) { +} + +//////////////////////////////////////////////////////////////////// +// Function: BulletConeShape::Copy Assignment Operator +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void BulletConeShape:: +operator = (const BulletConeShape ©) { + _shape = copy._shape; +} + //////////////////////////////////////////////////////////////////// // Function: BulletConeShape::get_radius // Access: Published diff --git a/panda/src/bullet/bulletConeShape.h b/panda/src/bullet/bulletConeShape.h index 60d5198517..67c9ba6b97 100644 --- a/panda/src/bullet/bulletConeShape.h +++ b/panda/src/bullet/bulletConeShape.h @@ -29,6 +29,8 @@ class EXPCL_PANDABULLET BulletConeShape : public BulletShape { PUBLISHED: BulletConeShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up=Z_up); + INLINE BulletConeShape(const BulletConeShape ©); + INLINE void operator = (const BulletConeShape ©); INLINE ~BulletConeShape(); INLINE PN_stdfloat get_radius() const; diff --git a/panda/src/bullet/bulletConvexHullShape.I b/panda/src/bullet/bulletConvexHullShape.I index 62e3291b70..42d1b266d1 100644 --- a/panda/src/bullet/bulletConvexHullShape.I +++ b/panda/src/bullet/bulletConvexHullShape.I @@ -23,3 +23,23 @@ INLINE BulletConvexHullShape:: delete _shape; } +//////////////////////////////////////////////////////////////////// +// Function: BulletConvexHullShape::Copy Constructor +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE BulletConvexHullShape:: +BulletConvexHullShape(const BulletConvexHullShape ©) : + _shape(copy._shape) { +} + +//////////////////////////////////////////////////////////////////// +// Function: BulletConvexHullShape::Copy Assignment Operator +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void BulletConvexHullShape:: +operator = (const BulletConvexHullShape ©) { + _shape = copy._shape; +} + diff --git a/panda/src/bullet/bulletConvexHullShape.h b/panda/src/bullet/bulletConvexHullShape.h index a4cd8ae9e3..a168de8e43 100644 --- a/panda/src/bullet/bulletConvexHullShape.h +++ b/panda/src/bullet/bulletConvexHullShape.h @@ -32,6 +32,8 @@ class EXPCL_PANDABULLET BulletConvexHullShape : public BulletShape { PUBLISHED: BulletConvexHullShape(); + INLINE BulletConvexHullShape(const BulletConvexHullShape ©); + INLINE void operator = (const BulletConvexHullShape ©); INLINE ~BulletConvexHullShape(); void add_point(const LPoint3 &p); diff --git a/panda/src/bullet/bulletConvexPointCloudShape.I b/panda/src/bullet/bulletConvexPointCloudShape.I index 78bad86bc8..595b3874ea 100644 --- a/panda/src/bullet/bulletConvexPointCloudShape.I +++ b/panda/src/bullet/bulletConvexPointCloudShape.I @@ -23,6 +23,26 @@ INLINE BulletConvexPointCloudShape:: delete _shape; } +//////////////////////////////////////////////////////////////////// +// Function: BulletConvexPointCloudShape::Copy Constructor +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE BulletConvexPointCloudShape:: +BulletConvexPointCloudShape(const BulletConvexPointCloudShape ©) : + _shape(copy._shape) { +} + +//////////////////////////////////////////////////////////////////// +// Function: BulletConvexPointCloudShape::Copy Assignment Operator +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void BulletConvexPointCloudShape:: +operator = (const BulletConvexPointCloudShape ©) { + _shape = copy._shape; +} + //////////////////////////////////////////////////////////////////// // Function: BulletConvexPointCloudShape::get_num_points // Access: Published diff --git a/panda/src/bullet/bulletConvexPointCloudShape.h b/panda/src/bullet/bulletConvexPointCloudShape.h index 9a68043310..778f823cec 100644 --- a/panda/src/bullet/bulletConvexPointCloudShape.h +++ b/panda/src/bullet/bulletConvexPointCloudShape.h @@ -32,6 +32,8 @@ class EXPCL_PANDABULLET BulletConvexPointCloudShape : public BulletShape { PUBLISHED: BulletConvexPointCloudShape(const PTA_LVecBase3 &points, LVecBase3 scale=LVecBase3(1.)); BulletConvexPointCloudShape(const Geom *geom, LVecBase3 scale=LVecBase3(1.)); + INLINE BulletConvexPointCloudShape(const BulletConvexPointCloudShape ©); + INLINE void operator = (const BulletConvexPointCloudShape ©); INLINE ~BulletConvexPointCloudShape(); INLINE int get_num_points() const; diff --git a/panda/src/bullet/bulletCylinderShape.I b/panda/src/bullet/bulletCylinderShape.I index 9da6a3e386..0acb937300 100644 --- a/panda/src/bullet/bulletCylinderShape.I +++ b/panda/src/bullet/bulletCylinderShape.I @@ -23,6 +23,26 @@ INLINE BulletCylinderShape:: delete _shape; } +//////////////////////////////////////////////////////////////////// +// Function: BulletCylinderShape::Copy Constructor +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE BulletCylinderShape:: +BulletCylinderShape(const BulletCylinderShape ©) : + _shape(copy._shape) { +} + +//////////////////////////////////////////////////////////////////// +// Function: BulletCylinderShape::Copy Assignment Operator +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void BulletCylinderShape:: +operator = (const BulletCylinderShape ©) { + _shape = copy._shape; +} + //////////////////////////////////////////////////////////////////// // Function: BulletCylinderShape::get_radius // Access: Published diff --git a/panda/src/bullet/bulletCylinderShape.cxx b/panda/src/bullet/bulletCylinderShape.cxx index b7245d2e7d..55c9bbd513 100644 --- a/panda/src/bullet/bulletCylinderShape.cxx +++ b/panda/src/bullet/bulletCylinderShape.cxx @@ -54,13 +54,13 @@ BulletCylinderShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up) { switch (up) { case X_up: - _shape = new btCylinderShapeX(btVector3(0.5 * height, radius, 0.0f)); + _shape = new btCylinderShapeX(btVector3(0.5 * height, radius, radius)); break; case Y_up: - _shape = new btCylinderShape(btVector3(radius, 0.5 * height, 0.0f)); + _shape = new btCylinderShape(btVector3(radius, 0.5 * height, radius)); break; case Z_up: - _shape = new btCylinderShapeZ(btVector3(radius, 0.0f, 0.5 * height)); + _shape = new btCylinderShapeZ(btVector3(radius, radius, 0.5 * height)); break; default: bullet_cat.error() << "invalid up-axis:" << up << endl; diff --git a/panda/src/bullet/bulletCylinderShape.h b/panda/src/bullet/bulletCylinderShape.h index 86512b565c..1511466047 100644 --- a/panda/src/bullet/bulletCylinderShape.h +++ b/panda/src/bullet/bulletCylinderShape.h @@ -28,8 +28,10 @@ class EXPCL_PANDABULLET BulletCylinderShape : public BulletShape { PUBLISHED: - BulletCylinderShape(const LVector3 &half_extents, BulletUpAxis up=Z_up); BulletCylinderShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up=Z_up); + BulletCylinderShape(const LVector3 &half_extents, BulletUpAxis up=Z_up); + INLINE BulletCylinderShape(const BulletCylinderShape ©); + INLINE void operator = (const BulletCylinderShape ©); INLINE ~BulletCylinderShape(); INLINE PN_stdfloat get_radius() const; diff --git a/panda/src/bullet/bulletHeightfieldShape.I b/panda/src/bullet/bulletHeightfieldShape.I index c11df5ea1c..6803855a51 100644 --- a/panda/src/bullet/bulletHeightfieldShape.I +++ b/panda/src/bullet/bulletHeightfieldShape.I @@ -24,3 +24,34 @@ INLINE BulletHeightfieldShape:: delete _data; } +//////////////////////////////////////////////////////////////////// +// Function: BulletHeightfieldShape::Copy Constructor +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE BulletHeightfieldShape:: +BulletHeightfieldShape(const BulletHeightfieldShape ©) : + _shape(copy._shape), + _num_rows(copy._num_rows), + _num_cols(copy._num_cols) { + + _data = new float[_num_rows * _num_cols]; + memcpy(_data, copy._data, _num_rows * _num_cols * sizeof(float)); +} + +//////////////////////////////////////////////////////////////////// +// Function: BulletHeightfieldShape::Copy Assignment Operator +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void BulletHeightfieldShape:: +operator = (const BulletHeightfieldShape ©) { + + _shape = copy._shape; + _num_rows = copy._num_rows; + _num_cols = copy._num_cols; + + _data = new float[_num_rows * _num_cols]; + memcpy(_data, copy._data, _num_rows * _num_cols * sizeof(float)); +} + diff --git a/panda/src/bullet/bulletHeightfieldShape.cxx b/panda/src/bullet/bulletHeightfieldShape.cxx index 682e69b67f..3fe13c27fb 100644 --- a/panda/src/bullet/bulletHeightfieldShape.cxx +++ b/panda/src/bullet/bulletHeightfieldShape.cxx @@ -24,19 +24,20 @@ TypeHandle BulletHeightfieldShape::_type_handle; BulletHeightfieldShape:: BulletHeightfieldShape(const PNMImage &image, PN_stdfloat max_height, BulletUpAxis up) { - int num_rows = image.get_x_size(); - int num_columns = image.get_y_size(); + _num_rows = image.get_x_size(); + _num_cols = image.get_y_size(); - _data = new float[num_rows * num_columns]; + _data = new float[_num_rows * _num_cols]; - for (int row=0; row < num_rows; row++) { - for (int column=0; column < num_columns; column++) { - _data[num_columns * row + column] = - max_height * image.get_bright(column, num_columns - row - 1); + for (int row=0; row < _num_rows; row++) { + for (int column=0; column < _num_cols; column++) { + _data[_num_cols * row + column] = + max_height * image.get_bright(column, _num_cols - row - 1); } } - _shape = new btHeightfieldTerrainShape(num_rows, num_columns, + _shape = new btHeightfieldTerrainShape(_num_rows, + _num_cols, _data, max_height, up, diff --git a/panda/src/bullet/bulletHeightfieldShape.h b/panda/src/bullet/bulletHeightfieldShape.h index ab854e284c..25031ab25a 100644 --- a/panda/src/bullet/bulletHeightfieldShape.h +++ b/panda/src/bullet/bulletHeightfieldShape.h @@ -31,6 +31,8 @@ class EXPCL_PANDABULLET BulletHeightfieldShape : public BulletShape { PUBLISHED: BulletHeightfieldShape(const PNMImage &image, PN_stdfloat max_height, BulletUpAxis up=Z_up); + INLINE BulletHeightfieldShape(const BulletHeightfieldShape ©); + INLINE void operator = (const BulletHeightfieldShape ©); INLINE ~BulletHeightfieldShape(); void set_use_diamond_subdivision(bool flag=true); @@ -39,6 +41,8 @@ public: virtual btCollisionShape *ptr() const; private: + int _num_rows; + int _num_cols; float *_data; btHeightfieldTerrainShape *_shape; diff --git a/panda/src/bullet/bulletMultiSphereShape.I b/panda/src/bullet/bulletMultiSphereShape.I index 49087c5b63..2a62c875cd 100644 --- a/panda/src/bullet/bulletMultiSphereShape.I +++ b/panda/src/bullet/bulletMultiSphereShape.I @@ -23,6 +23,26 @@ INLINE BulletMultiSphereShape:: delete _shape; } +//////////////////////////////////////////////////////////////////// +// Function: BulletMultiSphereShape::Copy Constructor +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE BulletMultiSphereShape:: +BulletMultiSphereShape(const BulletMultiSphereShape ©) : + _shape(copy._shape) { +} + +//////////////////////////////////////////////////////////////////// +// Function: BulletMultiSphereShape::Copy Assignment Operator +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void BulletMultiSphereShape:: +operator = (const BulletMultiSphereShape ©) { + _shape = copy._shape; +} + //////////////////////////////////////////////////////////////////// // Function: BulletMultiSphereShape::get_sphere_count // Access: Published diff --git a/panda/src/bullet/bulletMultiSphereShape.h b/panda/src/bullet/bulletMultiSphereShape.h index 676877e125..b826d51232 100644 --- a/panda/src/bullet/bulletMultiSphereShape.h +++ b/panda/src/bullet/bulletMultiSphereShape.h @@ -31,6 +31,8 @@ class EXPCL_PANDABULLET BulletMultiSphereShape : public BulletShape { PUBLISHED: BulletMultiSphereShape(const PTA_LVecBase3 &points, const PTA_stdfloat &radii); + INLINE BulletMultiSphereShape(const BulletMultiSphereShape ©); + INLINE void operator = (const BulletMultiSphereShape ©); INLINE ~BulletMultiSphereShape(); INLINE int get_sphere_count() const; diff --git a/panda/src/bullet/bulletPlaneShape.I b/panda/src/bullet/bulletPlaneShape.I index 751b2c402c..9675702977 100644 --- a/panda/src/bullet/bulletPlaneShape.I +++ b/panda/src/bullet/bulletPlaneShape.I @@ -23,6 +23,26 @@ INLINE BulletPlaneShape:: delete _shape; } +//////////////////////////////////////////////////////////////////// +// Function: BulletPlaneShape::Copy Constructor +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE BulletPlaneShape:: +BulletPlaneShape(const BulletPlaneShape ©) : + _shape(copy._shape) { +} + +//////////////////////////////////////////////////////////////////// +// Function: BulletPlaneShape::Copy Assignment Operator +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void BulletPlaneShape:: +operator = (const BulletPlaneShape ©) { + _shape = copy._shape; +} + //////////////////////////////////////////////////////////////////// // Function: BulletPlaneShape::get_plane_constant // Access: Published diff --git a/panda/src/bullet/bulletPlaneShape.h b/panda/src/bullet/bulletPlaneShape.h index 5fe70e4a10..0cff63d341 100644 --- a/panda/src/bullet/bulletPlaneShape.h +++ b/panda/src/bullet/bulletPlaneShape.h @@ -32,6 +32,8 @@ class EXPCL_PANDABULLET BulletPlaneShape : public BulletShape { PUBLISHED: BulletPlaneShape(const LVector3 &normal, PN_stdfloat constant); + INLINE BulletPlaneShape(const BulletPlaneShape ©); + INLINE void operator = (const BulletPlaneShape ©); INLINE ~BulletPlaneShape(); INLINE LVector3 get_plane_normal() const; diff --git a/panda/src/bullet/bulletSphereShape.I b/panda/src/bullet/bulletSphereShape.I index d06804eef5..117136c62e 100644 --- a/panda/src/bullet/bulletSphereShape.I +++ b/panda/src/bullet/bulletSphereShape.I @@ -23,6 +23,26 @@ INLINE BulletSphereShape:: delete _shape; } +//////////////////////////////////////////////////////////////////// +// Function: BulletSphereShape::Copy Constructor +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE BulletSphereShape:: +BulletSphereShape(const BulletSphereShape ©) : + _shape(copy._shape) { +} + +//////////////////////////////////////////////////////////////////// +// Function: BulletSphereShape::Copy Assignment Operator +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void BulletSphereShape:: +operator = (const BulletSphereShape ©) { + _shape = copy._shape; +} + //////////////////////////////////////////////////////////////////// // Function: BulletSphereShape::get_radius // Access: Published diff --git a/panda/src/bullet/bulletSphereShape.h b/panda/src/bullet/bulletSphereShape.h index 32a6eb4597..9bebd1d24d 100644 --- a/panda/src/bullet/bulletSphereShape.h +++ b/panda/src/bullet/bulletSphereShape.h @@ -31,6 +31,8 @@ class EXPCL_PANDABULLET BulletSphereShape : public BulletShape { PUBLISHED: BulletSphereShape(PN_stdfloat radius); + INLINE BulletSphereShape(const BulletSphereShape ©); + INLINE void operator = (const BulletSphereShape ©); INLINE ~BulletSphereShape(); INLINE PN_stdfloat get_radius() const; diff --git a/panda/src/bullet/bulletTriangleMeshShape.I b/panda/src/bullet/bulletTriangleMeshShape.I index fed85746ef..136812d100 100644 --- a/panda/src/bullet/bulletTriangleMeshShape.I +++ b/panda/src/bullet/bulletTriangleMeshShape.I @@ -12,6 +12,31 @@ // //////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////// +// Function: BulletTriangleMeshShape::Copy Constructor +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE BulletTriangleMeshShape:: +BulletTriangleMeshShape(const BulletTriangleMeshShape ©) : + _bvh_shape(copy._bvh_shape), + _gimpact_shape(copy._gimpact_shape), + _mesh(copy._mesh) { +} + +//////////////////////////////////////////////////////////////////// +// Function: BulletTriangleMeshShape::Copy Assignment Operator +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void BulletTriangleMeshShape:: +operator = (const BulletTriangleMeshShape ©) { + + _bvh_shape = copy._bvh_shape; + _gimpact_shape = copy._gimpact_shape; + _mesh = copy._mesh; +} + //////////////////////////////////////////////////////////////////// // Function: BulletTriangleMeshShape::Destructor // Access: Published diff --git a/panda/src/bullet/bulletTriangleMeshShape.h b/panda/src/bullet/bulletTriangleMeshShape.h index 57cc7ff51d..31049c2606 100644 --- a/panda/src/bullet/bulletTriangleMeshShape.h +++ b/panda/src/bullet/bulletTriangleMeshShape.h @@ -32,6 +32,8 @@ class EXPCL_PANDABULLET BulletTriangleMeshShape : public BulletShape { PUBLISHED: BulletTriangleMeshShape(BulletTriangleMesh *mesh, bool dynamic, bool compress=true, bool bvh=true); + INLINE BulletTriangleMeshShape(const BulletTriangleMeshShape ©); + INLINE void operator = (const BulletTriangleMeshShape ©); INLINE ~BulletTriangleMeshShape(); void refit_tree(const LPoint3 &aabb_min, const LPoint3 &aabb_max);