Class SkinnedEffect
Built-in effect for rendering skinned character models.
public class SkinnedEffect : Effect, IDisposable, IEffectMatrices, IEffectLights, IEffectFog, IEffectBones
- Inheritance
-
SkinnedEffect
- Implements
- Inherited Members
Constructors
SkinnedEffect(GraphicsDevice)
Creates a new SkinnedEffect with default parameter settings.
public SkinnedEffect(GraphicsDevice device)
Parameters
device
GraphicsDevice
SkinnedEffect(SkinnedEffect)
Creates a new SkinnedEffect by cloning parameter settings from an existing instance.
protected SkinnedEffect(SkinnedEffect cloneSource)
Parameters
cloneSource
SkinnedEffect
Fields
MaxBones
The maximum number of bones.
public const int MaxBones = 72
Field Value
Properties
Alpha
Gets or sets the material alpha.
public float Alpha { get; set; }
Property Value
AmbientLightColor
Gets or sets the ambient light color (range 0 to 1).
public Vector3 AmbientLightColor { get; set; }
Property Value
DiffuseColor
Gets or sets the material diffuse color (range 0 to 1).
public Vector3 DiffuseColor { get; set; }
Property Value
DirectionalLight0
Gets the first directional light.
public DirectionalLight DirectionalLight0 { get; }
Property Value
DirectionalLight1
Gets the second directional light.
public DirectionalLight DirectionalLight1 { get; }
Property Value
DirectionalLight2
Gets the third directional light.
public DirectionalLight DirectionalLight2 { get; }
Property Value
EmissiveColor
Gets or sets the material emissive color (range 0 to 1).
public Vector3 EmissiveColor { get; set; }
Property Value
FogColor
Gets or sets the fog color.
public Vector3 FogColor { get; set; }
Property Value
FogEnabled
Gets or sets the fog enable flag.
public bool FogEnabled { get; set; }
Property Value
FogEnd
Gets or sets the fog end distance.
public float FogEnd { get; set; }
Property Value
FogStart
Gets or sets the fog start distance.
public float FogStart { get; set; }
Property Value
PreferPerPixelLighting
Gets or sets the per-pixel lighting prefer flag.
public bool PreferPerPixelLighting { get; set; }
Property Value
Projection
Gets or sets the projection matrix.
public Matrix Projection { get; set; }
Property Value
SpecularColor
Gets or sets the material specular color (range 0 to 1).
public Vector3 SpecularColor { get; set; }
Property Value
SpecularPower
Gets or sets the material specular power.
public float SpecularPower { get; set; }
Property Value
Texture
Gets or sets the current texture.
public Texture2D Texture { get; set; }
Property Value
View
Gets or sets the view matrix.
public Matrix View { get; set; }
Property Value
WeightsPerVertex
Gets or sets the number of skinning weights to evaluate for each vertex (1, 2, or 4).
public int WeightsPerVertex { get; set; }
Property Value
World
Gets or sets the world matrix.
public Matrix World { get; set; }
Property Value
Methods
Clone()
Creates a clone of the current SkinnedEffect instance.
public override Effect Clone()
Returns
EnableDefaultLighting()
Sets up the standard key/fill/back lighting rig.
public void EnableDefaultLighting()
GetBoneTransforms(int)
Gets a copy of the current skinning bone transform matrices.
public Matrix[] GetBoneTransforms(int count)
Parameters
count
int
Returns
- Matrix[]
OnApply()
Lazily computes derived parameter values immediately before applying the effect.
protected override void OnApply()
SetBoneTransforms(Matrix[])
Sets an array of skinning bone transform matrices.
public void SetBoneTransforms(Matrix[] boneTransforms)
Parameters
boneTransforms
Matrix[]