コード例 #1
0
        public override SimElementDefinition saveToDefinition()
        {
            FixedConstraintDefinition definition = new FixedConstraintDefinition(Name);

            definition.RigidBodyAElement   = RigidBodyA.Name;
            definition.RigidBodyASimObject = RigidBodyA.Owner.Name;
            definition.RigidBodyBElement   = RigidBodyB.Name;
            definition.RigidBodyBSimObject = RigidBodyB.Owner.Name;
            return(definition);
        }
コード例 #2
0
 public FixedConstraintElement(FixedConstraintDefinition definition, SimObjectBase instance, RigidBody rbA, RigidBody rbB, BulletScene scene)
     : base(definition.Name, scene, rbA, rbB)
 {
     setConstraint(btFixedConstraint_Create(rbA.NativeRigidBody, rbB.NativeRigidBody, instance.Rotation, instance.Translation));
 }