packages/Windows API Code Pack 1.1/source/Samples/DirectX/CS/UtilitiesLibrary/MeshLoader/XMesh.cs
/// <summary>
/// Renders the mesh with the specified transformation
/// </summary>
/// <param name="modelTransform"></param>
Renders the mesh with the specified transformation
Renders the mesh with the specified transformation
public void Render(Matrix4x4F modelTransform)
        {
            rDescription.FillMode = wireFrame ? FillMode.Wireframe : FillMode.Solid;
            using (RasterizerState rState = this.manager.device.CreateRasterizerState(rDescription))
            {
                this.manager.device.RS.State = rState;
                this.manager.brightnessVariable.AsSingle = this.lightIntensity;
                if (rootParts != null)
                {
                    Matrix3D transform = modelTransform.ToMatrix3D();
                    foreach (Part part in rootParts)
                    {
                        RenderPart(part, transform, null);
                    }
                }
                this.manager.device.RS.State = null;
            }
        }
public void Render ( Matrix4x4F modelTransform ) { rDescription . FillMode = wireFrame ? FillMode . Wireframe : FillMode . Solid ; using ( RasterizerState rState = this . manager . device . CreateRasterizerState ( rDescription ) ) { this . manager . device . RS . State = rState ; this . manager . brightnessVariable . AsSingle = this . lightIntensity ; if ( rootParts != null ) { Matrix3D transform = modelTransform . ToMatrix3D ( ) ; foreach ( Part part in rootParts ) { RenderPart ( part , transform , null ) ; } } this . manager . device . RS . State = null ; } }
Renders the mesh with the specified transformation
Renders the mesh with the specified transformation
// setup rasterization // Note: see comment regarding input layout in RenderPart() // method; the same thing applies to the render state of the // rasterizer stage of the pipeline.
modelTransform
Matrix4x4F
None