예제 #1
0
 public override SimElementDefinition saveToDefinition()
 {
     var definition = new BEPUikTwistJointDefinition(Name)
     {
         AxisA = joint.AxisA.toEngineVec3(),
         AxisB = joint.AxisB.toEngineVec3(),
         MeasurementAxisA = joint.MeasurementAxisA.toEngineVec3(),
         MeasurementAxisB = joint.MeasurementAxisB.toEngineVec3()
     };
     setupJointDefinition(definition);
     return definition;
 }
예제 #2
0
 public BEPUikTwistJoint(BEPUikBone connectionA, BEPUikBone connectionB, BEPUikTwistJointDefinition definition, String name, SimObject instance)
     :base(connectionA, connectionB, name, instance)
 {
     joint = new IKTwistJoint(connectionA.IkBone, connectionB.IkBone, definition.AxisA.toBepuVec3(), definition.AxisB.toBepuVec3());
     if (definition.MeasurementAxisA.HasValue)
     {
         joint.MeasurementAxisA = definition.MeasurementAxisA.Value.toBepuVec3();
     }
     if (definition.MeasurementAxisB.HasValue)
     {
         joint.MeasurementAxisB = definition.MeasurementAxisB.Value.toBepuVec3();
     }
     setupJoint(definition);
 }
예제 #3
0
 public TwistJointRenderer(BEPUikTwistJointDefinition definition)
 {
     this.definition = definition;
 }