Define() public method

public Define ( Array controlPointArray, Axiom.Graphics.VertexDeclaration declaration, int width, int height, int uMaxSubdivisionLevel, int vMaxSubdivisionLevel, VisibleSide visibleSide, BufferUsage vbUsage, BufferUsage ibUsage, bool vbUseShadow, bool ibUseShadow ) : void
controlPointArray System.Array
declaration Axiom.Graphics.VertexDeclaration
width int
height int
uMaxSubdivisionLevel int
vMaxSubdivisionLevel int
visibleSide VisibleSide
vbUsage BufferUsage
ibUsage BufferUsage
vbUseShadow bool
ibUseShadow bool
return void
Ejemplo n.º 1
0
		/// <summary>
		///     Creates a Bezier patch based on an array of control vertices.
		/// </summary>
		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;
		}