コード例 #1
0
 public abstract bool SetFrames(BulletConstraint constrain,
     Vector3 frameA, Quaternion frameArot, Vector3 frameB, Quaternion frameBrot);
コード例 #2
0
 public abstract bool SetBreakingImpulseThreshold(BulletConstraint constrain, float threshold);
コード例 #3
0
 public abstract void SetConstraintNumSolverIterations(BulletConstraint constrain, float iterations);
コード例 #4
0
 public override bool UseFrameOffset(BulletConstraint pConstraint, float onOff)
 {
     Generic6DofConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as Generic6DofConstraint;
     constraint.SetUseFrameOffset((onOff == 0) ? false : true);
     return true;
 }
コード例 #5
0
 public abstract void SetConstraintNumSolverIterations(BulletConstraint constrain, float iterations);
コード例 #6
0
 //SetBreakingImpulseThreshold(m_constraint.ptr, threshold);
 public override bool SetBreakingImpulseThreshold(BulletConstraint pConstraint, float threshold)
 {
     Generic6DofConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as Generic6DofConstraint;
     constraint.SetBreakingImpulseThreshold(threshold);
     return true;
 }
コード例 #7
0
        //SetFrames(m_constraint.ptr, frameA, frameArot, frameB, frameBrot);
        public override bool SetFrames(BulletConstraint pConstraint, Vector3 pframe1, Quaternion pframe1rot,
            Vector3 pframe2, Quaternion pframe2rot)
        {
            Generic6DofConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as Generic6DofConstraint;
            IndexedVector3 frame1v = new IndexedVector3(pframe1.X, pframe1.Y, pframe1.Z);
            IndexedQuaternion frame1rot = new IndexedQuaternion(pframe1rot.X, pframe1rot.Y, pframe1rot.Z, pframe1rot.W);
            IndexedMatrix frame1 = IndexedMatrix.CreateFromQuaternion(frame1rot);
            frame1._origin = frame1v;

            // 20131224 not used        IndexedVector3 frame2v = new IndexedVector3(pframe2.X, pframe2.Y, pframe2.Z);
            IndexedQuaternion frame2rot = new IndexedQuaternion(pframe2rot.X, pframe2rot.Y, pframe2rot.Z, pframe2rot.W);
            IndexedMatrix frame2 = IndexedMatrix.CreateFromQuaternion(frame2rot);
            frame2._origin = frame1v;
            constraint.SetFrames(ref frame1, ref frame2);
            return true;
        }
コード例 #8
0
 public abstract bool CalculateTransforms(BulletConstraint constrain);
コード例 #9
0
 public abstract bool SetConstraintParam(BulletConstraint constrain, ConstraintParams paramIndex, float value,
                                         ConstraintParamAxis axis);
コード例 #10
0
 public abstract bool TranslationalLimitMotor(BulletConstraint constrain, float enable, float targetVel,
                                              float maxMotorForce);
コード例 #11
0
 public abstract bool SetBreakingImpulseThreshold(BulletConstraint constrain, float threshold);
コード例 #12
0
 public abstract bool UseFrameOffset(BulletConstraint constrain, float enable);
コード例 #13
0
 public abstract bool SetAngularLimits(BulletConstraint constrain, Vector3 low, Vector3 hi);
コード例 #14
0
 public abstract bool SetFrames(BulletConstraint constrain,
                                Vector3 frameA, Quaternion frameArot, Vector3 frameB, Quaternion frameBrot);
コード例 #15
0
 public abstract bool TranslationalLimitMotor(BulletConstraint constrain, float enable, float targetVel, float maxMotorForce);
コード例 #16
0
 public abstract bool DestroyConstraint(BulletWorld world, BulletConstraint constrain);
コード例 #17
0
 public override bool HasAnisotripicFriction(BulletConstraint pconstrain)
 {
     /* TODO */
     return false;
 }
コード例 #18
0
 public abstract bool AddConstraintToWorld(BulletWorld world, BulletConstraint constrain,
                                           bool disableCollisionsBetweenLinkedObjects);
コード例 #19
0
 public override void SetConstraintNumSolverIterations(BulletConstraint pConstraint, float cnt)
 {
     Generic6DofConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as Generic6DofConstraint;
     constraint.SetOverrideNumSolverIterations((int)cnt);
 }
コード例 #20
0
 public abstract bool RemoveConstraintFromWorld(BulletWorld world, BulletConstraint constrain);
コード例 #21
0
        public override bool TranslationalLimitMotor(BulletConstraint pConstraint, float ponOff, float targetVelocity,
            float maxMotorForce)
        {
            TypedConstraint tconstrain = (pConstraint as BulletConstraintXNA).constrain;
            bool onOff = ponOff != 0;
            bool ret = false;

            switch (tconstrain.GetConstraintType())
            {
                case TypedConstraintType.D6_CONSTRAINT_TYPE:
                    Generic6DofConstraint constrain = tconstrain as Generic6DofConstraint;
                    constrain.GetTranslationalLimitMotor().m_enableMotor[0] = onOff;
                    constrain.GetTranslationalLimitMotor().m_targetVelocity[0] = targetVelocity;
                    constrain.GetTranslationalLimitMotor().m_maxMotorForce[0] = maxMotorForce;
                    ret = true;
                    break;
            }

            return ret;
        }
コード例 #22
0
 // =====================================================================================
 // btCollisionObject entries
 public abstract Vector3 GetAnisotripicFriction(BulletConstraint constrain);
コード例 #23
0
 public override bool CalculateTransforms(BulletConstraint pConstraint)
 {
     Generic6DofConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as Generic6DofConstraint;
     constraint.CalculateTransforms();
     return true;
 }
コード例 #24
0
 public abstract Vector3 SetAnisotripicFriction(BulletConstraint constrain, Vector3 frict);
コード例 #25
0
 public abstract Vector3 SetAnisotripicFriction(BulletConstraint constrain, Vector3 frict);
コード例 #26
0
 public abstract bool HasAnisotripicFriction(BulletConstraint constrain);
コード例 #27
0
 public abstract void SetConstraintEnable(BulletConstraint constrain, float numericTrueFalse);
コード例 #28
0
 public abstract void AddConstraintRef(BulletBody obj, BulletConstraint constrain);
コード例 #29
0
 public abstract bool SetConstraintParam(BulletConstraint constrain, ConstraintParams paramIndex, float value, ConstraintParamAxis axis);
コード例 #30
0
 public abstract void RemoveConstraintRef(BulletBody obj, BulletConstraint constrain);
コード例 #31
0
 public abstract bool SetLinearLimits(BulletConstraint constrain, Vector3 low, Vector3 hi);
コード例 #32
0
 public virtual void DumpConstraint(BulletWorld sim, BulletConstraint constrain)
 {
 }
コード例 #33
0
 public abstract bool UseFrameOffset(BulletConstraint constrain, float enable);
コード例 #34
0
 public abstract bool CalculateTransforms(BulletConstraint constrain);
コード例 #35
0
 public override Vector3 SetAnisotripicFriction(BulletConstraint pconstrain, Vector3 frict)
 {
     /* TODO */
     return Vector3.Zero;
 }
コード例 #36
0
 public abstract bool DestroyConstraint(BulletWorld world, BulletConstraint constrain);
コード例 #37
0
 public override void SetConstraintEnable(BulletConstraint pConstraint, float p_2)
 {
     Generic6DofConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as Generic6DofConstraint;
     constraint.SetEnabled((p_2 == 0) ? false : true);
 }
コード例 #38
0
 public virtual void DumpConstraint(BulletWorld sim, BulletConstraint constrain)
 {
 }
コード例 #39
0
 //m_constraint.ptr, ConstraintParams.BT_CONSTRAINT_STOP_CFM, cfm, ConstraintParamAxis.AXIS_ALL
 public override bool SetConstraintParam(BulletConstraint pConstraint, ConstraintParams paramIndex,
     float paramvalue, ConstraintParamAxis axis)
 {
     Generic6DofConstraint constrain = (pConstraint as BulletConstraintXNA).constrain as Generic6DofConstraint;
     if (axis == ConstraintParamAxis.AXIS_LINEAR_ALL || axis == ConstraintParamAxis.AXIS_ALL)
     {
         constrain.SetParam((BulletXNA.BulletDynamics.ConstraintParams)(int)paramIndex, paramvalue, 0);
         constrain.SetParam((BulletXNA.BulletDynamics.ConstraintParams)(int)paramIndex, paramvalue, 1);
         constrain.SetParam((BulletXNA.BulletDynamics.ConstraintParams)(int)paramIndex, paramvalue, 2);
     }
     if (axis == ConstraintParamAxis.AXIS_ANGULAR_ALL || axis == ConstraintParamAxis.AXIS_ALL)
     {
         constrain.SetParam((BulletXNA.BulletDynamics.ConstraintParams)(int)paramIndex, paramvalue, 3);
         constrain.SetParam((BulletXNA.BulletDynamics.ConstraintParams)(int)paramIndex, paramvalue, 4);
         constrain.SetParam((BulletXNA.BulletDynamics.ConstraintParams)(int)paramIndex, paramvalue, 5);
     }
     if (axis == ConstraintParamAxis.AXIS_LINEAR_ALL)
     {
         constrain.SetParam((BulletXNA.BulletDynamics.ConstraintParams)(int)paramIndex, paramvalue, (int)axis);
     }
     return true;
 }
コード例 #40
0
 // =====================================================================================
 // btCollisionObject entries
 public abstract Vector3 GetAnisotripicFriction(BulletConstraint constrain);
コード例 #41
0
 public override bool SetLinearLimits(BulletConstraint pConstraint, Vector3 low, Vector3 high)
 {
     Generic6DofConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as Generic6DofConstraint;
     IndexedVector3 lowlimit = new IndexedVector3(low.X, low.Y, low.Z);
     IndexedVector3 highlimit = new IndexedVector3(high.X, high.Y, high.Z);
     constraint.SetLinearLowerLimit(lowlimit);
     constraint.SetLinearUpperLimit(highlimit);
     return true;
 }
コード例 #42
0
 public abstract bool HasAnisotripicFriction(BulletConstraint constrain);
コード例 #43
0
 public override void AddConstraintRef(BulletBody pBody, BulletConstraint pConstraint)
 {
     RigidBody body = (pBody as BulletBodyXNA).rigidBody;
     TypedConstraint constrain = (pConstraint as BulletConstraintXNA).constrain;
     body.AddConstraintRef(constrain);
 }
コード例 #44
0
 public abstract bool RemoveConstraintFromWorld(BulletWorld world, BulletConstraint constrain);
コード例 #45
0
        public override bool AddConstraintToWorld(BulletWorld pWorld, BulletConstraint pConstraint,
            bool pDisableCollisionsBetweenLinkedObjects)
        {
            DiscreteDynamicsWorld world = (pWorld as BulletWorldXNA).world;
            TypedConstraint constraint = (pConstraint as BulletConstraintXNA).constrain;
            world.AddConstraint(constraint, pDisableCollisionsBetweenLinkedObjects);

            return true;
        }
コード例 #46
0
 public abstract void RemoveConstraintRef(BulletBody obj, BulletConstraint constrain);
コード例 #47
0
 public override bool DestroyConstraint(BulletWorld pWorld, BulletConstraint pConstraint)
 {
     DiscreteDynamicsWorld world = (pWorld as BulletWorldXNA).world;
     TypedConstraint constraint = (pConstraint as BulletConstraintXNA).constrain;
     world.RemoveConstraint(constraint);
     return true;
 }
コード例 #48
0
 public abstract void SetConstraintEnable(BulletConstraint constrain, float numericTrueFalse);