Axiom.Core.MovableText.GetWorldTransforms C# (CSharp) Method

GetWorldTransforms() public method

public GetWorldTransforms ( Matrix4 matrices ) : void
matrices Axiom.Math.Matrix4
return void
		public override void GetWorldTransforms( Matrix4[] matrices )
		{
			if ( this.IsVisible && camera != null )
			{
				Matrix3 scale3x3 = Matrix3.Identity;

				// store rotation in a matrix
				Matrix3 rot3x3 = camera.DerivedOrientation.ToRotationMatrix();

				// parent node position
				Vector3 ppos = ParentNode.DerivedPosition + Vector3.UnitY * _additionalHeight;

				// apply scale
				scale3x3.m00 = ParentNode.DerivedScale.x / 2.0f;
				scale3x3.m11 = ParentNode.DerivedScale.y / 2.0f;
				scale3x3.m22 = ParentNode.DerivedScale.z / 2.0f;

				// apply all transforms to matrices
				matrices[ 0 ] = rot3x3 * scale3x3;
				matrices[ 0 ].Translation = ppos;
			}
		}