Axiom.Core.WireBoundingBox.WireBoundingBox C# (CSharp) Method

WireBoundingBox() public method

Default constructor.
public WireBoundingBox ( ) : System
return System
		public WireBoundingBox()
		{
			vertexData = new VertexData();
			vertexData.vertexCount = 24;
			vertexData.vertexStart = 0;

			renderOperation.vertexData = vertexData;
			renderOperation.operationType = OperationType.LineList;
			renderOperation.useIndices = false;

			// get a reference to the vertex declaration and buffer binding
			VertexDeclaration decl = vertexData.vertexDeclaration;
			VertexBufferBinding binding = vertexData.vertexBufferBinding;

			// add elements for position and color only
			decl.AddElement( PositionBinding, 0, VertexElementType.Float3, VertexElementSemantic.Position );

			// create a new hardware vertex buffer for the position data
			HardwareVertexBuffer buffer = HardwareBufferManager.Instance.CreateVertexBuffer( decl.Clone( PositionBinding ), vertexData.vertexCount, BufferUsage.StaticWriteOnly );

			// bind the position buffer
			binding.SetBinding( PositionBinding, buffer );

			this.material = (Material)MaterialManager.Instance[ "BaseWhiteNoLighting" ];
		}