public DefineSurface ( |
||
controlPointArray | /// An array containing the vertex data which define control points of the curves /// rather than actual vertices. Note that you are expected to provide not /// just position information, but potentially normals and texture coordinates too. /// The array is internally treated as a contiguous memory buffer without any gaps between the elements. /// The format of the buffer is defined in the VertexDeclaration parameter. /// | |
decl | Axiom.Graphics.VertexDeclaration | /// VertexDeclaration describing the contents of the buffer. /// Note this declaration must _only_ draw on buffer source 0! /// |
width | int | Specifies the width of the patch in control points. |
height | int | Specifies the height of the patch in control points. |
return | void |
public void DefineSurface( Array controlPointArray, VertexDeclaration decl, int width, int height )
{
DefineSurface( controlPointArray, decl, width, height, PatchSurfaceType.Bezier, AUTO_LEVEL, AUTO_LEVEL, VisibleSide.Front );
}
PatchSurface::DefineSurface ( |
// ------------------------------------ // ------------------------------------ /// <summary> /// Creates a new PatchMesh. /// </summary> /// <remarks> /// As defined in <see cref="MeshManager.CreateBezierPatch" />. /// </remarks> public PatchMesh(string name, System.Array controlPointBuffer, VertexDeclaration declaration, int width, int height, int uMaxSubdivisionLevel, int vMaxSubdivisionLevel, VisibleSide visibleSide, BufferUsage vbUsage, BufferUsage ibUsage, bool vbUseShadow, bool ibUseShadow) : base(name) { vertexBufferUsage = vbUsage; useVertexShadowBuffer = vbUseShadow; indexBufferUsage = ibUsage; useIndexShadowBuffer = ibUseShadow; // Init patch builder // define the surface // NB clone the declaration to make it independent vertexDeclaration = (VertexDeclaration)declaration.Clone(); patchSurface.DefineSurface(controlPointBuffer, vertexDeclaration, width, height, PatchSurfaceType.Bezier, uMaxSubdivisionLevel, vMaxSubdivisionLevel, visibleSide); }