public BEPUikBoneLocalRot(BEPUikBoneDefinition definition, SimObjectBase instance, BEPUikScene scene)
     : base(definition, instance, scene)
 {
     localRot            = definition.LocalRotQuat.Value;
     localRotInverse     = localRot.inverse();
     IkBone.Orientation *= localRot.toBepuQuat();
 }
Example #2
0
 public BEPUikBone(BEPUikBoneDefinition definition, SimObjectBase instance, BEPUikScene scene)
     : base(definition.Name)
 {
     this.scene  = scene;
     bone        = new Bone(instance.Translation.toBepuVec3(), instance.Rotation.toBepuQuat(), definition.Radius, definition.Height, definition.Mass);
     bone.Pinned = definition.Pinned;
     solverName  = definition.SolverName;
 }
Example #3
0
        public override SimElementDefinition saveToDefinition()
        {
            var definition = new BEPUikBoneDefinition(Name)
            {
                Pinned     = bone.Pinned,
                Radius     = bone.Radius,
                Height     = bone.Height,
                SolverName = solverName
            };

            customizeDefinition(definition);

            return(definition);
        }
Example #4
0
 internal void addBone(BEPUikBoneDefinition bone, SimObjectBase instance)
 {
     independentPhaseEntries.Add(new BEPUikFactoryEntry(instance, bone));
 }
 protected override void customizeDefinition(BEPUikBoneDefinition definition)
 {
     definition.LocalRotQuat = localRot;
 }
Example #6
0
 public BoneRenderer(BEPUikBoneDefinition definition)
 {
     this.definition = definition;
 }
Example #7
0
 protected virtual void customizeDefinition(BEPUikBoneDefinition definition)
 {
 }