Axiom.Core.MeshManager._getVertices C# (CSharp) Method

_getVertices() private method

private _getVertices ( Vector3 &points, Axiom bone ) : void
points Vector3
bone Axiom
return void
		private void _getVertices( ref Vector3[] points, Axiom.Animating.Bone bone )
		{
			Vector3 boneBase = bone.DerivedPosition;
			foreach ( Axiom.Animating.Bone childBone in bone.Children )
			{
				// The tip of the bone:
				Vector3 boneTip = childBone.DerivedPosition;
				// the base of the bone
				Vector3 arm = boneTip - boneBase;
				Vector3 perp1 = arm.Perpendicular();
				Vector3 perp2 = arm.Cross( perp1 );
				perp1.Normalize();
				perp2.Normalize();
				float boneLen = arm.Length;
				int offset = 6 * childBone.Handle;
				points[ offset + 0 ] = boneTip;
				points[ offset + 1 ] = boneBase;
				points[ offset + 2 ] = boneBase + boneLen / 10 * perp1;
				points[ offset + 3 ] = boneBase + boneLen / 10 * perp2;
				points[ offset + 4 ] = boneBase - boneLen / 10 * perp1;
				points[ offset + 5 ] = boneBase - boneLen / 10 * perp2;
				_getVertices( ref points, childBone );
			}
		}