示例#1
0
        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTION

        /// <summary>
        /// Initializes a new instance of the MPEnvelopes class.
        /// </summary>
        /// <param name="newDefaultValue">An <see cref="MPData"/> with the default value</param>
        /// <param name="newValidCaps">The valid capabilities</param>
        /// <param name="newMPType">The <see cref="MPType"/> of the envelope.</param>
        /// <param name="newMinValue">The <see cref="MPData"/> with the minimal value for the envelope.</param>
        /// <param name="newMaxValue">The <see cref="MPData"/> with the maximal value for the envelope.</param>
        public MPEnvelopes(
            MPData newDefaultValue,
            MPCaps newValidCaps,
            MPType newMPType,
            MPData newMinValue,
            MPData newMaxValue)
        {
            // Store the neutralValue, min/max value range, data type and supported curve types
            this.defaultValue = newDefaultValue;
            this.validCaps    = (int)newValidCaps;
            this.dataType     = newMPType;
            this.minValue     = newMinValue;
            this.maxValue     = newMaxValue;

            // Create an array to hold the segments (size = 3 was chosen arbitrarily)
            this.envelope = new ArrayList(3);

            // Create one segment that spans all time containing the default values
            MPEnvelopeSegment e = new MPEnvelopeSegment();

            e.flags    = MPFlags.BeginNeutralVal;
            e.iCurve   = MPCaps.Jump;
            e.rtStart  = 0;
            e.rtEnd    = MaxTime;
            e.valStart = this.defaultValue;
            e.valEnd   = this.defaultValue;

            this.envelope.Add(e);
        }
示例#2
0
            public MPEnvelopes(MPData iDefaultValue, MPCaps iValidCaps, MPType mt, MPData min, MPData max)
            {
                // Store the neutralValue, min/max value range, data type and supported curve types
                m_DefaultValue = iDefaultValue;
                m_ValidCaps = (int)iValidCaps;
                m_DataType = mt;
                m_MinVal = min;
                m_MaxVal = max;

                // Create an array to hold the segments (size = 3 was chosen arbitrarily)
                m_Envelope = new ArrayList(3);

                // Create one segment that spans all time containing the default values
                MPEnvelopeSegment e = new MPEnvelopeSegment();
                e.flags = MPFlags.BeginNeutralVal;
                e.iCurve = MPCaps.Jump;
                e.rtStart = 0;
                e.rtEnd = MAX_TIME;
                e.valStart = m_DefaultValue;
                e.valEnd = m_DefaultValue;

                m_Envelope.Add(e);
            }
示例#3
0
    ///////////////////////////////////////////////////////////////////////////////
    // Construction and Initializing methods                                     //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTRUCTION

    /// <summary>
    /// Initializes a new instance of the MPEnvelopes class.
    /// </summary>
    /// <param name="newDefaultValue">An <see cref="MPData"/> with the default value</param>
    /// <param name="newValidCaps">The valid capabilities</param>
    /// <param name="newMPType">The <see cref="MPType"/> of the envelope.</param>
    /// <param name="newMinValue">The <see cref="MPData"/> with the minimal value for the envelope.</param>
    /// <param name="newMaxValue">The <see cref="MPData"/> with the maximal value for the envelope.</param>
    public MPEnvelopes(
      MPData newDefaultValue,
      MPCaps newValidCaps,
      MPType newMPType,
      MPData newMinValue,
      MPData newMaxValue)
    {
      // Store the neutralValue, min/max value range, data type and supported curve types
      this.defaultValue = newDefaultValue;
      this.validCaps = (int)newValidCaps;
      this.dataType = newMPType;
      this.minValue = newMinValue;
      this.maxValue = newMaxValue;

      // Create an array to hold the segments (size = 3 was chosen arbitrarily)
      this.envelope = new ArrayList(3);

      // Create one segment that spans all time containing the default values
      MPEnvelopeSegment e = new MPEnvelopeSegment();
      e.flags = MPFlags.BeginNeutralVal;
      e.iCurve = MPCaps.Jump;
      e.rtStart = 0;
      e.rtEnd = MaxTime;
      e.valStart = this.defaultValue;
      e.valEnd = this.defaultValue;

      this.envelope.Add(e);
    }