C# Class Vitaboy.AvatarBase

Class for drawing and updating the meshes that make up an avatar. Also responsible for animating an avatar.
Inheritance: IDisposable
Afficher le fichier Open project: Afr0Games/Project-Dollhouse Class Usage Examples

Méthodes publiques

Свойство Type Description
Animation Files.Vitaboy.Anim
HeadMesh Files.Vitaboy.Mesh
LeftHandTexture Microsoft.Xna.Framework.Graphics.Texture2D
RotationRange float
RotationSpeed float
RotationStartAngle float
ShouldRotate bool
Skel Files.Vitaboy.Skeleton

Protected Properties

Свойство Type Description
m_BodyEffect Microsoft.Xna.Framework.Graphics.BasicEffect
m_Devc GraphicsDevice

Méthodes publiques

Méthode Description
AdvanceFrame ( Anim Animation, float TimeDelta ) : void

Advances the frame of an animation for a skeleton used on this mesh.

AvatarBase ( GraphicsDevice Devc, Skeleton Skel ) : System

Creates a new instance of AvatarBase.

ChangeOutfit ( Outfit Oft, SkinType Type ) : void

Changes this avatar's outfit.

ComputeBonePositions ( Bone bone, Matrix world ) : void

Computes the absolute positions for all bones in a Skeleton.

Dispose ( ) : void
Render ( Matrix ViewMatrix, Matrix WorldMatrix, Matrix ProjectionMatrix ) : void

Renders the different meshes making up this avatar.

SetHead ( Outfit HeadOutfit, SkinType Type ) : void

Sets this avatar's head outfit.

Update ( GameTime GTime ) : void

Updates this avatar's rotation.

Méthodes protégées

Méthode Description
Dispose ( bool CleanUpManagedResources ) : void

Private Methods

Méthode Description
DegreesToRadians ( double Angle ) : double

Converts an angle given in degrees to radians.

TransformVertices ( Mesh Msh, Bone bone, MeshType MshType ) : void

Transforms all vertices in a given mesh to their correct positions.

Method Details

AdvanceFrame() public méthode

Advances the frame of an animation for a skeleton used on this mesh.
public AdvanceFrame ( Anim Animation, float TimeDelta ) : void
Animation Files.Vitaboy.Anim The animation to advance.
TimeDelta float The timedelta of the rendering loop.
Résultat void

AvatarBase() public méthode

Creates a new instance of AvatarBase.
public AvatarBase ( GraphicsDevice Devc, Skeleton Skel ) : System
Devc GraphicsDevice A GraphicsDevice instance.
Skel Files.Vitaboy.Skeleton A Skeleton instance.
Résultat System

ChangeOutfit() public méthode

Changes this avatar's outfit.
public ChangeOutfit ( Outfit Oft, SkinType Type ) : void
Oft Files.Vitaboy.Outfit
Type SkinType
Résultat void

ComputeBonePositions() public méthode

Computes the absolute positions for all bones in a Skeleton.
public ComputeBonePositions ( Bone bone, Matrix world ) : void
bone Files.Vitaboy.Bone The first bone in the skeleton.
world Matrix World matrix.
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Dispose() protected méthode

protected Dispose ( bool CleanUpManagedResources ) : void
CleanUpManagedResources bool
Résultat void

Render() public méthode

Renders the different meshes making up this avatar.
public Render ( Matrix ViewMatrix, Matrix WorldMatrix, Matrix ProjectionMatrix ) : void
ViewMatrix Matrix A view matrix.
WorldMatrix Matrix A world matrix.
ProjectionMatrix Matrix A projection matrix.
Résultat void

SetHead() public méthode

Sets this avatar's head outfit.
public SetHead ( Outfit HeadOutfit, SkinType Type ) : void
HeadOutfit Files.Vitaboy.Outfit
Type SkinType
Résultat void

Update() public méthode

Updates this avatar's rotation.
public Update ( GameTime GTime ) : void
GTime Microsoft.Xna.Framework.GameTime A GameTime instance.
Résultat void

Property Details

Animation public_oe property

public Anim,Files.Vitaboy Animation
Résultat Files.Vitaboy.Anim

HeadMesh public_oe property

public Mesh,Files.Vitaboy HeadMesh
Résultat Files.Vitaboy.Mesh

LeftHandTexture public_oe property

public Texture2D,Microsoft.Xna.Framework.Graphics LeftHandTexture
Résultat Microsoft.Xna.Framework.Graphics.Texture2D

RotationRange public_oe property

public float RotationRange
Résultat float

RotationSpeed public_oe property

public float RotationSpeed
Résultat float

RotationStartAngle public_oe property

public float RotationStartAngle
Résultat float

ShouldRotate public_oe property

Should this avatar be rotated when rendered? Used for rendering in UI.
public bool ShouldRotate
Résultat bool

Skel public_oe property

public Skeleton,Files.Vitaboy Skel
Résultat Files.Vitaboy.Skeleton

m_BodyEffect protected_oe property

protected BasicEffect,Microsoft.Xna.Framework.Graphics m_BodyEffect
Résultat Microsoft.Xna.Framework.Graphics.BasicEffect

m_Devc protected_oe property

protected GraphicsDevice m_Devc
Résultat GraphicsDevice