Axiom.Core.MeshManager.CreateBezierPatch C# (CSharp) Метод

CreateBezierPatch() публичный Метод

Creates a Bezier patch based on an array of control vertices.
public CreateBezierPatch ( string name, string group, Array controlPointBuffer, Axiom.Graphics.VertexDeclaration declaration, int width, int height, int uMaxSubdivisionLevel, int vMaxSubdivisionLevel, VisibleSide visibleSide, BufferUsage vbUsage, BufferUsage ibUsage, bool vbUseShadow, bool ibUseShadow ) : PatchMesh
name string
group string
controlPointBuffer System.Array
declaration Axiom.Graphics.VertexDeclaration
width int
height int
uMaxSubdivisionLevel int
vMaxSubdivisionLevel int
visibleSide VisibleSide
vbUsage BufferUsage
ibUsage BufferUsage
vbUseShadow bool
ibUseShadow bool
Результат PatchMesh
		public PatchMesh CreateBezierPatch( string name, string group, Array controlPointBuffer, VertexDeclaration declaration,
			int width, int height, int uMaxSubdivisionLevel, int vMaxSubdivisionLevel, VisibleSide visibleSide,
			BufferUsage vbUsage, BufferUsage ibUsage, bool vbUseShadow, bool ibUseShadow )
		{
			if ( width < 3 || height < 3 )
			{
				throw new Exception( "Bezier patch requires at least 3x3 control points." );
			}
			PatchMesh mesh = (PatchMesh)this[ name ];

			if ( mesh != null )
			{
				throw new AxiomException( "A mesh with the name {0} already exists!", name );
			}

			mesh = new PatchMesh( this, name, nextHandle, group );

			mesh.Define( controlPointBuffer, declaration, width, height, uMaxSubdivisionLevel, vMaxSubdivisionLevel, visibleSide, vbUsage, ibUsage, vbUseShadow, ibUseShadow );

			mesh.Load();

			_add( mesh );

			return mesh;
		}