// // ModelJoint.cs - represents a bone joint in a 3D model // // Author: // Michael Becker // // Copyright (c) 2013-2020 Mike Becker's Software // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . using System; namespace UniversalEditor.ObjectModels.Multimedia3D.Model { /// /// Represents a bone joint in a 3D model. /// public class ModelJoint : ICloneable { public class ModelJointCollection : System.Collections.ObjectModel.Collection { } /// /// Gets or sets the name of this . /// /// The name of this . public string Name { get; set; } = String.Empty; /// /// Gets or sets the position of this . /// /// The position of this . public PositionVector3 Position { get; set; } = new PositionVector3(0, 0, 0); /// /// Gets or sets the rotation of this . /// /// The rotation of this . public PositionVector3 Rotation { get; set; } = new PositionVector3(0, 0, 0); /// /// Gets or sets the lower limit for the property on this . /// /// The lower limit for the property on this . public PositionVector3 LimitMoveLow { get; set; } = new PositionVector3(0, 0, 0); /// /// Gets or sets the upper limit for the property on this . /// /// The upper limit for the property on this . public PositionVector3 LimitMoveHigh { get; set; } = new PositionVector3(0, 0, 0); /// /// Gets or sets the lower limit for the property on this . /// /// The lower limit for the property on this . public PositionVector3 LimitAngleLow { get; set; } = new PositionVector3(0, 0, 0); /// /// Gets or sets the upper limit for the property on this . /// /// The upper limit for the property on this . public PositionVector3 LimitAngleHigh { get; set; } = new PositionVector3(0, 0, 0); /// /// Movement stiffness for spring constraint. /// public PositionVector3 SpringConstraintMovementStiffness { get; set; } = new PositionVector3(0, 0, 0); /// /// Rotation stiffness for spring constraint. /// public PositionVector3 SpringConstraintRotationStiffness { get; set; } = new PositionVector3(0, 0, 0); public object Clone() { ModelJoint clone = new ModelJoint(); clone.LimitAngleHigh = (PositionVector3)(LimitAngleHigh.Clone()); clone.LimitAngleLow = (PositionVector3)(LimitAngleLow.Clone()); clone.LimitMoveHigh = (PositionVector3)(LimitMoveHigh.Clone()); clone.LimitMoveLow = (PositionVector3)(LimitMoveLow.Clone()); clone.Name = Name.Clone() as string; clone.Position = ((PositionVector3)Position.Clone()); clone.Rotation = ((PositionVector3)Rotation.Clone()); clone.SpringConstraintMovementStiffness = ((PositionVector3)SpringConstraintMovementStiffness.Clone()); clone.SpringConstraintRotationStiffness = ((PositionVector3)SpringConstraintRotationStiffness.Clone()); return clone; } } }