BasicModel Class Reference

Class representing a model. More...

List of all members.

Public Member Functions

 BasicModel (string fileName, int index=0)
 Creates a model (from a file)
 BasicModel (byte[] fileImage, int index=0)
 Creates a model (from a file image)
void Dispose ()
 Frees unmanaged resources of a model.
void BindPrograms (BasicProgramContainer container)
 Links a program to a model.
void BindTextures (BasicTextureContainer container)
 Links a texture to a model.
void SetWorldMatrix (ref Matrix4 world)
 Sets a world matrix.
void SetCurrentMotion (int index, float delay=0.0f)
 Sets the current motion.
void Animate (float step)
 Calculates the model animation.
void Update ()
 Updates the model matrix.
void Draw (GraphicsContext graphics)
 Renders a model.
void Draw (GraphicsContext graphics, BasicProgram program)
 Renders a model (with the specified program)

Public Attributes

string Name
 Model name.
Vector4 BoundingSphere
 Bounding sphere.
Matrix4 WorldMatrix
 World matrix.
int CurrentMotion
 Current motion number.
float TransitionDelay
 Motion transition delay time (units = seconds)
BasicBone[] Bones
 Bone array included in a model.
BasicPart[] Parts
 Part array included in a model.
BasicMaterial[] Materials
 Material array included in a model.
BasicTexture[] Textures
 Texture array included in a model.
BasicMotion[] Motions
 Motion array included in a model.
BasicProgram[] Programs
 Program array included in a model.

Detailed Description

Class representing a model.


Constructor & Destructor Documentation

BasicModel ( string  fileName,
int  index = 0 
)

Creates a model (from a file)

Parameters:
fileNameFilename
indexModel number in a file
BasicModel ( byte[]  fileImage,
int  index = 0 
)

Creates a model (from a file image)

Parameters:
fileImageFile image
indexModel number in a file

Member Function Documentation

void Animate ( float  step)

Calculates the model animation.

Parameters:
stepStep time (unit = s)
void BindPrograms ( BasicProgramContainer  container)

Links a program to a model.

Parameters:
containerProgram Container
void BindTextures ( BasicTextureContainer  container)

Links a texture to a model.

Parameters:
containerTexture Container
void Draw ( GraphicsContext  graphics)

Renders a model.

Parameters:
graphicsGraphics Context
void Draw ( GraphicsContext  graphics,
BasicProgram  program 
)

Renders a model (with the specified program)

Parameters:
graphicsGraphics Context
programSpecified program
void SetCurrentMotion ( int  index,
float  delay = 0.0f 
)

Sets the current motion.

Parameters:
indexMotion number
delayDelay time (unit = s)
void SetWorldMatrix ( ref Matrix4  world)

Sets a world matrix.

Parameters:
worldWorld matrix