Beispiel #1
0
 /// <summary>
 /// Specifies the given axis for this Joint.  Invalid axes numbers
 /// will be silently ignored.  The axis direction vector will be
 /// normalized.  This Joint's Solids must be positioned and
 /// attached before calling this function.
 /// </summary>
 /// <param name="axisNum"></param>
 /// <param name="axis"></param>
 protected virtual void SetAxis(int axisNum, JointAxis axis)
 {
     if (axisNum >= 0 && axisNum < numAxes)
     {
         data.Axis[axisNum] = axis;
     }
 }
Beispiel #2
0
 public JointData()
 {
     type    = Defaults.Joint.Type;
     Enabled = Defaults.Joint.Enabled;
     Name    = "";
     Anchor  = Defaults.Joint.Anchor;
     Axis    = new JointAxis[3];
     for (int i = 0; i < 3; i++)
     {
         Axis[i] = new JointAxis();
     }
     Axis[0].Direction = Defaults.Joint.Axis0Direction;
     Axis[1].Direction = Defaults.Joint.Axis1Direction;
     Axis[2].Direction = Defaults.Joint.Axis2Direction;
     // The rest of the data from the axes are initialized in the
     // JointAxis constructor.
     BreakMode       = Defaults.Joint.BreakMode;
     BreakThresh     = Defaults.Joint.BreakThresh;
     AccumThresh     = Defaults.Joint.AccumThresh;
     AccumDamage     = 0;
     ContactsEnabled = Defaults.Joint.ContactsEnabled;
     IsBroken        = false;
 }