次の方法で共有


BasicEffect Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Contains a basic rendering effect.

Inheritance Hierarchy

System.Object
  Microsoft.Xna.Framework.Graphics.Effect
    Microsoft.Xna.Framework.Graphics.BasicEffect

Namespace:  Microsoft.Xna.Framework.Graphics
Assembly:  Microsoft.Xna.Framework.Graphics.Extensions (in Microsoft.Xna.Framework.Graphics.Extensions.dll)

Syntax

'Declaration
Public Class BasicEffect _
    Inherits Effect _
    Implements IEffectMatrices, IEffectLights, IEffectFog
public class BasicEffect : Effect, 
    IEffectMatrices, IEffectLights, IEffectFog

The BasicEffect type exposes the following members.

Constructors

  Name Description
Public method BasicEffect Initializes a new instance of the BasicEffect class.

Top

Properties

  Name Description
Public property Alpha Gets or sets the material alpha which determines its transparency. Range is between 1 (fully opaque) and 0 (fully transparent).
Public property AmbientLightColor Gets or sets the ambient color for a light, the range of color values is from 0 to 1.
Public property CurrentTechnique Gets or sets the active technique. (Inherited from Effect.)
Public property DiffuseColor Gets or sets the diffuse color for a material, the range of color values is from 0 to 1.
Public property DirectionalLight0 Gets the first directional light for this effect.
Public property DirectionalLight1 Gets the second directional light for this effect.
Public property DirectionalLight2 Gets the third directional light for this effect.
Public property EmissiveColor Gets or sets the emissive color for a material, the range of color values is from 0 to 1.
Public property FogColor Gets or sets the fog color, the range of color values is from 0 to 1.
Public property FogEnabled Enables fog.
Public property FogEnd Gets or sets the maximum z value for fog.
Public property FogStart Gets or sets the minimum z value for fog.
Public property IsDisposed Gets a value that indicates whether the object is disposed. (Inherited from Effect.)
Public property LightingEnabled Enables lighting for this effect.
Public property PreferPerPixelLighting Gets or sets a value indicating that per-pixel lighting should be used if it is available for the current adapter. Per-pixel lighting is available if a graphics adapter supports Pixel Shader Model 2.0.
Public property Projection Gets or sets the projection matrix. Use this matrix to change how a 3D image is converted to a 2D image that is rendered to the computer screen.
Public property SpecularColor Gets or sets the specular color for a material, the range of color values is from 0 to 1.
Public property SpecularPower Gets or sets the specular power of this effect material.
Public property Techniques Gets a collection of techniques that are defined for this effect. (Inherited from Effect.)
Public property Texture Gets or sets a texture to be applied by this effect.
Public property TextureEnabled Enables textures for this effect.
Public property VertexColorEnabled Enables use vertex colors for this effect.
Public property View Gets or sets the view matrix. Use this matrix to change the position and direction of the camera.
Public property World Gets or sets the world matrix. Use this matrix to change the position of the model, using world coordinates.

Top

Methods

  Name Description
Public method Dispose() Immediately releases the unmanaged resources used by this object. (Inherited from Effect.)
Protected method Dispose(Boolean) Releases the unmanaged resources used by the Effect and optionally releases the managed resources. (Inherited from Effect.)
Public method EnableDefaultLighting Enables default lighting for this effect.
Protected method Finalize Allows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object. (Inherited from Effect.)

Top

Version Information

Silverlight

Supported in: 5

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.