• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# AnimatTools类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中AnimatTools的典型用法代码示例。如果您正苦于以下问题:C# AnimatTools类的具体用法?C# AnimatTools怎么用?C# AnimatTools使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AnimatTools类属于命名空间,在下文中一共展示了AnimatTools类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: MultiSegmentSpring

        public MultiSegmentSpring(AnimatTools.Framework.DataObject doParent)
            : base(doParent)
        {
            m_thDataTypes.DataTypes.Clear();

            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Tension", "Tension", "Newtons", "N", 0, 1000));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("SpringTension", "Spring Tension", "Newtons", "N", 0, 1000));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("DampingTension", "Damping Tension", "Newtons", "N", 0, 1000));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("SpringLength", "Spring Length", "Meters", "m", 0, 1));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Vspring", "Spring Velocity", "m/s", "m/s", -3, 3));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Displacement", "Muscle Displacement", "Meters", "m", 0, 1));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("DisplacementRatio", "Muscle Displacement Ratio", "", "", -1, 1));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Enable", "Enable", "", "", 0, 1));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Aspring", "Acceleration", "m/s^2", "m/s^2", -100, 100));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("PotEnergy", "Potential Energy", "J", "J", -10, 10));
            m_thDataTypes.ID = "Tension";

            //Holdover stuff from using the muscle base class
            m_StimTension = new AnimatTools.DataObjects.Gains.MuscleGains.StimulusTension(this);
            m_LengthTension = new AnimatTools.DataObjects.Gains.MuscleGains.LengthTension(this);
            m_LengthTension.ShowLcePercentage = false;

            m_snNaturalLength = new AnimatTools.Framework.ScaledNumber(this, "NaturalLength", 1, AnimatTools.Framework.ScaledNumber.enumNumericScale.None, "meters", "m");
            m_snStiffness = new AnimatTools.Framework.ScaledNumber(this, "Stiffness", 50, AnimatTools.Framework.ScaledNumber.enumNumericScale.Kilo, "N/m", "N/m");
            m_snDamping = new AnimatTools.Framework.ScaledNumber(this, "Damping", 1, AnimatTools.Framework.ScaledNumber.enumNumericScale.Kilo, "g/s", "g/s");

            m_thIncomingDataType = new AnimatTools.DataObjects.DataType("Enabled", "Enabled", "", "", 0, 1, ScaledNumber.enumNumericScale.None, ScaledNumber.enumNumericScale.None);
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:28,代码来源:MultisegmentSpring.cs


示例2: Initialize

        public override void Initialize(ref AnimatTools.Forms.AnimatApplication frmApplication, AnimatTools.Forms.MdiChild frmMdiParent, AnimatTools.Forms.AnimatForm frmParent)
        {
            base.Initialize (ref frmApplication, frmMdiParent, frmParent);

              System.Reflection.Assembly oAssembly = System.Reflection.Assembly.LoadFrom(Util.GetFilePath(frmApplication.ApplicationDirectory, "LicensedAnimatTools.dll"));
              m_chartFieldGain = (AnimatTools.Forms.Gain.GainControl) oAssembly.CreateInstance("LicensedAnimatTools.Forms.Charts.GainControl");

            this.tpFieldGain.Controls.Add(this.m_chartFieldGain);
            this.m_chartFieldGain.Location = new System.Drawing.Point(128, 8);
            this.m_chartFieldGain.Name = "m_chartFieldGain";
            this.m_chartFieldGain.Size = new System.Drawing.Size(208, 160);
            this.m_chartFieldGain.TabIndex = 5;
            this.m_chartFieldGain.Text = "m_chartFieldGain";

            m_chartCurrentGain = (AnimatTools.Forms.Gain.GainControl) oAssembly.CreateInstance("LicensedAnimatTools.Forms.Charts.GainControl");

            this.tpCurrentGain.Controls.Add(this.m_chartCurrentGain);
            this.m_chartCurrentGain.Location = new System.Drawing.Point(128, 8);
            this.m_chartCurrentGain.Name = "m_chartCurrentGain";
            this.m_chartCurrentGain.Size = new System.Drawing.Size(208, 160);
            this.m_chartCurrentGain.TabIndex = 5;
            this.m_chartCurrentGain.Text = "m_chartCurrentGain";

            PopulateForm();
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:25,代码来源:ReceptiveFields.cs


示例3: Spring

        public Spring(AnimatTools.Framework.DataObject doParent)
            : base(doParent)
        {
            Color  = System.Drawing.Color.NavajoWhite;

            m_snNaturalLength = new AnimatTools.Framework.ScaledNumber(this, "NaturalLength", "meters", "m");
            m_snStiffness = new AnimatTools.Framework.ScaledNumber(this, "Stiffness", 50, AnimatTools.Framework.ScaledNumber.enumNumericScale.Kilo, "N/m", "N/m");
            m_snDamping = new AnimatTools.Framework.ScaledNumber(this, "Damping", 1, AnimatTools.Framework.ScaledNumber.enumNumericScale.Kilo, "g/s", "g/s");

            if(Util.Environment != null)
                m_snNaturalLength.SetFromValue(1, (int) Util.Environment.DisplayDistanceUnits);

            AnimatTools.DataObjects.Physical.PhysicalStructure doStruct = null;
            if(doParent != null && doParent is AnimatTools.DataObjects.Physical.BodyPart)
            {
                AnimatTools.DataObjects.Physical.BodyPart bpPart = (AnimatTools.DataObjects.Physical.BodyPart) doParent;
                doStruct = bpPart.ParentStructure;
            }

            m_tpBodyPartType = typeof(VortexAnimatTools.DataObjects.Physical.RigidBodies.MuscleAttachment);
            m_thPrimaryAttachment = new AnimatTools.TypeHelpers.LinkedBodyPartList(doStruct, null, m_tpBodyPartType);
            m_thSecondaryAttachment = new AnimatTools.TypeHelpers.LinkedBodyPartList(doStruct, null, m_tpBodyPartType);
            m_snSpringLength = new AnimatTools.Framework.ScaledNumber(this, "SpringLength", 0, AnimatTools.Framework.ScaledNumber.enumNumericScale.None, "Meters", "m");

            m_thDataTypes.DataTypes.Clear();
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("SpringLength", "Spring Length", "Meters", "m", -10, 10));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Displacement", "Displacement", "Meters", "m", -10, 10));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Tension", "Tension", "Newtons", "N", -1000, 1000));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Energy", "Energy", "Joules", "J", -10, 10));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Enable", "Enable", "", "", 0, 1));
            m_thDataTypes.ID = "SpringLength";

            m_thIncomingDataType = new AnimatTools.DataObjects.DataType("Enabled", "Enabled", "", "", 0, 1, ScaledNumber.enumNumericScale.None, ScaledNumber.enumNumericScale.None);
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:34,代码来源:Spring.cs


示例4: RigidBody_DX

        private Texture texZ = null; //Texture for the z axis label

        #endregion Fields

        #region Constructors

        public RigidBody_DX(AnimatTools.Framework.DataObject doParent)
            : base(doParent)
        {
            m_vrLocation = new DxLocationRef(this);
            m_vrRotation = new DxRotationRef(this);

            m_snXLocalLocation = new AnimatTools.Framework.ScaledNumber(this, "XLocalLocationScaled", "meters", "m");
            m_snYLocalLocation = new AnimatTools.Framework.ScaledNumber(this, "YLocalLocationScaled", "meters", "m");
            m_snZLocalLocation = new AnimatTools.Framework.ScaledNumber(this, "ZLocalLocationScaled", "meters", "m");

            m_snXWorldLocation = new AnimatTools.Framework.ScaledNumber(this, "XWorldLocationScaled", "meters", "m");
            m_snYWorldLocation = new AnimatTools.Framework.ScaledNumber(this, "YWorldLocationScaled", "meters", "m");
            m_snZWorldLocation = new AnimatTools.Framework.ScaledNumber(this, "ZWorldLocationScaled", "meters", "m");

            m_snXRotation = new AnimatTools.Framework.ScaledNumber(this, "XRotationScaled", "Degrees", "Deg");
            m_snYRotation = new AnimatTools.Framework.ScaledNumber(this, "YRotationScaled", "Degrees", "Deg");
            m_snZRotation = new AnimatTools.Framework.ScaledNumber(this, "ZRotationScaled", "Degrees", "Deg");

            this.m_matTransparentSelectedMaterial = new Material();
            this.m_matTransparentSelectedMaterial.Diffuse = Color.FromArgb(128,Color.FloralWhite);
            this.m_matTransparentSelectedMaterial.Ambient = Color.FromArgb(128,Color.FloralWhite);

            Alpha = 255;
            Color = Color.Red;

            m_d3dRFPointMaterial = new Material();
            m_d3dRFPointMaterial.Ambient = Color.Green;
            m_d3dRFPointMaterial.Diffuse = Color.Green;

            m_d3dSelRFPointMaterial = new Material();
            m_d3dSelRFPointMaterial.Ambient = Color.DarkRed;
            m_d3dSelRFPointMaterial.Diffuse = Color.DarkRed;
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:39,代码来源:RigidBody_DX.cs


示例5: Clone

 public override AnimatTools.Framework.DataObject Clone(AnimatTools.Framework.DataObject doParent, bool bCutData, AnimatTools.Framework.DataObject doRoot)
 {
     Static bnPart = new Static(doParent);
     bnPart.CloneInternal(this, bCutData, doRoot);
     if(doRoot != null && doRoot == this) bnPart.AfterClone(this, bCutData, doRoot, bnPart);
     return bnPart;
 }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:7,代码来源:Static.cs


示例6: Stomach

        public Stomach(AnimatTools.Framework.DataObject doParent)
            : base(doParent)
        {
            try
            {
                m_thLinkedPart = new AnimatTools.TypeHelpers.LinkedBodyPartList(this);

                System.Reflection.Assembly myAssembly = System.Reflection.Assembly.Load("VortexAnimatTools");

                this.Size = new System.Drawing.SizeF(36, 40);
                this.Image = AnimatTools.Framework.ImageManager.LoadImage(ref myAssembly, "VortexAnimatTools.Graphics.Stomach_Button.gif", false);
                this.DragImage = AnimatTools.Framework.ImageManager.LoadImage(ref myAssembly, "VortexAnimatTools.Graphics.Stomach_Button.gif", false);
                this.Name = "Stomach";
                this.Description = "This node allows the user to collect interact with the Stomach object.";

                //Now lets try and find the image for this node.
                this.ImageIndex = FindDiagramImageIndex(this.GetType().FullName);

                m_tpBodyPartType = typeof(VortexAnimatTools.DataObjects.Physical.RigidBodies.Stomach);
            }
            catch(System.Exception ex)
            {
                AnimatTools.Framework.Util.DisplayError(ex);
            }
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:25,代码来源:Stomach.cs


示例7: Clone

 public override AnimatTools.Framework.DataObject Clone(AnimatTools.Framework.DataObject doParent, bool bCutData, AnimatTools.Framework.DataObject doRoot)
 {
     OdorSensor bnPart = new OdorSensor(doParent);
     bnPart.CloneInternal(this, bCutData, doRoot);
     bnPart.m_thOdorType = m_thOdorType;
     if(doRoot != null && doRoot == this) bnPart.AfterClone(this, bCutData, doRoot, bnPart);
     return bnPart;
 }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:8,代码来源:OdorSensor.cs


示例8: OdorSensor

        public OdorSensor(AnimatTools.Framework.DataObject doParent)
            : base(doParent)
        {
            m_thOdorType = new AnimatTools.TypeHelpers.LinkedOdorTypeList(null);

            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("OdorValue", "Odor Value", "", "", -1000, 1000));
            m_thDataTypes.ID = "OdorValue";
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:8,代码来源:OdorSensor.cs


示例9: LinearHillStretchReceptor

        public LinearHillStretchReceptor(AnimatTools.Framework.DataObject doParent)
            : base(doParent)
        {
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Ia", "Ia Discharge Rate" , "Spikes/s", "Spikes/s", 0, 1000));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("II", "II Discharge Rate", "Spikes/s", "Spikes/s", 0, 1000));
            m_thDataTypes.ID = "Ia";

            m_snIaDischargeConstant = new AnimatTools.Framework.ScaledNumber(this, "Ia Discharge Constant", 100, AnimatTools.Framework.ScaledNumber.enumNumericScale.None, "Spikes/sm", "Spikes/sm");
            m_snIIDischargeConstant = new AnimatTools.Framework.ScaledNumber(this, "II Discharge Constant", 100, AnimatTools.Framework.ScaledNumber.enumNumericScale.None, "Spikes/sm", "Spikes/sm");
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:10,代码来源:LinearHillStretchReceptor.cs


示例10: BoxContactSensor

 public BoxContactSensor(AnimatTools.Framework.DataObject doParent)
     : base(doParent)
 {
     m_thDataTypes.DataTypes.Clear();
     m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("ContactCount", "Contact Count", "", "", 0, 1));
     m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("BodyPositionX", "Position X Axis", "Meters", "m", -10, 10));
     m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("BodyPositionY", "Position Y Axis", "Meters", "m", -10, 10));
     m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("BodyPositionZ", "Position Z Axis", "Meters", "m", -10, 10));
     m_thDataTypes.ID = "ContactCount";
 }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:10,代码来源:BoxContactSensor.cs


示例11: AddChildBody

        public override void AddChildBody(AnimatTools.DataObjects.Physical.RigidBody rbChildBody)
        {
            //If you try and add a body to a muscle attachment then you really need to add it to the attachment parent.
            if(this.Parent != null)
            {
                AnimatTools.DataObjects.Physical.RigidBody rbParent = (AnimatTools.DataObjects.Physical.RigidBody) this.Parent;

                rbChildBody.Parent = rbParent;
                rbParent.AddChildBody(rbChildBody);
            }
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:11,代码来源:Sensor.cs


示例12: Cylinder

        public Cylinder(AnimatTools.Framework.DataObject doParent)
            : base(doParent)
        {
            m_fRadius = 0.5f;
            m_fHeight = 1;

            m_snRadius = new AnimatTools.Framework.ScaledNumber(this, "RadiusScaled", "meters", "m");
            m_snHeight = new AnimatTools.Framework.ScaledNumber(this, "HeightScaled", "meters", "m");

            m_vrSize = new DxCylinderSizeRef(this);
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:11,代码来源:Cylinder.cs


示例13: Box

        public Box(AnimatTools.Framework.DataObject doParent)
            : base(doParent)
        {
            m_vGraphicsBoxSize = new Vec3d(this);
            m_vGraphicsBoxSize.X = m_vGraphicsBoxSize.Y = m_vGraphicsBoxSize.Z = 1;

            m_snWidth = new AnimatTools.Framework.ScaledNumber(this, "WidthScaled", "meters", "m");
            m_snHeight = new AnimatTools.Framework.ScaledNumber(this, "HeightScaled", "meters", "m");
            m_snLength = new AnimatTools.Framework.ScaledNumber(this, "LengthScaled", "meters", "m");

            m_vrSize = new DxBoxSizeRef(this);
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:12,代码来源:Box.cs


示例14: MuscleAttachment

        public MuscleAttachment(AnimatTools.Framework.DataObject doParent)
            : base(doParent)
        {
            Alpha = 128;
            Color = Color.Orange;
            this.m_fRadius = 0.1f;

            m_thDataTypes.DataTypes.Clear();
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("BodyPositionX", "Position X Axis", "Meters", "m", -10, 10));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("BodyPositionY", "Position Y Axis", "Meters", "m", -10, 10));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("BodyPositionZ", "Position Z Axis", "Meters", "m", -10, 10));
            m_thDataTypes.ID = "BodyPositionX";
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:13,代码来源:MuscleAttachment.cs


示例15: Cone

        public Cone(AnimatTools.Framework.DataObject doParent)
            : base(doParent)
        {
            m_vrSize = new DxConeSizeRef(this);

            m_snUpperRadius = new AnimatTools.Framework.ScaledNumber(this, "UpperRadiusScaled", "meters", "m");
            m_snLowerRadius = new AnimatTools.Framework.ScaledNumber(this, "LowerRadiusScaled", "meters", "m");
            m_snHeight = new AnimatTools.Framework.ScaledNumber(this, "HeightScaled", "meters", "m");

            m_fLowerRadius = 0.5f;
            m_fUpperRadius = 0;
            m_fHeight = 1;
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:13,代码来源:Cone.cs


示例16: InverseMuscleDynamics

        public InverseMuscleDynamics(AnimatTools.Framework.DataObject doParent)
            : base(doParent)
        {
            m_tpBodyPartType = typeof(VortexAnimatTools.DataObjects.Physical.RigidBodies.MuscleBase);
            m_thMuscle = new AnimatTools.TypeHelpers.LinkedBodyPartList(null, null, m_tpBodyPartType);
            m_strMuscleLengthData = "";
            m_snConductance = new AnimatTools.Framework.ScaledNumber(this, "Conductance", 100, AnimatTools.Framework.ScaledNumber.enumNumericScale.nano, "Siemens", "S");
            m_snRestPotential = new AnimatTools.Framework.ScaledNumber(this, "RestPotential", -100, AnimatTools.Framework.ScaledNumber.enumNumericScale.milli, "Volts", "V");

            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("A", "A", "Newtons", "N", 0, 1000));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Vm", "Vm", "Volts", "V", -0.100, 0.100));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Current", "Current", "Amps", "A", -100e-9, 100e-9));
            m_thDataTypes.ID = "A";
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:14,代码来源:InverseMuscleDynamics.cs


示例17: VelocityClamp

        public VelocityClamp(AnimatTools.Framework.DataObject doParent)
            : base(doParent)
        {
            m_thPrimaryAttachment = new AnimatTools.TypeHelpers.LinkedBodyPartList(m_doStructure, null, m_tpBodyPartType);
            m_thSecondaryAttachment = new AnimatTools.TypeHelpers.LinkedBodyPartList(m_doStructure, null, m_tpBodyPartType);
            m_tpBodyPartType = typeof(VortexAnimatTools.DataObjects.Physical.RigidBodies.MuscleAttachment);
            m_snVelocity = new AnimatTools.Framework.ScaledNumber(this, "Velocity", 0, AnimatTools.Framework.ScaledNumber.enumNumericScale.None, "meters/second", "m/s");
            m_snMaxForce = new AnimatTools.Framework.ScaledNumber(this, "MaxForce", 1, AnimatTools.Framework.ScaledNumber.enumNumericScale.Kilo, "Newton", "N");

            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Force", "Force", "Newtons", "N", 0, 1000));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("PError", "Proportional Error", "Meters", "m", 0, 1000));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("DError", "Derivative Error", "M/s", "m/s", 0, 1));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("IError", "Integrator Error", "m^2", "m^2", 0, 1000));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Position", "Velocity", "m/s", "m/s", 0, 1000));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Velocity", "Acceleration", "m/s^2", "m/s^2", 0, 1000));
            m_thDataTypes.ID = "Force";
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:17,代码来源:VelocityClamp.cs


示例18: LoadData

        public override void LoadData(ref AnimatTools.DataObjects.Simulation dsSim, ref AnimatTools.DataObjects.Physical.PhysicalStructure doStructure, ref AnimatTools.Interfaces.StdXml oXml)
        {
            m_aryChildBodies.Clear();

            oXml.IntoElem(); //'Into RigidBody Element

            m_strID = oXml.GetChildString("ID");
            m_strName = oXml.GetChildString("Name", m_strID);
            m_bVisible = oXml.GetChildBool("IsVisible", m_bVisible);

            if(m_strID.Trim().Length == 0)
                m_strID = System.Guid.NewGuid().ToString();

            if(m_strName.Trim().Length == 0)
                m_strName = m_strID;

            if(oXml.FindChildElement("Color", false))
            {
                System.Drawing.Color oColor = Util.LoadColor(ref oXml, "Color");
                this.Alpha = oColor.A;
                this.Color = oColor;
            }

            m_fRadius = oXml.GetChildFloat("Radius", m_fRadius);

            if(oXml.FindChildElement("Direction",false))
            {
                this.m_v3Direction = new Vector3();
                Vec3d vDirection = Util.LoadVec3d(ref oXml, "Direction", this);
                m_v3Direction.X = (float)vDirection.X;
                m_v3Direction.Y = (float)vDirection.Y;
                m_v3Direction.Z = (float)vDirection.Z;
            }
            if(oXml.FindChildElement("OrientationMatrix", false))
            {
                m_mtxOrientation = Util_DX.LoadMatrix(ref oXml, "OrientationMatrix");
                m_v3Rotation = Util_DX.DecomposeXYZRotationMatrix(Orientation);
                this.Rotation = new Vec3d(null,Geometry.RadianToDegree(m_v3Rotation.X),Geometry.RadianToDegree(m_v3Rotation.Y),Geometry.RadianToDegree(m_v3Rotation.Z));
            }

            if(oXml.FindChildElement("TranslationMatrix",false))
                m_mtxTranslation = Util_DX.LoadMatrix(ref oXml,"TranslationMatrix");

            oXml.OutOfElem(); //Outof RigidBody Element
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:45,代码来源:Sensor.cs


示例19: Mouth

        public Mouth(AnimatTools.Framework.DataObject doParent)
            : base(doParent)
        {
            Alpha = 128;
            Color = Color.LightBlue;
            this.m_fRadius = 0.1f;

            m_snMinimumFoodRadius = new ScaledNumber(this, "MinimumFoodRadius", 10, ScaledNumber.enumNumericScale.centi, "meters", "m");

            m_thDataTypes.DataTypes.Clear();
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("BodyPositionX", "Position X Axis", "Meters", "m", -10, 10));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("BodyPositionY", "Position Y Axis", "Meters", "m", -10, 10));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("BodyPositionZ", "Position Z Axis", "Meters", "m", -10, 10));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("EatingRate", "Eating Rate", "", "", 0, 100));
            m_thDataTypes.ID = "EatingRate";

            this.ID = "MOUTH";
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:18,代码来源:Mouth.cs


示例20: LinearHillMuscle

        public LinearHillMuscle(AnimatTools.Framework.DataObject doParent)
            : base(doParent)
        {
            m_thDataTypes.DataTypes.Clear();

            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Tension", "Tension", "Newtons", "N", 0, 1000));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Tdot", "Change in Tension", "Newtons per second", "N/s", 0, 1000));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("MuscleLength", "Muscle Length", "Meters", "m", 0, 1));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("SeLength", "Se Length", "Meters", "m", 0, 1));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("SeDisplacement", "Se Displacement", "Meters", "m", 0, 1));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("PeLength", "Pe Length", "Meters", "m", 0, 1));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("A", "A", "Newtons", "N", 0, 1000));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Activation", "Activation", "", "", 0, 1000));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Vmuscle", "Muscle Velocity", "m/s", "m/s", -3, 3));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Vse", "Se Velocity", "m/s", "m/s", -3, 3));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Vpe", "Pe Velocity", "m/s", "m/s", -3, 3));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("AvgVmuscle", "Averaged Muscle Velocity", "m/s", "m/s", -3, 3));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("MembraneVoltage", "Membrane Voltage", "Volts", "V", -100, 100, ScaledNumber.enumNumericScale.milli, ScaledNumber.enumNumericScale.milli));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Displacement", "Muscle Displacement", "Meters", "m", 0, 1));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("DisplacementRatio", "Muscle Displacement Ratio", "", "", -1, 1));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Enable", "Enable", "", "", 0, 1));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Ib", "Ib Discharge Rate", "Spikes/s", "Spikes/s", 0, 1000));
            m_thDataTypes.DataTypes.Add(new AnimatTools.DataObjects.DataType("Tl", "Tension-Length Percentage", "%", "%", 0, 1000));
            m_thDataTypes.ID = "Tension";

            m_thIncomingDataType = new AnimatTools.DataObjects.DataType("MembraneVoltage", "Membrane Voltage", "Volts", "V", -100, 100, ScaledNumber.enumNumericScale.milli, ScaledNumber.enumNumericScale.milli);

            m_StimTension = new AnimatTools.DataObjects.Gains.MuscleGains.StimulusTension(this);
            m_LengthTension = new AnimatTools.DataObjects.Gains.MuscleGains.LengthTension(this);
            m_LengthTension.ShowLcePercentage = false;

            m_snMaxTension = new AnimatTools.Framework.ScaledNumber(this, "MaxTension", 100, AnimatTools.Framework.ScaledNumber.enumNumericScale.None, "Newtons", "N");
            m_snMuscleLength = new AnimatTools.Framework.ScaledNumber(this, "MuscleLength", 0, AnimatTools.Framework.ScaledNumber.enumNumericScale.None, "Meters", "m");
            m_snKse = new AnimatTools.Framework.ScaledNumber(this, "Kse", 10, AnimatTools.Framework.ScaledNumber.enumNumericScale.None, "Newtons per meter", "N/m");
            m_snKpe = new AnimatTools.Framework.ScaledNumber(this, "Kpe", 1, AnimatTools.Framework.ScaledNumber.enumNumericScale.None, "Newtons per meter", "N/m");
            m_snB = new AnimatTools.Framework.ScaledNumber(this, "B", 1, AnimatTools.Framework.ScaledNumber.enumNumericScale.None, "Newton-seconds per meter", "Ns/m");

            m_snPeLengthPercentage = new AnimatTools.Framework.ScaledNumber(this, "PeLengthPercentage", 90, AnimatTools.Framework.ScaledNumber.enumNumericScale.None, "%", "%");
            m_snMinPeLengthPercentage = new AnimatTools.Framework.ScaledNumber(this, "MinPeLengthPercentage", 5, AnimatTools.Framework.ScaledNumber.enumNumericScale.None, "%", "%");

            m_snIbDischargeConstant = new AnimatTools.Framework.ScaledNumber(this, "Ib Discharge Constant", 100, AnimatTools.Framework.ScaledNumber.enumNumericScale.None, "Spikes/sN", "Spikes/sN");
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:42,代码来源:LinearHillMuscle.cs



注:本文中的AnimatTools类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# AnimatedSprite类代码示例发布时间:2022-05-24
下一篇:
C# Animal类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap