|
|
@@ -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));
|
|
|
+}
|
|
|
+
|