/// <summary>
 /// Construct given elementary constraint, row in the elementary constraint and (optional)
 /// a native instance to copy default values from.
 /// </summary>
 /// <param name="elementaryConstraint">Elementary constraint this row data belongs to.</param>
 /// <param name="row">Row index in the elementary constraint.</param>
 /// <param name="tmpEc">Temporary native instance to copy default values from.</param>
 public ElementaryConstraintRowData(ElementaryConstraint elementaryConstraint, int row, agx.ElementaryConstraint tmpEc = null)
 {
     m_elementaryConstraint = elementaryConstraint;
     m_row = row;
     if (tmpEc != null)
     {
         m_compliance = Convert.ToSingle(tmpEc.getCompliance(RowUInt));
         m_damping    = Convert.ToSingle(tmpEc.getDamping(RowUInt));
         m_forceRange = new RangeReal(tmpEc.getForceRange(RowUInt));
     }
 }
Example #2
0
        public void RestoreLocalDataFrom(agxWire.WireWinchController native)
        {
            if (native == null)
            {
                return;
            }

            Speed           = Convert.ToSingle(native.getSpeed());
            PulledInLength  = Convert.ToSingle(native.getPulledInWireLength());
            ForceRange      = new RangeReal(native.getForceRange());
            BrakeForceRange = new RangeReal(native.getBrakeForceRange());
        }
        protected override void Construct(ElementaryConstraint source)
        {
            base.Construct(source);

            m_range = new RangeReal((source as RangeController).m_range);
        }
        protected override void Construct(agx.ElementaryConstraint tmpEc)
        {
            base.Construct(tmpEc);

            m_range = new RangeReal(agx.RangeController.safeCast(tmpEc).getRange());
        }
 public void CopyFrom(ElementaryConstraintRowData source)
 {
     m_compliance = source.m_compliance;
     m_damping    = source.m_damping;
     m_forceRange = new RangeReal(source.m_forceRange);
 }