Axiom.Core.BillboardSet.GenerateVertexOffsets C# (CSharp) Method

GenerateVertexOffsets() protected method

Generates vertex offsets.
Takes in parametric offsets as generated from GetParametericOffsets, width and height values and billboard x and y axes as generated from GenerateBillboardAxes. Fills output array of 4 vectors with vector offsets from origin for left-top, right-top, left-bottom, right-bottom corners.
protected GenerateVertexOffsets ( float left, float right, float top, float bottom, float width, float height, Vector3 &x, Vector3 &y, Vector3 destVec ) : void
left float
right float
top float
bottom float
width float
height float
x Vector3
y Vector3
destVec Vector3
return void
		protected void GenerateVertexOffsets( float left,
											  float right,
											  float top,
											  float bottom,
											  float width,
											  float height,
											  ref Vector3 x,
											  ref Vector3 y,
											  Vector3[] destVec )
		{
			Vector3 vLeftOff, vRightOff, vTopOff, vBottomOff;
			/* Calculate default offsets. Scale the axes by
			   parametric offset and dimensions, ready to be added to
			   positions.
			*/
			vLeftOff = x * ( left * width );
			vRightOff = x * ( right * width );
			vTopOff = y * ( top * height );
			vBottomOff = y * ( bottom * height );

			// Make final offsets to vertex positions
			destVec[ 0 ] = vLeftOff + vTopOff;
			destVec[ 1 ] = vRightOff + vTopOff;
			destVec[ 2 ] = vLeftOff + vBottomOff;
			destVec[ 3 ] = vRightOff + vBottomOff;
		}