C# Class Protogame.Model

This represents a runtime model, with full support for animation and bone manipulation.
Inheritance: IModel
Mostra file Open project: RedpointGames/Protogame Class Usage Examples

Public Methods

Method Description
CreateRenderRequest ( IRenderContext renderContext, IEffect effect, IEffectParameterSet effectParameterSet, Matrix transform ) : IRenderRequest

Creates a render request for the model using the specified transform.

Dispose ( ) : void
FreeCachedVertexBuffers ( ) : void

Frees any vertex buffers that are cached inside this model.

LoadBuffers ( GraphicsDevice graphicsDevice ) : void

Load the vertex and index buffer for this model.

Model ( IModelRenderConfiguration modelRenderConfigurations, IRenderBatcher renderBatcher, string name, IAnimationCollection availableAnimations, IMaterial material, IModelBone rootBone, ModelVertex vertexes, int indices ) : System

Initializes a new instance of the Model class.

Render ( IRenderContext renderContext, IEffect effect, IEffectParameterSet effectParameterSet, Matrix transform ) : void

Renders the model using the specified transform and GPU mapping.

Method Details

CreateRenderRequest() public method

Creates a render request for the model using the specified transform.
public CreateRenderRequest ( IRenderContext renderContext, IEffect effect, IEffectParameterSet effectParameterSet, Matrix transform ) : IRenderRequest
renderContext IRenderContext /// The render context. ///
effect IEffect
effectParameterSet IEffectParameterSet
transform Matrix /// The transform. ///
return IRenderRequest

Dispose() public method

public Dispose ( ) : void
return void

FreeCachedVertexBuffers() public method

Frees any vertex buffers that are cached inside this model.
public FreeCachedVertexBuffers ( ) : void
return void

LoadBuffers() public method

Load the vertex and index buffer for this model.
public LoadBuffers ( GraphicsDevice graphicsDevice ) : void
graphicsDevice GraphicsDevice /// The graphics device. ///
return void

Model() public method

Initializes a new instance of the Model class.
public Model ( IModelRenderConfiguration modelRenderConfigurations, IRenderBatcher renderBatcher, string name, IAnimationCollection availableAnimations, IMaterial material, IModelBone rootBone, ModelVertex vertexes, int indices ) : System
modelRenderConfigurations IModelRenderConfiguration
renderBatcher IRenderBatcher
name string
availableAnimations IAnimationCollection /// The available animations. ///
material IMaterial
rootBone IModelBone /// The root bone, or null if there's no skeletal information. ///
vertexes ModelVertex /// The vertexes associated with this model. ///
indices int /// The indices associated with the model. ///
return System

Render() public method

Renders the model using the specified transform and GPU mapping.
public Render ( IRenderContext renderContext, IEffect effect, IEffectParameterSet effectParameterSet, Matrix transform ) : void
renderContext IRenderContext /// The render context. ///
effect IEffect
effectParameterSet IEffectParameterSet
transform Matrix /// The transform. ///
return void