当前位置: 首页>>代码示例>>C#>>正文


C# AnimatTools类代码示例

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


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


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