C# Класс Vitaboy.AvatarBase

Class for drawing and updating the meshes that make up an avatar. Also responsible for animating an avatar.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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)

Свойство Тип Описание
m_BodyEffect Microsoft.Xna.Framework.Graphics.BasicEffect
m_Devc GraphicsDevice

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
Dispose ( bool CleanUpManagedResources ) : void

Приватные методы

Метод Описание
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.

Описание методов

AdvanceFrame() публичный Метод

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.
Результат void

AvatarBase() публичный Метод

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.
Результат System

ChangeOutfit() публичный Метод

Changes this avatar's outfit.
public ChangeOutfit ( Outfit Oft, SkinType Type ) : void
Oft Files.Vitaboy.Outfit
Type SkinType
Результат void

ComputeBonePositions() публичный Метод

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.
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

protected Dispose ( bool CleanUpManagedResources ) : void
CleanUpManagedResources bool
Результат void

Render() публичный Метод

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.
Результат void

SetHead() публичный Метод

Sets this avatar's head outfit.
public SetHead ( Outfit HeadOutfit, SkinType Type ) : void
HeadOutfit Files.Vitaboy.Outfit
Type SkinType
Результат void

Update() публичный Метод

Updates this avatar's rotation.
public Update ( GameTime GTime ) : void
GTime Microsoft.Xna.Framework.GameTime A GameTime instance.
Результат void

Описание свойств

Animation публичное свойство

public Anim,Files.Vitaboy Animation
Результат Files.Vitaboy.Anim

HeadMesh публичное свойство

public Mesh,Files.Vitaboy HeadMesh
Результат Files.Vitaboy.Mesh

LeftHandTexture публичное свойство

public Texture2D,Microsoft.Xna.Framework.Graphics LeftHandTexture
Результат Microsoft.Xna.Framework.Graphics.Texture2D

RotationRange публичное свойство

public float RotationRange
Результат float

RotationSpeed публичное свойство

public float RotationSpeed
Результат float

RotationStartAngle публичное свойство

public float RotationStartAngle
Результат float

ShouldRotate публичное свойство

Should this avatar be rotated when rendered? Used for rendering in UI.
public bool ShouldRotate
Результат bool

Skel публичное свойство

public Skeleton,Files.Vitaboy Skel
Результат Files.Vitaboy.Skeleton

m_BodyEffect защищенное свойство

protected BasicEffect,Microsoft.Xna.Framework.Graphics m_BodyEffect
Результат Microsoft.Xna.Framework.Graphics.BasicEffect

m_Devc защищенное свойство

protected GraphicsDevice m_Devc
Результат GraphicsDevice