public abstract bool TranslationalLimitMotor(BulletConstraint constrain, float enable, float targetVel, float maxMotorForce);
public override bool SliderMotor(BulletConstraint pConstraint, int forceVel, int linAng, float val) { SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; switch (forceVel) { case SLIDER_MOTOR_VELOCITY: switch (linAng) { case SLIDER_LINEAR: constraint.SetTargetLinMotorVelocity(val); break; case SLIDER_ANGULAR: constraint.SetTargetAngMotorVelocity(val); break; } break; case SLIDER_MAX_MOTOR_FORCE: switch (linAng) { case SLIDER_LINEAR: constraint.SetMaxLinMotorForce(val); break; case SLIDER_ANGULAR: constraint.SetMaxAngMotorForce(val); break; } break; } return true; }
public abstract bool SliderMotor(BulletConstraint constrain, int forceVel, int linAng, float val);
public abstract bool SpringEnable(BulletConstraint constrain, int index, float numericTrueFalse);
public abstract void RemoveConstraintRef(BulletBody obj, BulletConstraint constrain);
public abstract void SetConstraintNumSolverIterations(BulletConstraint constrain, float iterations);
public abstract bool HingeSetLimits(BulletConstraint constrain, float low, float high, float softness, float bias, float relaxation);
// ===================================================================================== // btCollisionObject entries public abstract Vector3 GetAnisotripicFriction(BulletConstraint constrain);
public abstract bool SetBreakingImpulseThreshold(BulletConstraint constrain, float threshold);
public abstract bool UseFrameOffset(BulletConstraint constrain, float enable);
public abstract bool SetAngularLimits(BulletConstraint constrain, Vector3 low, Vector3 hi);
public abstract bool SetFrames(BulletConstraint constrain, Vector3 frameA, Quaternion frameArot, Vector3 frameB, Quaternion frameBrot);
public abstract bool AddConstraintToWorld(BulletWorld world, BulletConstraint constrain, bool disableCollisionsBetweenLinkedObjects);
public abstract bool DestroyConstraint(BulletWorld world, BulletConstraint constrain);
public abstract bool SpringSetEquilibriumPoint(BulletConstraint constrain, int index, float equilibriumPoint);
public abstract bool SpringSetStiffness(BulletConstraint constrain, int index, float stiffnesss);
public abstract bool SpringSetDamping(BulletConstraint constrain, int index, float damping);
public abstract bool SliderSetLimits(BulletConstraint constrain, int lowerUpper, int linAng, float val);
public abstract bool SliderSet(BulletConstraint constrain, int softRestDamp, int dirLimOrtho, int linAng, float val);
public abstract bool SliderMotorEnable(BulletConstraint constrain, int linAng, float numericTrueFalse);
public abstract void AddConstraintRef(BulletBody obj, BulletConstraint constrain);
public abstract bool CalculateTransforms(BulletConstraint constrain);
public abstract bool SetConstraintParam(BulletConstraint constrain, ConstraintParams paramIndex, float value, ConstraintParamAxis axis);
public virtual void DumpConstraint(BulletWorld sim, BulletConstraint constrain) { }
public abstract bool HasAnisotripicFriction(BulletConstraint constrain);
public abstract bool RemoveConstraintFromWorld(BulletWorld world, BulletConstraint constrain);
public abstract Vector3 SetAnisotripicFriction(BulletConstraint constrain, Vector3 frict);
public abstract void SetConstraintEnable(BulletConstraint constrain, float numericTrueFalse);
public abstract bool SetLinearLimits(BulletConstraint constrain, Vector3 low, Vector3 hi);
public override bool SliderSet(BulletConstraint pConstraint, int softRestDamp, int dirLimOrtho, int linAng, float val) { SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; switch (softRestDamp) { case SLIDER_SET_SOFTNESS: switch (dirLimOrtho) { case SLIDER_SET_DIRECTION: switch (linAng) { case SLIDER_LINEAR: constraint.SetSoftnessDirLin(val); break; case SLIDER_ANGULAR: constraint.SetSoftnessDirAng(val); break; } break; case SLIDER_SET_LIMIT: switch (linAng) { case SLIDER_LINEAR: constraint.SetSoftnessLimLin(val); break; case SLIDER_ANGULAR: constraint.SetSoftnessLimAng(val); break; } break; case SLIDER_SET_ORTHO: switch (linAng) { case SLIDER_LINEAR: constraint.SetSoftnessOrthoLin(val); break; case SLIDER_ANGULAR: constraint.SetSoftnessOrthoAng(val); break; } break; } break; case SLIDER_SET_RESTITUTION: switch (dirLimOrtho) { case SLIDER_SET_DIRECTION: switch (linAng) { case SLIDER_LINEAR: constraint.SetRestitutionDirLin(val); break; case SLIDER_ANGULAR: constraint.SetRestitutionDirAng(val); break; } break; case SLIDER_SET_LIMIT: switch (linAng) { case SLIDER_LINEAR: constraint.SetRestitutionLimLin(val); break; case SLIDER_ANGULAR: constraint.SetRestitutionLimAng(val); break; } break; case SLIDER_SET_ORTHO: switch (linAng) { case SLIDER_LINEAR: constraint.SetRestitutionOrthoLin(val); break; case SLIDER_ANGULAR: constraint.SetRestitutionOrthoAng(val); break; } break; } break; case SLIDER_SET_DAMPING: switch (dirLimOrtho) { case SLIDER_SET_DIRECTION: switch (linAng) { case SLIDER_LINEAR: constraint.SetDampingDirLin(val); break; case SLIDER_ANGULAR: constraint.SetDampingDirAng(val); break; } break; case SLIDER_SET_LIMIT: switch (linAng) { case SLIDER_LINEAR: constraint.SetDampingLimLin(val); break; case SLIDER_ANGULAR: constraint.SetDampingLimAng(val); break; } break; case SLIDER_SET_ORTHO: switch (linAng) { case SLIDER_LINEAR: constraint.SetDampingOrthoLin(val); break; case SLIDER_ANGULAR: constraint.SetDampingOrthoAng(val); break; } break; } break; } return true; }
public override bool SliderMotorEnable(BulletConstraint pConstraint, int linAng, float numericTrueFalse) { SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; switch (linAng) { case SLIDER_LINEAR: constraint.SetPoweredLinMotor(numericTrueFalse == 0.0 ? false : true); break; case SLIDER_ANGULAR: constraint.SetPoweredAngMotor(numericTrueFalse == 0.0 ? false : true); break; } return true; }