Axiom.Animating.Animation.CreateVertexTrack C# (CSharp) Метод

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

Creates a new VertexAnimationTrack automatically associated with a Vertex.
public CreateVertexTrack ( ushort handle, VertexData targetVertexData, VertexAnimationType type ) : VertexAnimationTrack
handle ushort Handle to give the track, used for accessing the track later.
targetVertexData Axiom.Graphics.VertexData Vertex object which will be affected by this track.
type VertexAnimationType
Результат VertexAnimationTrack
	    public VertexAnimationTrack CreateVertexTrack( ushort handle, VertexData targetVertexData,
													  VertexAnimationType type )
		{
			// create a new track and set it's target
			VertexAnimationTrack track = CreateVertexTrack( handle, type );
			track.TargetVertexData = targetVertexData;
			return track;
		}

Same methods

Animation::CreateVertexTrack ( ushort handle, VertexAnimationType animType ) : VertexAnimationTrack

Usage Example

Пример #1
0
		protected void ReadAnimationTrack( BinaryReader reader, Animation anim )
		{
			var type = ReadUShort( reader );
			var target = ReadUShort( reader );

			var track = anim.CreateVertexTrack( target, this.mesh.GetVertexDataByTrackHandle( target ), (VertexAnimationType)type );
			// Now read the key frames for this track
			if ( !IsEOF( reader ) )
			{
				var chunkID = ReadChunk( reader );
				while ( !IsEOF( reader ) &&
				        ( chunkID == MeshChunkID.AnimationMorphKeyframe || chunkID == MeshChunkID.AnimationPoseKeyframe ) )
				{
					switch ( chunkID )
					{
						case MeshChunkID.AnimationMorphKeyframe:
							ReadMorphKeyframe( reader, track );
							break;
						case MeshChunkID.AnimationPoseKeyframe:
							ReadPoseKeyframe( reader, track );
							break;
					}
					if ( !IsEOF( reader ) )
					{
						chunkID = ReadChunk( reader );
					}
				}
				if ( !IsEOF( reader ) )
				{
					// backpedal to the start of chunk
					Seek( reader, -ChunkOverheadSize );
				}
			}
		}
All Usage Examples Of Axiom.Animating.Animation::CreateVertexTrack