AvatarRenderer.Draw Method (Generic IList, AvatarExpression)

Draws the avatar to the current render target.

Dd940278.note(en-us,XNAGameStudio.40).gifWindows Specific Information
Avatar-related APIs are exposed on Windows to ease cross-platform development between Windows and the Xbox 360. All avatar-related methods return default values, and rendering methods do not draw anything to the screen.

Namespace: Microsoft.Xna.Framework.GamerServices
Assembly: Microsoft.Xna.Framework.Avatar (in microsoft.xna.framework.avatar.dll)

Syntax

public void Draw (
         IList<Matrix> bones,
         AvatarExpression expression
)

Parameters

  • bones
    Collection of current bone transforms for the avatar. The transforms are in local bone space relative to their parent.
  • expression
    Current expression textures for the avatar.

Remarks

If any avatar assets are not loaded, the standard loading effect is displayed (determined by the renderer's constructor call). Determine the current loading state by checking the value of the State property.

The avatar model is always rendered as if FillMode.Solid is the current fill mode value.

Note

The AvatarRenderer class requires each bone transformation to be decomposable. Passing a bone transformation matrix that is not decomposable to AvatarRenderer.Draw will result in a InvalidOperationException exception. Use Decompose on each matrix to ensure each matrix in the bone matrix collection is decomposable. If the matrix in question is not decomposable, Decompose will return false.

See Also

Reference

AvatarRenderer Class
AvatarRenderer Members
Microsoft.Xna.Framework.GamerServices Namespace

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP