/// <summary>
 /// Initializes a new instance of the <see cref="StateVariable"/> class.
 /// </summary>
 /// <param name="name">The <see cref="StateVariableType"/>.</param>
 /// <param name="dataType">The <see cref="DataType"/>.</param>
 /// <param name="sendEvents">True if the variable sends events.</param>
 public StateVariable(StateVariableType name, DataType dataType, bool sendEvents)
 {
     Name              = name;
     DataType          = dataType;
     SendsEvents       = sendEvents;
     AllowedValues     = Array.Empty <string>();
     AllowedValueRange = null;
 }
 public TimeToJointParameterConverter(Joint j, StateVariableType jointState, Simulator pmks)
 {
     stateVariableTypeIndex = (int)jointState;
     JointIndex             = pmks.Joints.IndexOf(j);
     if (j.TypeOfJoint == JointType.P || j.TypeOfJoint == JointType.RP)
     {
         includeAngle     = true;
         offsetSlideAngle = j.OffsetSlideAngle;
         slideLinkIndex   = pmks.Links.IndexOf(j.Link1);
     }
     this.pmks = pmks;
 }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Argument"/> class.
 /// </summary>
 /// <param name="name">The name of the argument.</param>
 /// <param name="direction">The <see cref="ArgumentDirection"/>.</param>
 /// <param name="variableType">The <see cref="StateVariableType"/>.</param>
 public Argument(string name, ArgumentDirection direction, StateVariableType variableType)
 {
     Name                 = name;
     Direction            = direction;
     RelatedStateVariable = variableType;
 }
 public TimeToLinkParameterConverter(Link l, Joint j, StateVariableType linkState, Simulator pmks)
     : base(j, linkState, pmks)
 {
     LinkIndex = pmks.Links.IndexOf(l);
 }