Exemple #1
0
 public void setJoint(SLJoint joint)
 {
     lock (this.scene)
     {
         joint.joint = (D6Joint)scene.CreateJoint(joint.d6JointDesc);
     }
 }
Exemple #2
0
        public SLJoint addJoint(
            SLAct actorA, SLAct actorB, float anchor_x, float anchor_y, float anchor_z, float axis_x, float axis_y, float axis_z)
        {
            SLJoint joint = new SLJoint(actorA, actorA, anchor_x, anchor_y, anchor_z, axis_x, axis_y, axis_z);

            setJoint(joint);
            return(joint);
        }
Exemple #3
0
        public SLJoint addJoint()
        {
            float ax, ay, az, xx, xy, xz;

            ax = mt1.Origin.X;
            ay = mt1.Origin.Y;
            az = mt1.Origin.Z;
            xx = 1;
            xy = xz = 0;

            ax = mr1.shape.act.actor.GlobalPose.M41;
            ay = mr1.shape.act.actor.GlobalPose.M42;
            az = mr1.shape.act.actor.GlobalPose.M43;

            SLJoint j = new SLJoint(mr1.shape.act, mr2.shape.act, ax, ay, az, xx, xy, xz);

            j.limitAngular(llow, lup, alow, aup, siff);
            return(j);
        }
Exemple #4
0
        /// <summary>
        /// BulletX: 生成した制約をワールドに適用する
        /// </summary>
        /// <param name="joint"></param>
        public void addConstraint(Generic6DofSpringConstraint joint)
        {
#if false
            if (num++ > 2)
            {
                return;

                Console.WriteLine("joi " +
                                  joint.mr1.shape.act.m_angle + "," + joint.mr1.shape.act.m_damping + "," + joint.mr1.shape.act.m_friction + ", " + joint.mr1.shape.act.m_restitution + "," + joint.mr1.shape.act.mass);

                Console.WriteLine("joi2 " + joint.siff[0] + "," + joint.siff[1] + "," + joint.siff[2]);
                Console.WriteLine("joi3 " + joint.llow.X + "," + joint.llow.Y + "," + joint.llow.Z);
                Console.WriteLine("joi4 " + joint.lup.X + "," + joint.lup.Y + "," + joint.lup.Z);
                Console.WriteLine("joi5 " + joint.alow.X + "," + joint.alow.Y + "," + joint.alow.Z);
                Console.WriteLine("joi6 " + joint.aup.X + "," + joint.aup.Y + "," + joint.aup.Z);
            }
#endif
            SLJoint j = joint.addJoint();
            setJoint(j);
        }