Esempio n. 1
0
 public Frame()
 {
     parts = new Part[16];
     for (int i = 0; i < parts.Length; i++)
         parts[i] = new Part();
     Name = "";
 }
Esempio n. 2
0
 public Frame()
 {
     part = new Part[16];
     for (int i = 0; i < part.Length; i++)
         part[i] = new Part();
     name = "";
 }
Esempio n. 3
0
        public Frame()
        {
            _parts = new Part[16];
            for (var i = 0; i < _parts.Length; i++)
                _parts[i] = new Part();

            Name = String.Empty;
        }
Esempio n. 4
0
 public Frame()
 {
     parts = new Part[16];
     for (int i = 0; i < parts.Length; i++)
     {
         parts[i] = new Part();
     }
     Name = String.Empty;
 }
Esempio n. 5
0
        public MicroLogLayout(string layout)
        {
            // split the layout into an array of parts
            if(!string.IsNullOrEmpty(layout)) {
                parts = Array.ConvertAll( splitter.Split(layout), delegate(string input){
                    Func<Part> factory;
                    return partFactories.TryGetValue(input, out factory) ? factory() : new StringPart(input);
                });
            } else {
                parts = new Part[] { new DefaultPart() };
            }

            // calculate estimated size
            Array.ForEach(parts, part => estimatedSize += part.ExpectedLength);
        }
Esempio n. 6
0
		void SetupJoints()
		{
			children = part.children.ToArray();
			localAnchors = new Vector3[children.Length];

			for(int i = 0; i < children.Length; i++)
			{
				children[i].attachJoint.Joint.autoConfigureConnectedAnchor = false;
				Vector3 connectedAnchor = children[i].attachJoint.Joint.connectedAnchor;
				Vector3 worldAnchor = children[i].attachJoint.Joint.connectedBody.transform.TransformPoint(connectedAnchor);
				Vector3 localAnchor = parentTransform.InverseTransformPoint(worldAnchor);
				localAnchors[i] = localAnchor;
			}

			setupComplete = true;
		}
Esempio n. 7
0
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 12JUN2009  James Shen                 	          Initial Creation
        ////////////////////////////////////////////////////////////////////////////
        /**
         * Constructor.
         * @param parts POST multipart message array.
         * @param boundary Boundray string splits the message body.
         */
        public PostData(Part[] parts, string boundary)
        {
            if (parts == null)
            {
                throw new ArgumentException("parts must be supplied");
            }

            if (parts.Length > 1 && boundary == null)
            {
                throw new ArgumentException
                        ("boundary must be specified for multipart");
            }

            this._parts = parts;
            this._boundary = boundary;
        }
Esempio n. 8
0
        public InventoryManager()
        {
            Console.WriteLine("[InventoryManager.InventoryManager]" +
                " Adding parts..");

            parts = new Part[5];

            for (int i = 0; i < 5; i++)
            {
                Part part = new Part("Part " + (i + 1));

                Thread.Sleep(10);

                parts[i] = part;

                Console.WriteLine("\tPart '{0}' on-hand = {1}", part.Sku, part.OnHand);
            }
        }
Esempio n. 9
0
        //Constructor
        public Model3(Graphics mainDrawingWindow, CallBack nextModelCallBack = null)
            : base(mainDrawingWindow, nextModelCallBack)
        {
            //Objects to move

            //test
            _parts = new Part[4];
            for (int i = 0; i < 4;i++)
                    _parts[i] = null;
            _containers = new Rectangle[4];
            _containers[0] = new Rectangle(869, 300, 50, 15);
            _containers[1] = new Rectangle(974, 300, 50, 15);
            _containers[2] = new Rectangle(1079, 300, 50, 15);
            _containers[3] = new Rectangle(974, 300, 50, 15);

            _drillRod = new Rectangle(990, 85, 20, 140);
            _drillHolderB = new Rectangle(970, 165, 60, 40);
            _drillHead = new Rectangle(970, 225, 60, 20);
            _checkoutCyl = new Rectangle(1095, 95, 20, 160);
            _checkoutCylHolder = new Rectangle(1103, 255, 4, 20);
        }
Esempio n. 10
0
File: Master.cs Progetto: nanase/ux
        /// <summary>
        /// サンプリング周波数を指定して新しい Master クラスのインスタンスを初期化します。
        /// </summary>
        /// <param name="samplingFreq">演奏に使用されるサンプリング周波数。</param>
        public Master(float samplingFreq, int partCount)
        {
            if (samplingFreq > 0.0f && samplingFreq <= float.MaxValue)
                this.samplingFreq = samplingFreq;
            else
                throw new ArgumentOutOfRangeException("samplingFreq", samplingFreq, "指定されたサンプリング周波数は無効です。");

            if (partCount < 0)
                throw new ArgumentOutOfRangeException("partCount", partCount, "無効なパート数が渡されました。");

            this.partCount = partCount;

            this.parts = new Part[partCount];

            for (int i = 0; i < this.partCount; i++)
                this.parts[i] = new Part(this);

            this.handleQueue = new Queue<Handle>();

            this.Reset();
        }
		public BodyCollisionFunctor(PhysicsManager manager)
		{
			_manager = manager;
			_taskManager = TaskManager.Current;

			int threads = TaskManager.ThreadCount;

			_alloc = new IAllocator<ContactConstraint>[threads];
			_items = new List<ContactConstraint>[threads];
			_contact = new ContactConstraint[threads];
			_a = new Part[threads];
			_b = new Part[threads];

			for (int i = 0; i < threads; i++)
			{
				_alloc[i] = new ContactConstraint.Allocator(manager.Game, manager.ContactPoolCapacity, 2, manager.MaxPointsPerContact);
				_items[i] = new List<ContactConstraint>();
			}

			_fastSpeedSquared = manager.SweepThresholdSquared;
		}
Esempio n. 12
0
        //Constructor
        public Model2(Graphics mainDrawingWindow, CallBack nextModelCallBack = null)
            : base(mainDrawingWindow, nextModelCallBack)
        {
            //Initialize brushes
            _brushOrange = new SolidBrush(Color.Orange);

            //Parts to move
            _auxPart = new Part(mainDrawingWindow, 595, 210);
            _auxPart2 = new Part(mainDrawingWindow, 595, 210);
            _auxPart.Hidden = true;
            Parts = new Part[3];
            Parts[0] = new Part(mainDrawingWindow, 540, 350);
            Parts[1] = new Part(mainDrawingWindow, 0, -20);
            Parts[2] = new Part(mainDrawingWindow, 0, -20);
            Parts[0].Hidden = true;
            Parts[1].Hidden = true;
            Parts[2].Hidden = true;
            _upsideViewedPart = new Rectangle(65, 95, 40, 40);

            _elevator = new Rectangle(425, 370, 170, 35);
            _elevatorCylinder = new Rectangle(425, 340, 80, 30);
            _elevatorPiston = new Rectangle(505, 350, 10, 10);
            _measurementCylinder = new Rectangle(545, 80, 30, 80);
            _measurementPiston = new Rectangle(555, 160, 10, 40);
            _topCylinder = new Rectangle(440, 25, 30, 70);
            _topPiston = new Rectangle(450, 95, 10, 10);
            _topPlatform = new Rectangle(425, 100, 170, 45);
            _downRamp = new[] { new Point(595, 360), new Point(775, 397), new Point(775, 405), new Point(595, 405) };
            _topRamp = new[] { new Point(595, 220), new Point(595, 245), new Point(865, 300), new Point(865, 275) };
            _rampTopView = new Rectangle(650, 80, 215, 70);
            _rampPiston1 = new Rectangle(760, 80, 10, 10);
            _rampPiston2 = new Rectangle(830, 80, 10, 40);

            _onRamp = false;
            _onDownRamp = false;
            _showTopView = false;
            _rotateAngle = 11.62f;
            _endFeederAnimation = false;
        }
Esempio n. 13
0
 private void InitializeParts()
 {
     Debug.Log("InitializeParts" + this);
     robotParts = new Part[PartCount];
     partsHolder = this.transform.FindChild("Parts");
     robotParts[LeftArm] = partsHolder.GetChild(LeftArm).GetComponent<Part>();
     robotParts[RightArm] = partsHolder.GetChild(RightArm).GetComponent<Part>();
     robotParts[LeftLeg] = partsHolder.GetChild(LeftLeg).GetComponent<Part>();
     robotParts[RightLeg] = partsHolder.GetChild(RightLeg).GetComponent<Part>();
 }
Esempio n. 14
0
    public VerticesTopo(List <Vector3> vertices, int size = VPAIR_SIZE)
    {
        vpair = new VHashNode[size];
        vcon = new VConnect[size];
        vpair_count = 0;
        vpair_cap = 65535;
        vcon_cap = 0;
        v = vertices;
        for (int i = 0; i < vpair.Length; i++)
        {
            vpair[i].vu = INVALID_V;            
            vpair[i].next_hash_idx = INVALID_V;
            vpair[i].flag = IS_MIN;
            vpair[i].part = UNKNOW;
            vpair[i].next_vi = INVALID_V;
        }

        for (int i = 0; i < vcon.Length; i++)        
            vcon[i].vi = null;

        part = new Part[4];           
    }
Esempio n. 15
0
 public Recipe(String name, Part[] parts, byte resultedAmmount)
 {
     this.name = name;
     this.parts = parts;
     this.resultedAmmount = resultedAmmount;
 }
Esempio n. 16
0
 private ProceduralMeshSource(Part[] blockParts)
 {
     _blockParts = blockParts;
 }
Esempio n. 17
0
 public Section(params Part[] parts)
 {
     this.parts = parts;
 }
Esempio n. 18
0
 public IMuseInternal()
 {
     _snm_triggers = new ImTrigger[16];
     for (int i = 0; i < _snm_triggers.Length; i++)
     {
         _snm_triggers[i] = new ImTrigger();
     }
     _channel_volume = new ushort[8];
     _channel_volume_eff = new ushort[8];
     _volchan_table = new ushort[8];
     _players = new Player[8];
     for (int i = 0; i < _players.Length; i++)
     {
         _players[i] = new Player();
     }
     _player_limit = _players.Length;
     _parts = new Part[32];
     for (int i = 0; i < _parts.Length; i++)
     {
         _parts[i] = new Part();
     }
     _global_instruments = new Instrument[32];
     for (int i = 0; i < _global_instruments.Length; i++)
     {
         _global_instruments[i] = new Instrument();
     }
     _cmd_queue = new CommandQueue[64];
     for (int i = 0; i < _cmd_queue.Length; i++)
     {
         _cmd_queue[i] = new CommandQueue();
     }
     _deferredCommands = new DeferredCommand[4];
     for (int i = 0; i < _deferredCommands.Length; i++)
     {
         _deferredCommands[i] = new DeferredCommand();
     }
     _timer_info_adlib = new TimerCallbackInfo();
     _timer_info_native = new TimerCallbackInfo();
 }
Esempio n. 19
0
        private void scriptPath_ModifiedChanged(object sender, EventArgs e)
        {
            if (File.Exists(this.scriptPath.Text) && Path.GetExtension(this.scriptPath.Text) == ".avs")
            {
                this.openFileDialog.InitialDirectory = Path.GetDirectoryName(this.scriptPath.Text);
                this.parts = ScriptCreator.ParseScript(this.scriptPath.Text);
                this.partsList.Items.Clear();

                foreach (Part p in this.parts)
                    this.partsList.Items.Add(p.Name + " (" + p.StartFrame + "," + p.EndFrame + ")" + (!p.Enabled ? " (" + (p.SUID != ScriptCreator.DEFAULT_UID ? "SUID: " + p.SUID : "No SUID specified") + ")" : ""), p.Enabled);

                this.scriptPath.Modified = false;
            }
        }