Add some private copy-constructors and private assignment operators
This commit is contained in:
parent
9d9142af30
commit
25b6b015b8
@ -96,6 +96,14 @@ class BallAndSocketJoint : public Constraint {
|
|||||||
/// Accumulated impulse
|
/// Accumulated impulse
|
||||||
Vector3 mImpulse;
|
Vector3 mImpulse;
|
||||||
|
|
||||||
|
// -------------------- Methods -------------------- //
|
||||||
|
|
||||||
|
/// Private copy-constructor
|
||||||
|
BallAndSocketJoint(const BallAndSocketJoint& constraint);
|
||||||
|
|
||||||
|
/// Private assignment operator
|
||||||
|
BallAndSocketJoint& operator=(const BallAndSocketJoint& constraint);
|
||||||
|
|
||||||
public :
|
public :
|
||||||
|
|
||||||
// -------------------- Methods -------------------- //
|
// -------------------- Methods -------------------- //
|
||||||
|
@ -108,6 +108,14 @@ class FixedJoint : public Constraint {
|
|||||||
/// Inverse of the initial orientation difference between the two bodies
|
/// Inverse of the initial orientation difference between the two bodies
|
||||||
Quaternion mInitOrientationDifferenceInv;
|
Quaternion mInitOrientationDifferenceInv;
|
||||||
|
|
||||||
|
// -------------------- Methods -------------------- //
|
||||||
|
|
||||||
|
/// Private copy-constructor
|
||||||
|
FixedJoint(const FixedJoint& constraint);
|
||||||
|
|
||||||
|
/// Private assignment operator
|
||||||
|
FixedJoint& operator=(const FixedJoint& constraint);
|
||||||
|
|
||||||
public :
|
public :
|
||||||
|
|
||||||
// -------------------- Methods -------------------- //
|
// -------------------- Methods -------------------- //
|
||||||
|
@ -223,6 +223,12 @@ class HingeJoint : public Constraint {
|
|||||||
|
|
||||||
// -------------------- Methods -------------------- //
|
// -------------------- Methods -------------------- //
|
||||||
|
|
||||||
|
/// Private copy-constructor
|
||||||
|
HingeJoint(const HingeJoint& constraint);
|
||||||
|
|
||||||
|
/// Private assignment operator
|
||||||
|
HingeJoint& operator=(const HingeJoint& constraint);
|
||||||
|
|
||||||
/// Reset the limits
|
/// Reset the limits
|
||||||
void resetLimits();
|
void resetLimits();
|
||||||
|
|
||||||
|
@ -236,6 +236,12 @@ class SliderJoint : public Constraint {
|
|||||||
|
|
||||||
// -------------------- Methods -------------------- //
|
// -------------------- Methods -------------------- //
|
||||||
|
|
||||||
|
/// Private copy-constructor
|
||||||
|
SliderJoint(const SliderJoint& constraint);
|
||||||
|
|
||||||
|
/// Private assignment operator
|
||||||
|
SliderJoint& operator=(const SliderJoint& constraint);
|
||||||
|
|
||||||
/// Reset the limits
|
/// Reset the limits
|
||||||
void resetLimits();
|
void resetLimits();
|
||||||
|
|
||||||
|
@ -37,8 +37,17 @@ namespace reactphysics3d {
|
|||||||
*/
|
*/
|
||||||
struct Impulse {
|
struct Impulse {
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// -------------------- Methods -------------------- //
|
||||||
|
|
||||||
|
/// Private assignment operator
|
||||||
|
Impulse& operator=(const Impulse& impulse);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
// -------------------- Attributes -------------------- //
|
||||||
|
|
||||||
/// Linear impulse applied to the first body
|
/// Linear impulse applied to the first body
|
||||||
const Vector3 linearImpulseBody1;
|
const Vector3 linearImpulseBody1;
|
||||||
|
|
||||||
@ -51,12 +60,25 @@ struct Impulse {
|
|||||||
/// Angular impulse applied to the second body
|
/// Angular impulse applied to the second body
|
||||||
const Vector3 angularImpulseBody2;
|
const Vector3 angularImpulseBody2;
|
||||||
|
|
||||||
/// Constructor
|
// -------------------- Methods -------------------- //
|
||||||
Impulse(const Vector3& linearImpulseBody1, const Vector3& angularImpulseBody1,
|
|
||||||
const Vector3& linearImpulseBody2, const Vector3& angularImpulseBody2)
|
|
||||||
: linearImpulseBody1(linearImpulseBody1), angularImpulseBody1(angularImpulseBody1),
|
|
||||||
linearImpulseBody2(linearImpulseBody2), angularImpulseBody2(angularImpulseBody2) {
|
|
||||||
|
|
||||||
|
/// Constructor
|
||||||
|
Impulse(const Vector3& initLinearImpulseBody1, const Vector3& initAngularImpulseBody1,
|
||||||
|
const Vector3& initLinearImpulseBody2, const Vector3& initAngularImpulseBody2)
|
||||||
|
: linearImpulseBody1(initLinearImpulseBody1),
|
||||||
|
angularImpulseBody1(initAngularImpulseBody1),
|
||||||
|
linearImpulseBody2(initLinearImpulseBody2),
|
||||||
|
angularImpulseBody2(initAngularImpulseBody2) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Copy-constructor
|
||||||
|
Impulse(const Impulse& impulse)
|
||||||
|
: linearImpulseBody1(impulse.linearImpulseBody1),
|
||||||
|
angularImpulseBody1(impulse.angularImpulseBody1),
|
||||||
|
linearImpulseBody2(impulse.linearImpulseBody2),
|
||||||
|
angularImpulseBody2(impulse.angularImpulseBody2) {
|
||||||
|
;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user