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

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

Creates an VertexAnimationTrack.
public CreateVertexTrack ( ushort handle, VertexAnimationType animType ) : VertexAnimationTrack
handle ushort Handle to give the track, used for accessing the track later.
animType VertexAnimationType
Результат VertexAnimationTrack
	    public VertexAnimationTrack CreateVertexTrack( ushort handle, VertexAnimationType animType )
		{
			VertexAnimationTrack track = new VertexAnimationTrack( this, handle, animType );

			// add the track to the list
			vertexTrackList[ handle ] = track;

			return track;
		}

Same methods

Animation::CreateVertexTrack ( ushort handle, VertexData targetVertexData, VertexAnimationType type ) : 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