Esempio n. 1
0
        public override SimElementDefinition saveToDefinition()
        {
            var definition = new BEPUikTwistLimitDefinition(Name)
            {
                MaximumAngle     = limit.MaximumAngle,
                AxisA            = limit.AxisA.toEngineVec3(),
                AxisB            = limit.AxisB.toEngineVec3(),
                MeasurementAxisA = limit.MeasurementAxisA.toEngineVec3(),
                MeasurementAxisB = limit.MeasurementAxisB.toEngineVec3()
            };

            setupLimitDefinition(definition);
            return(definition);
        }
Esempio n. 2
0
 public BEPUikTwistLimit(BEPUikBone connectionA, BEPUikBone connectionB, BEPUikTwistLimitDefinition definition, String name, SimObject instance)
     : base(connectionA, connectionB, name, instance)
 {
     limit = new IKTwistLimit(connectionA.IkBone, connectionB.IkBone, definition.AxisA.toBepuVec3(), definition.AxisB.toBepuVec3(), definition.MaximumAngle);
     if (definition.MeasurementAxisA.HasValue)
     {
         limit.MeasurementAxisA = definition.MeasurementAxisA.Value.toBepuVec3();
     }
     if (definition.MeasurementAxisB.HasValue)
     {
         limit.MeasurementAxisB = definition.MeasurementAxisB.Value.toBepuVec3();
     }
     setupLimit(definition);
 }
 public TwistLimitRenderer(BEPUikTwistLimitDefinition definition)
 {
     this.definition = definition;
 }