當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。