mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
no longer pass-by-reference to get LVecBase3f values, also add parallel LVecBase3f functionality
This commit is contained in:
parent
6bbea6261c
commit
2844614e24
@ -26,6 +26,11 @@ set_axis(int anum, int rel, dReal x, dReal y, dReal z) {
|
||||
dJointSetAMotorAxis(_id, anum, rel, x, y, z);
|
||||
}
|
||||
|
||||
INLINE void OdeAMotorJoint::
|
||||
set_axis(int anum, int rel, const LVecBase3f &axis) {
|
||||
dJointSetAMotorAxis(_id, anum, rel, axis[0], axis[1], axis[2]);
|
||||
}
|
||||
|
||||
INLINE void OdeAMotorJoint::
|
||||
set_angle(int anum, dReal angle) {
|
||||
dJointSetAMotorAngle(_id, anum, angle);
|
||||
|
@ -26,6 +26,7 @@ PUBLISHED:
|
||||
|
||||
INLINE void set_num_axes(int num);
|
||||
INLINE void set_axis(int anum, int rel, dReal x, dReal y, dReal z);
|
||||
INLINE void set_axis(int anum, int rel, const LVecBase3f &axis);
|
||||
INLINE void set_angle(int anum, dReal angle);
|
||||
INLINE void set_mode(int mode);
|
||||
INLINE void add_torques(dReal torque1, dReal torque2, dReal torque3);
|
||||
|
@ -21,17 +21,31 @@ set_anchor(dReal x, dReal y, dReal z) {
|
||||
dJointSetBallAnchor(_id, x, y, z);
|
||||
}
|
||||
|
||||
INLINE void OdeBallJoint::
|
||||
set_anchor(const LVecBase3f &anchor) {
|
||||
dJointSetBallAnchor(_id, anchor[0], anchor[1], anchor[2]);
|
||||
}
|
||||
|
||||
INLINE void OdeBallJoint::
|
||||
set_anchor2(dReal x, dReal y, dReal z) {
|
||||
dJointSetBallAnchor2(_id, x, y, z);
|
||||
}
|
||||
|
||||
INLINE void OdeBallJoint::
|
||||
get_anchor(dVector3 result) const {
|
||||
return dJointGetBallAnchor(_id, result);
|
||||
set_anchor2(const LVecBase3f &anchor) {
|
||||
dJointSetBallAnchor2(_id, anchor[0], anchor[1], anchor[2]);
|
||||
}
|
||||
|
||||
INLINE void OdeBallJoint::
|
||||
get_anchor2(dVector3 result) const {
|
||||
return dJointGetBallAnchor2(_id, result);
|
||||
INLINE LVecBase3f OdeBallJoint::
|
||||
get_anchor() const {
|
||||
dVector3 result;
|
||||
dJointGetBallAnchor(_id, result);
|
||||
return LVecBase3f(result[0], result[1], result[2]);
|
||||
}
|
||||
|
||||
INLINE LVecBase3f OdeBallJoint::
|
||||
get_anchor2() const {
|
||||
dVector3 result;
|
||||
dJointGetBallAnchor2(_id, result);
|
||||
return LVecBase3f(result[0], result[1], result[2]);
|
||||
}
|
||||
|
@ -25,10 +25,12 @@ PUBLISHED:
|
||||
virtual ~OdeBallJoint();
|
||||
|
||||
INLINE void set_anchor(dReal x, dReal y, dReal z);
|
||||
INLINE void set_anchor(const LVecBase3f &anchor);
|
||||
INLINE void set_anchor2(dReal x, dReal y, dReal z);
|
||||
INLINE void set_anchor2(const LVecBase3f &anchor);
|
||||
|
||||
INLINE void get_anchor(dVector3 result) const;
|
||||
INLINE void get_anchor2(dVector3 result) const;
|
||||
INLINE LVecBase3f get_anchor() const;
|
||||
INLINE LVecBase3f get_anchor2() const;
|
||||
|
||||
public:
|
||||
static TypeHandle get_class_type() {
|
||||
|
@ -22,16 +22,31 @@ set_anchor(dReal x, dReal y, dReal z) {
|
||||
dJointSetHinge2Anchor(_id, x, y, z);
|
||||
}
|
||||
|
||||
INLINE void OdeHinge2Joint::
|
||||
set_anchor(const LVecBase3f &anchor) {
|
||||
dJointSetHinge2Anchor(_id, anchor[0], anchor[1], anchor[2]);
|
||||
}
|
||||
|
||||
INLINE void OdeHinge2Joint::
|
||||
set_axis1(dReal x, dReal y, dReal z) {
|
||||
dJointSetHinge2Axis1(_id, x, y, z);
|
||||
}
|
||||
|
||||
INLINE void OdeHinge2Joint::
|
||||
set_axis1(const LVecBase3f &axis) {
|
||||
dJointSetHinge2Axis1(_id, axis[0], axis[1], axis[2]);
|
||||
}
|
||||
|
||||
INLINE void OdeHinge2Joint::
|
||||
set_axis2(dReal x, dReal y, dReal z) {
|
||||
dJointSetHinge2Axis2(_id, x, y, z);
|
||||
}
|
||||
|
||||
INLINE void OdeHinge2Joint::
|
||||
set_axis2(const LVecBase3f &axis) {
|
||||
dJointSetHinge2Axis2(_id, axis[0], axis[1], axis[2]);
|
||||
}
|
||||
|
||||
INLINE void OdeHinge2Joint::
|
||||
add_torques(dReal torque1, dReal torque2) {
|
||||
dJointAddHinge2Torques(_id, torque1, torque2);
|
||||
|
@ -25,8 +25,11 @@ PUBLISHED:
|
||||
virtual ~OdeHinge2Joint();
|
||||
|
||||
INLINE void set_anchor(dReal x, dReal y, dReal z);
|
||||
INLINE void set_anchor(const LVecBase3f &anchor);
|
||||
INLINE void set_axis1(dReal x, dReal y, dReal z);
|
||||
INLINE void set_axis1(const LVecBase3f &axis);
|
||||
INLINE void set_axis2(dReal x, dReal y, dReal z);
|
||||
INLINE void set_axis2(const LVecBase3f &axis);
|
||||
INLINE void add_torques(dReal torque1, dReal torque2);
|
||||
|
||||
INLINE LVecBase3f get_anchor() const;
|
||||
|
@ -21,16 +21,31 @@ set_anchor(dReal x, dReal y, dReal z) {
|
||||
dJointSetHingeAnchor(_id, x, y, z);
|
||||
}
|
||||
|
||||
INLINE void OdeHingeJoint::
|
||||
set_anchor(const LVecBase3f &anchor) {
|
||||
dJointSetHingeAnchor(_id, anchor[0], anchor[1], anchor[2]);
|
||||
}
|
||||
|
||||
INLINE void OdeHingeJoint::
|
||||
set_anchor_delta(dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az) {
|
||||
dJointSetHingeAnchorDelta(_id, x, y, z, ax, ay, az);
|
||||
}
|
||||
|
||||
INLINE void OdeHingeJoint::
|
||||
set_anchor_delta(const LVecBase3f &anchor, const LVecBase3f &vec) {
|
||||
dJointSetHingeAnchorDelta(_id, anchor[0], anchor[1], anchor[2], vec[0], vec[1], vec[2]);
|
||||
}
|
||||
|
||||
INLINE void OdeHingeJoint::
|
||||
set_axis(dReal x, dReal y, dReal z) {
|
||||
dJointSetHingeAxis(_id, x, y, z);
|
||||
}
|
||||
|
||||
INLINE void OdeHingeJoint::
|
||||
set_axis(const LVecBase3f &axis) {
|
||||
dJointSetHingeAxis(_id, axis[0], axis[1], axis[2]);
|
||||
}
|
||||
|
||||
INLINE void OdeHingeJoint::
|
||||
add_torque(dReal torque) {
|
||||
dJointAddHingeTorque(_id, torque);
|
||||
|
@ -24,8 +24,11 @@ PUBLISHED:
|
||||
virtual ~OdeHingeJoint();
|
||||
|
||||
INLINE void set_anchor(dReal x, dReal y, dReal z);
|
||||
INLINE void set_anchor(const LVecBase3f &anchor);
|
||||
INLINE void set_anchor_delta(dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az);
|
||||
INLINE void set_anchor_delta(const LVecBase3f &anchor, const LVecBase3f &vec);
|
||||
INLINE void set_axis(dReal x, dReal y, dReal z);
|
||||
INLINE void set_axis(const LVecBase3f &axis);
|
||||
INLINE void add_torque(dReal torque);
|
||||
|
||||
INLINE LVecBase3f get_anchor() const;
|
||||
|
@ -27,6 +27,11 @@ set_axis(int anum, int rel, dReal x, dReal y, dReal z) {
|
||||
dJointSetLMotorAxis(_id, anum, rel, x, y, z);
|
||||
}
|
||||
|
||||
INLINE void OdeLMotorJoint::
|
||||
set_axis(int anum, int rel, const LVecBase3f &axis) {
|
||||
dJointSetLMotorAxis(_id, anum, rel, axis[0], axis[1], axis[2]);
|
||||
}
|
||||
|
||||
INLINE void OdeLMotorJoint::
|
||||
set_param(int parameter, dReal value) {
|
||||
dJointSetLMotorParam(_id, parameter, value);
|
||||
@ -37,9 +42,11 @@ get_num_axes() const {
|
||||
return dJointGetLMotorNumAxes(_id);
|
||||
}
|
||||
|
||||
INLINE void OdeLMotorJoint::
|
||||
get_axis(int anum, dVector3 result) const {
|
||||
return dJointGetLMotorAxis(_id, anum, result);
|
||||
INLINE LVecBase3f OdeLMotorJoint::
|
||||
get_axis(int anum) const {
|
||||
dVector3 result;
|
||||
dJointGetLMotorAxis(_id, anum, result);
|
||||
return LVecBase3f(result[0], result[1], result[2]);
|
||||
}
|
||||
|
||||
INLINE dReal OdeLMotorJoint::
|
||||
|
@ -25,10 +25,11 @@ PUBLISHED:
|
||||
|
||||
INLINE void set_num_axes(int num);
|
||||
INLINE void set_axis(int anum, int rel, dReal x, dReal y, dReal z);
|
||||
INLINE void set_axis(int anum, int rel, const LVecBase3f &axis);
|
||||
INLINE void set_param(int parameter, dReal value);
|
||||
|
||||
INLINE int get_num_axes() const;
|
||||
INLINE void get_axis(int anum, dVector3 result) const;
|
||||
INLINE LVecBase3f get_axis(int anum) const;
|
||||
INLINE dReal get_param(int parameter) const;
|
||||
|
||||
public:
|
||||
|
@ -21,11 +21,21 @@ set_axis(dReal x, dReal y, dReal z) {
|
||||
dJointSetSliderAxis(_id, x, y, z);
|
||||
}
|
||||
|
||||
INLINE void OdeSliderJoint::
|
||||
set_axis(const LVecBase3f &axis) {
|
||||
dJointSetSliderAxis(_id, axis[0], axis[1], axis[2]);
|
||||
}
|
||||
|
||||
INLINE void OdeSliderJoint::
|
||||
set_axis_delta(dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az) {
|
||||
dJointSetSliderAxisDelta(_id, x, y, z, ax, ay, az);
|
||||
}
|
||||
|
||||
INLINE void OdeSliderJoint::
|
||||
set_axis_delta(const LVecBase3f &axis, const LVecBase3f &vec) {
|
||||
dJointSetSliderAxisDelta(_id, axis[0], axis[1], axis[2], vec[0], vec[1], vec[2]);
|
||||
}
|
||||
|
||||
INLINE void OdeSliderJoint::
|
||||
add_force(dReal force) {
|
||||
dJointAddSliderForce(_id, force);
|
||||
@ -41,9 +51,11 @@ get_position_rate() const {
|
||||
return dJointGetSliderPositionRate(_id);
|
||||
}
|
||||
|
||||
INLINE void OdeSliderJoint::
|
||||
get_axis(dVector3 result) const {
|
||||
return dJointGetSliderAxis(_id, result);
|
||||
INLINE LVecBase3f OdeSliderJoint::
|
||||
get_axis() const {
|
||||
dVector3 result;
|
||||
dJointGetSliderAxis(_id, result);
|
||||
return LVecBase3f(result[0], result[1], result[2]);
|
||||
}
|
||||
|
||||
INLINE void OdeSliderJoint::
|
||||
|
@ -24,12 +24,14 @@ PUBLISHED:
|
||||
virtual ~OdeSliderJoint();
|
||||
|
||||
INLINE void set_axis(dReal x, dReal y, dReal z);
|
||||
INLINE void set_axis(const LVecBase3f &axis);
|
||||
INLINE void set_axis_delta(dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az);
|
||||
INLINE void set_axis_delta(const LVecBase3f &axis, const LVecBase3f &vec);
|
||||
INLINE void add_force(dReal force);
|
||||
|
||||
INLINE dReal get_position() const;
|
||||
INLINE dReal get_position_rate() const;
|
||||
INLINE void get_axis(dVector3 result) const;
|
||||
INLINE LVecBase3f get_axis() const;
|
||||
|
||||
INLINE void set_param_lo_stop(dReal val);
|
||||
INLINE void set_param_hi_stop(dReal val);
|
||||
|
@ -21,16 +21,31 @@ set_anchor(dReal x, dReal y, dReal z) {
|
||||
dJointSetUniversalAnchor(_id, x, y, z);
|
||||
}
|
||||
|
||||
INLINE void OdeUniversalJoint::
|
||||
set_anchor(const LVecBase3f &anchor) {
|
||||
dJointSetUniversalAnchor(_id, anchor[0], anchor[1], anchor[2]);
|
||||
}
|
||||
|
||||
INLINE void OdeUniversalJoint::
|
||||
set_axis1(dReal x, dReal y, dReal z) {
|
||||
dJointSetUniversalAxis1(_id, x, y, z);
|
||||
}
|
||||
|
||||
INLINE void OdeUniversalJoint::
|
||||
set_axis1(const LVecBase3f &axis) {
|
||||
dJointSetUniversalAxis1(_id, axis[0], axis[1], axis[2]);
|
||||
}
|
||||
|
||||
INLINE void OdeUniversalJoint::
|
||||
set_axis2(dReal x, dReal y, dReal z) {
|
||||
dJointSetUniversalAxis2(_id, x, y, z);
|
||||
}
|
||||
|
||||
INLINE void OdeUniversalJoint::
|
||||
set_axis2(const LVecBase3f &axis) {
|
||||
dJointSetUniversalAxis2(_id, axis[0], axis[1], axis[2]);
|
||||
}
|
||||
|
||||
INLINE void OdeUniversalJoint::
|
||||
add_torques(dReal torque1, dReal torque2) {
|
||||
dJointAddUniversalTorques(_id, torque1, torque2);
|
||||
|
@ -25,8 +25,11 @@ PUBLISHED:
|
||||
virtual ~OdeUniversalJoint();
|
||||
|
||||
INLINE void set_anchor(dReal x, dReal y, dReal z);
|
||||
INLINE void set_anchor(const LVecBase3f &anchor);
|
||||
INLINE void set_axis1(dReal x, dReal y, dReal z);
|
||||
INLINE void set_axis1(const LVecBase3f &axis);
|
||||
INLINE void set_axis2(dReal x, dReal y, dReal z);
|
||||
INLINE void set_axis2(const LVecBase3f &axis);
|
||||
INLINE void add_torques(dReal torque1, dReal torque2);
|
||||
|
||||
INLINE LVecBase3f get_anchor() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user