Пример #1
0
        /// <summary>
        /// Constructs a new constraint tries to rotate two entities so that they reach a specified relative orientation around an axis.
        /// </summary>
        /// <param name="connectionA">First connection of the pair.</param>
        /// <param name="connectionB">Second connection of the pair.</param>
        /// <param name="motorizedAxis">Rotation axis to control in world space.</param>
        public RevoluteMotor(Entity connectionA, Entity connectionB, Vector3 motorizedAxis)
        {
            ConnectionA = connectionA;
            ConnectionB = connectionB;
            SetupJointTransforms(motorizedAxis);

            settings = new MotorSettings1D(this);
        }
Пример #2
0
        /// <summary>
        /// Constructs a new constraint which prevents the connected entities from twisting relative to each other.
        /// </summary>
        /// <param name="connectionA">First connection of the pair.</param>
        /// <param name="connectionB">Second connection of the pair.</param>
        /// <param name="axisA">Twist axis attached to the first connected entity.</param>
        /// <param name="axisB">Twist axis attached to the second connected entity.</param>
        public TwistMotor(Entity connectionA, Entity connectionB, Vector3 axisA, Vector3 axisB)
        {
            ConnectionA = connectionA;
            ConnectionB = connectionB;
            SetupJointTransforms(axisA, axisB);

            settings = new MotorSettings1D(this);
        }
Пример #3
0
 /// <summary>
 /// Constructs a new constraint tries to rotate two entities so that they reach a specified relative orientation around an axis.
 /// To finish the initialization, specify the connections (ConnectionA and ConnectionB)
 /// as well as the Basis and TestAxis.
 /// This constructor sets the constraint's IsActive property to false by default.
 /// </summary>
 public RevoluteMotor()
 {
     settings = new MotorSettings1D(this);
     IsActive = false;
 }
Пример #4
0
 /// <summary>
 /// Constructs a new constraint which prevents the connected entities from twisting relative to each other.
 /// To finish the initialization, specify the connections (ConnectionA and ConnectionB)
 /// as well as the BasisA and BasisB.
 /// This constructor sets the constraint's IsActive property to false by default.
 /// </summary>
 public TwistMotor()
 {
     IsActive = false;
     settings = new MotorSettings1D(this);
 }