Axiom.Core.BillboardChain.SetupChainContainers C# (CSharp) Method

SetupChainContainers() protected method

protected SetupChainContainers ( ) : void
return void
		protected virtual void SetupChainContainers()
		{
			// allocate enough space for everything
			this.chainElementList = new List<Element>( this.chainCount * this.maxElementsPerChain );

			for ( int i = 0; i < this.chainCount * this.maxElementsPerChain; ++i )
				this.chainElementList.Add( new Element() );

			this.vertexData.vertexCount = this.chainElementList.Capacity * 2;

			// configure chains
			this.chainSegmentList = new List<ChainSegment>( this.chainCount );
			for ( int i = 0; i < this.chainCount; ++i )
			{
				this.chainSegmentList.Add( new ChainSegment() );
				this.chainSegmentList[ i ].start = i * this.maxElementsPerChain;
				this.chainSegmentList[ i ].tail = this.chainSegmentList[ i ].head = SEGMENT_EMPTY;
			}
		}