⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 odecpp.h

📁 坦克的车辆动态特性模拟
💻 H
📖 第 1 页 / 共 2 页
字号:
    { return dJointGetType (_id); }  dBodyID getBody (int index) const    { return dJointGetBody (_id, index); }};class dBallJoint : public dJoint {private:  // intentionally undefined, don't use these  dBallJoint (const dBallJoint &);  void operator= (const dBallJoint &);public:  dBallJoint() { }  dBallJoint (dWorldID world, dJointGroupID group=0)    { _id = dJointCreateBall (world, group); }  void create (dWorldID world, dJointGroupID group=0) {    if (_id) dJointDestroy (_id);    _id = dJointCreateBall (world, group);  }  void setAnchor (dReal x, dReal y, dReal z)    { dJointSetBallAnchor (_id, x, y, z); }  void getAnchor (dVector3 result) const    { dJointGetBallAnchor (_id, result); }  void getAnchor2 (dVector3 result) const    { dJointGetBallAnchor2 (_id, result); }} ;class dHingeJoint : public dJoint {  // intentionally undefined, don't use these  dHingeJoint (const dHingeJoint &);  void operator = (const dHingeJoint &);public:  dHingeJoint() { }  dHingeJoint (dWorldID world, dJointGroupID group=0)    { _id = dJointCreateHinge (world, group); }  void create (dWorldID world, dJointGroupID group=0) {    if (_id) dJointDestroy (_id);    _id = dJointCreateHinge (world, group);  }  void setAnchor (dReal x, dReal y, dReal z)    { dJointSetHingeAnchor (_id, x, y, z); }  void getAnchor (dVector3 result) const    { dJointGetHingeAnchor (_id, result); }  void getAnchor2 (dVector3 result) const    { dJointGetHingeAnchor2 (_id, result); }  void setAxis (dReal x, dReal y, dReal z)    { dJointSetHingeAxis (_id, x, y, z); }  void getAxis (dVector3 result) const    { dJointGetHingeAxis (_id, result); }  dReal getAngle() const    { return dJointGetHingeAngle (_id); }  dReal getAngleRate() const    { return dJointGetHingeAngleRate (_id); }  void setParam (int parameter, dReal value)    { dJointSetHingeParam (_id, parameter, value); }  dReal getParam (int parameter) const    { return dJointGetHingeParam (_id, parameter); }  void addTorque (dReal torque)	{ dJointAddHingeTorque(_id, torque); }};class dSliderJoint : public dJoint {  // intentionally undefined, don't use these  dSliderJoint (const dSliderJoint &);  void operator = (const dSliderJoint &);public:  dSliderJoint() { }  dSliderJoint (dWorldID world, dJointGroupID group=0)    { _id = dJointCreateSlider (world, group); }  void create (dWorldID world, dJointGroupID group=0) {    if (_id) dJointDestroy (_id);    _id = dJointCreateSlider (world, group);  }  void setAxis (dReal x, dReal y, dReal z)    { dJointSetSliderAxis (_id, x, y, z); }  void getAxis (dVector3 result) const    { dJointGetSliderAxis (_id, result); }  dReal getPosition() const    { return dJointGetSliderPosition (_id); }  dReal getPositionRate() const    { return dJointGetSliderPositionRate (_id); }  void setParam (int parameter, dReal value)    { dJointSetSliderParam (_id, parameter, value); }  dReal getParam (int parameter) const    { return dJointGetSliderParam (_id, parameter); }  void addForce (dReal force)	{ dJointAddSliderForce(_id, force); }};class dUniversalJoint : public dJoint {  // intentionally undefined, don't use these  dUniversalJoint (const dUniversalJoint &);  void operator = (const dUniversalJoint &);public:  dUniversalJoint() { }  dUniversalJoint (dWorldID world, dJointGroupID group=0)    { _id = dJointCreateUniversal (world, group); }  void create (dWorldID world, dJointGroupID group=0) {    if (_id) dJointDestroy (_id);    _id = dJointCreateUniversal (world, group);  }  void setAnchor (dReal x, dReal y, dReal z)    { dJointSetUniversalAnchor (_id, x, y, z); }  void setAxis1 (dReal x, dReal y, dReal z)    { dJointSetUniversalAxis1 (_id, x, y, z); }  void setAxis2 (dReal x, dReal y, dReal z)    { dJointSetUniversalAxis2 (_id, x, y, z); }  void setParam (int parameter, dReal value)    { dJointSetUniversalParam (_id, parameter, value); }  void getAnchor (dVector3 result) const    { dJointGetUniversalAnchor (_id, result); }  void getAnchor2 (dVector3 result) const    { dJointGetUniversalAnchor2 (_id, result); }  void getAxis1 (dVector3 result) const    { dJointGetUniversalAxis1 (_id, result); }  void getAxis2 (dVector3 result) const    { dJointGetUniversalAxis2 (_id, result); }  dReal getParam (int parameter) const    { return dJointGetUniversalParam (_id, parameter); }  dReal getAngle1() const    { return dJointGetUniversalAngle1 (_id); }  dReal getAngle1Rate() const    { return dJointGetUniversalAngle1Rate (_id); }  dReal getAngle2() const    { return dJointGetUniversalAngle2 (_id); }  dReal getAngle2Rate() const    { return dJointGetUniversalAngle2Rate (_id); }  void addTorques (dReal torque1, dReal torque2)	{ dJointAddUniversalTorques(_id, torque1, torque2); }};class dHinge2Joint : public dJoint {  // intentionally undefined, don't use these  dHinge2Joint (const dHinge2Joint &);  void operator = (const dHinge2Joint &);public:  dHinge2Joint() { }  dHinge2Joint (dWorldID world, dJointGroupID group=0)    { _id = dJointCreateHinge2 (world, group); }  void create (dWorldID world, dJointGroupID group=0) {    if (_id) dJointDestroy (_id);    _id = dJointCreateHinge2 (world, group);  }  void setAnchor (dReal x, dReal y, dReal z)    { dJointSetHinge2Anchor (_id, x, y, z); }  void setAxis1 (dReal x, dReal y, dReal z)    { dJointSetHinge2Axis1 (_id, x, y, z); }  void setAxis2 (dReal x, dReal y, dReal z)    { dJointSetHinge2Axis2 (_id, x, y, z); }  void getAnchor (dVector3 result) const    { dJointGetHinge2Anchor (_id, result); }  void getAnchor2 (dVector3 result) const    { dJointGetHinge2Anchor2 (_id, result); }  void getAxis1 (dVector3 result) const    { dJointGetHinge2Axis1 (_id, result); }  void getAxis2 (dVector3 result) const    { dJointGetHinge2Axis2 (_id, result); }  dReal getAngle1() const    { return dJointGetHinge2Angle1 (_id); }  dReal getAngle1Rate() const    { return dJointGetHinge2Angle1Rate (_id); }  dReal getAngle2Rate() const    { return dJointGetHinge2Angle2Rate (_id); }  void setParam (int parameter, dReal value)    { dJointSetHinge2Param (_id, parameter, value); }  dReal getParam (int parameter) const    { return dJointGetHinge2Param (_id, parameter); }  void addTorques(dReal torque1, dReal torque2)	{ dJointAddHinge2Torques(_id, torque1, torque2); }};class dFixedJoint : public dJoint {  // intentionally undefined, don't use these  dFixedJoint (const dFixedJoint &);  void operator = (const dFixedJoint &);public:  dFixedJoint() { }  dFixedJoint (dWorldID world, dJointGroupID group=0)    { _id = dJointCreateFixed (world, group); }  void create (dWorldID world, dJointGroupID group=0) {    if (_id) dJointDestroy (_id);    _id = dJointCreateFixed (world, group);  }  void set()    { dJointSetFixed (_id); }};class dContactJoint : public dJoint {  // intentionally undefined, don't use these  dContactJoint (const dContactJoint &);  void operator = (const dContactJoint &);public:  dContactJoint() { }  dContactJoint (dWorldID world, dJointGroupID group, dContact *contact)    { _id = dJointCreateContact (world, group, contact); }  void create (dWorldID world, dJointGroupID group, dContact *contact) {    if (_id) dJointDestroy (_id);    _id = dJointCreateContact (world, group, contact);  }};class dNullJoint : public dJoint {  // intentionally undefined, don't use these  dNullJoint (const dNullJoint &);  void operator = (const dNullJoint &);public:  dNullJoint() { }  dNullJoint (dWorldID world, dJointGroupID group=0)    { _id = dJointCreateNull (world, group); }  void create (dWorldID world, dJointGroupID group=0) {    if (_id) dJointDestroy (_id);    _id = dJointCreateNull (world, group);  }};class dAMotorJoint : public dJoint {  // intentionally undefined, don't use these  dAMotorJoint (const dAMotorJoint &);  void operator = (const dAMotorJoint &);public:  dAMotorJoint() { }  dAMotorJoint (dWorldID world, dJointGroupID group=0)    { _id = dJointCreateAMotor (world, group); }  void create (dWorldID world, dJointGroupID group=0) {    if (_id) dJointDestroy (_id);    _id = dJointCreateAMotor (world, group);  }  void setMode (int mode)    { dJointSetAMotorMode (_id, mode); }  int getMode() const    { return dJointGetAMotorMode (_id); }  void setNumAxes (int num)    { dJointSetAMotorNumAxes (_id, num); }  int getNumAxes() const    { return dJointGetAMotorNumAxes (_id); }  void setAxis (int anum, int rel, dReal x, dReal y, dReal z)    { dJointSetAMotorAxis (_id, anum, rel, x, y, z); }  void getAxis (int anum, dVector3 result) const    { dJointGetAMotorAxis (_id, anum, result); }  int getAxisRel (int anum) const    { return dJointGetAMotorAxisRel (_id, anum); }  void setAngle (int anum, dReal angle)    { dJointSetAMotorAngle (_id, anum, angle); }  dReal getAngle (int anum) const    { return dJointGetAMotorAngle (_id, anum); }  dReal getAngleRate (int anum)    { return dJointGetAMotorAngleRate (_id,anum); }  void setParam (int parameter, dReal value)    { dJointSetAMotorParam (_id, parameter, value); }  dReal getParam (int parameter) const    { return dJointGetAMotorParam (_id, parameter); }  void addTorques(dReal torque1, dReal torque2, dReal torque3)	{ dJointAddAMotorTorques(_id, torque1, torque2, torque3); }};#endif#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -