public void setAutoDisableAverageSamplesCount(int samples) { if (samples != autoDisableAverageSamples) { autoDisableAverageSamples = samples; for (DxRagdollBody bone : bones) { bone.pBuffer = new DVector3[samples]; bone.qBuffer = new DQuaternion[samples]; for (int i = 0; i < samples; i++) { bone.pBuffer[i] = new DVector3(); bone.qBuffer[i] = new DQuaternion(); } } } autoDisableBufferIndex = 0; autoDisableBufferReady = false; }
public void setAutoDisableAverageSamplesCount(int samples) { if (samples != autoDisableAverageSamples) { autoDisableAverageSamples = samples; for (DxRagdollBody bone : bones) { bone.pBuffer = new DVector3[samples]; bone.qBuffer = new DQuaternion[samples]; for (int i = 0; i < samples; i++) { bone.pBuffer[i] = new DVector3(); bone.qBuffer[i] = new DQuaternion(); } } } autoDisableBufferIndex = 0; autoDisableBufferReady = false; }
public static void dRFromAxisAndAngle (DMatrix3 R, double ax, double ay, double az, double angle) { //dAASSERT (R); DQuaternion q = new DQuaternion(); dQFromAxisAndAngle (q, ax, ay, az, angle); dRfromQ (R, q); } public static void dRFromAxisAndAngle (DMatrix3 R, DVector3C axyz, double angle)
public static void dRFromAxisAndAngle (DMatrix3 R, DVector3C axyz, double angle) { //dAASSERT (R); DQuaternion q = new DQuaternion(); dQFromAxisAndAngle (q, axyz, angle); dRfromQ (R, q); }
public static void dRFromAxisAndAngle (DMatrix3 R, double ax, double ay, double az, double angle) { //dAASSERT (R); DQuaternion q = new DQuaternion(); dQFromAxisAndAngle (q, ax, ay, az, angle); dRfromQ (R, q); } public static void dRFromAxisAndAngle (DMatrix3 R, DVector3C axyz, double angle)
public static void dRFromAxisAndAngle (DMatrix3 R, DVector3C axyz, double angle) { //dAASSERT (R); DQuaternion q = new DQuaternion(); dQFromAxisAndAngle (q, axyz, angle); dRfromQ (R, q); }
DxJointFixed ( DxWorld w ) { super(w); offset = new DVector3(); //dSetZero ( offset.v, 4 ); qrel = new DQuaternion(); //dSetZero ( qrel.v, 4 ); erp = world.getERP(); cfm = world.getCFM(); }
DxJointUniversal( DxWorld w ) { super(w); _axis1 = new DVector3(1, 0, 0); _axis2 = new DVector3(0, 1, 0); qrel1 = new DQuaternion(); qrel2 = new DQuaternion(); limot1 = new DxJointLimitMotor(); limot1.init( world ); limot2 = new DxJointLimitMotor(); limot2.init( world ); }
DxJointFixed ( DxWorld w ) { super(w); offset = new DVector3(); //dSetZero ( offset.v, 4 ); qrel = new DQuaternion(); //dSetZero ( qrel.v, 4 ); erp = world.getERP(); cfm = world.getCFM(); }
DxJointUniversal( DxWorld w ) { super(w); _axis1 = new DVector3(1, 0, 0); _axis2 = new DVector3(0, 1, 0); qrel1 = new DQuaternion(); qrel2 = new DQuaternion(); limot1 = new DxJointLimitMotor(); limot1.init( world ); limot2 = new DxJointLimitMotor(); limot2.init( world ); }
public void dJointSetHingeAxisOffset( double x, double y, double z, double dangle ) { setAxes( x, y, z, _axis1, _axis2 ); computeInitialRelativeRotation(); if ( isFlagsReverse() ) dangle = -dangle; DQuaternion qAngle = new DQuaternion(), qOffset = new DQuaternion(); dQFromAxisAndAngle(qAngle, x, y, z, dangle); dQMultiply3(qOffset, qAngle, qrel); // qrel.v[0] = qOffset.v[0]; // qrel.v[1] = qOffset.v[1]; // qrel.v[2] = qOffset.v[2]; // qrel.v[3] = qOffset.v[3]; qrel.set(qOffset); }
public void dJointSetHingeAxisOffset( double x, double y, double z, double dangle ) { setAxes( x, y, z, _axis1, _axis2 ); computeInitialRelativeRotation(); if ( isFlagsReverse() ) dangle = -dangle; DQuaternion qAngle = new DQuaternion(), qOffset = new DQuaternion(); dQFromAxisAndAngle(qAngle, x, y, z, dangle); dQMultiply3(qOffset, qAngle, qrel); // qrel.v[0] = qOffset.v[0]; // qrel.v[1] = qOffset.v[1]; // qrel.v[2] = qOffset.v[2]; // qrel.v[3] = qOffset.v[3]; qrel.set(qOffset); }
DxJointSlider ( DxWorld w ) //dxJoint ( w ) { super(w); axis1 = new DVector3(1, 0, 0); qrel = new DQuaternion(); offset = new DVector3(); limot = new DxJointLimitMotor(); limot.init ( world ); }
DxJointSlider ( DxWorld w ) //dxJoint ( w ) { super(w); axis1 = new DVector3(1, 0, 0); qrel = new DQuaternion(); offset = new DVector3(); limot = new DxJointLimitMotor(); limot.init ( world ); }
public DxRagdollBody(DBody body, double length, double radius, DVector3C pinitial, DQuaternionC qinitial) { this.body = body; this.length = length; this.radius = radius; this.position = new DVector3(pinitial); this.quaternion = new DQuaternion(qinitial.get0(), qinitial.get1(), qinitial.get2(), qinitial.get3()); }
public DxRagdollBody(DBody body, double length, double radius, DVector3C pinitial, DQuaternionC qinitial) { this.body = body; this.length = length; this.radius = radius; this.position = new DVector3(pinitial); this.quaternion = new DQuaternion(qinitial.get0(), qinitial.get1(), qinitial.get2(), qinitial.get3()); }
@Override public DQuaternionC getQuaternion () { dUASSERT (_gflags & GEOM_PLACEABLE,"geom must be placeable"); if (body != null && offset_posr == null) { return body.dBodyGetQuaternion(); } else { recomputePosr(); DQuaternion quat = new DQuaternion(); dQfromR(quat, _final_posr.R()); return quat; } }
@Override public DQuaternionC getQuaternion () { dUASSERT (_gflags & GEOM_PLACEABLE,"geom must be placeable"); if (body != null && offset_posr == null) { return body.dBodyGetQuaternion(); } else { recomputePosr(); DQuaternion quat = new DQuaternion(); dQfromR(quat, _final_posr.R()); return quat; } }
private void reset_ball() { float sx=0.0f, sy=3.40f, sz=7.15f; // //#if defined(_MSC_VER) && defined(dDOUBLE) // //sy -= 0.01; // Cheat, to make it score under win32/double // //#endif sy += 0.033; // Windows 64 //TODO //sy += 0.046; //For 'double' on Linux 64bit. //TODO !!! DQuaternion q = new DQuaternion(); q.setIdentity(); sphbody.setPosition (sx, sy, sz); sphbody.setQuaternion(q); sphbody.setLinearVel (0,0,0); sphbody.setAngularVel (0,0,0); }
private void reset_ball() { float sx=0.0f, sy=2.973f, sz=7.51f; // //#if defined(_MSC_VER) && defined(dDOUBLE) // //sy -= 0.01; // Cheat, to make it score under win32/double // //#endif sy += 0.033; // Windows 64 //TODO //sy += 0.046; //For 'double' on Linux 64bit. //TODO !!! DQuaternion q = new DQuaternion(); q.setIdentity(); sphbody.setPosition (sx, sy, sz); sphbody.setQuaternion(q); sphbody.setLinearVel (0,0,0); sphbody.setAngularVel (0,0,0); }