C# Class SkinnedModelPipeline.SkinnedModelProcessor

Inheritance: ModelProcessor
显示文件 Open project: zfedoran/bubblebound Class Usage Examples

Public Methods

Method Description
Process ( NodeContent input, ContentProcessorContext context ) : ModelContent

The main Process method converts an intermediate format content pipeline NodeContent tree to a ModelContent object with embedded animation data.

Protected Methods

Method Description
ConvertMaterial ( MaterialContent material, ContentProcessorContext context ) : MaterialContent

Override the ConvertMaterial method to apply our custom InstancedModel.fx shader.

Private Methods

Method Description
CompareKeyframeTimes ( Keyframe a, Keyframe b ) : int

Comparison function for sorting keyframes into ascending time order.

FlattenTransforms ( NodeContent node, BoneContent skeleton ) : void

Bakes unwanted transforms into the model geometry, so everything ends up in the same coordinate system.

MeshHasSkinning ( MeshContent mesh ) : bool

Checks whether a mesh contains skininng information.

ProcessAnimation ( AnimationContent animation, int>.Dictionary boneMap ) : AnimationClip

Converts an intermediate format content pipeline AnimationContent object to our runtime AnimationClip format.

ProcessAnimations ( AnimationContentDictionary animations, IList bones ) : AnimationClip>.Dictionary

Converts an intermediate format content pipeline AnimationContentDictionary object to our runtime AnimationClip format.

ValidateMesh ( NodeContent node, ContentProcessorContext context, string parentBoneName ) : void

Makes sure this mesh contains the kind of data we know how to animate.

Method Details

ConvertMaterial() protected method

Override the ConvertMaterial method to apply our custom InstancedModel.fx shader.
protected ConvertMaterial ( MaterialContent material, ContentProcessorContext context ) : MaterialContent
material MaterialContent
context ContentProcessorContext
return MaterialContent

Process() public method

The main Process method converts an intermediate format content pipeline NodeContent tree to a ModelContent object with embedded animation data.
public Process ( NodeContent input, ContentProcessorContext context ) : ModelContent
input NodeContent
context ContentProcessorContext
return ModelContent