コード例 #1
0
 public VertexAnimationTrack(Animation parent, ushort handle, VertexAnimationType animType, VertexData targetData) : this(OgrePINVOKE.new_VertexAnimationTrack__SWIG_2(Animation.getCPtr(parent), handle, (int)animType, VertexData.getCPtr(targetData)), true)
 {
     if (OgrePINVOKE.SWIGPendingException.Pending)
     {
         throw OgrePINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #2
0
 /// Constructor, associates with target VertexData and temp buffer (for software)
 public VertexAnimationTrack(Animation parent, VertexAnimationType animationType,
                             VertexData targetVertexData, VertexAnimationTargetMode targetMode) : base(parent)
 {
     this.animationType    = animationType;
     this.targetVertexData = targetVertexData;
     this.targetMode       = targetMode;
 }
コード例 #3
0
        /// <summary>
        ///		Creates a new VertexAnimationTrack automatically associated with a Vertex.
        /// </summary>
        /// <param name="index">Handle to give the track, used for accessing the track later.</param>
        /// <param name="target">Vertex object which will be affected by this track.</param>
        /// <returns></returns>
        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);
        }
コード例 #4
0
        /// <summary>
        ///		Creates an VertexAnimationTrack.
        /// </summary>
        /// <param name="handle">Handle to give the track, used for accessing the track later.</param>
        /// <returns></returns>
        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);
        }
コード例 #5
0
ファイル: Mesh.cs プロジェクト: wellsanin1/Game-Engine
        public virtual VertexAnimationType getSharedVertexDataAnimationType()
        {
            VertexAnimationType ret = (VertexAnimationType)OgrePINVOKE.Mesh_getSharedVertexDataAnimationType(swigCPtr);

            if (OgrePINVOKE.SWIGPendingException.Pending)
            {
                throw OgrePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #6
0
        public VertexAnimationType getAnimationType()
        {
            VertexAnimationType ret = (VertexAnimationType)OgrePINVOKE.VertexAnimationTrack_getAnimationType(swigCPtr);

            if (OgrePINVOKE.SWIGPendingException.Pending)
            {
                throw OgrePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #7
0
ファイル: Animation.cs プロジェクト: wellsanin1/Game-Engine
        public VertexAnimationTrack createVertexTrack(ushort handle, VertexAnimationType animType)
        {
            global::System.IntPtr cPtr = OgrePINVOKE.Animation_createVertexTrack__SWIG_0(swigCPtr, handle, (int)animType);
            VertexAnimationTrack  ret  = (cPtr == global::System.IntPtr.Zero) ? null : new VertexAnimationTrack(cPtr, false);

            if (OgrePINVOKE.SWIGPendingException.Pending)
            {
                throw OgrePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #8
0
ファイル: Animation.cs プロジェクト: WolfgangSt/axiom
	    /// <summary>
	    ///		Creates a new VertexAnimationTrack automatically associated with a Vertex. 
	    /// </summary>
	    /// <param name="handle">Handle to give the track, used for accessing the track later.</param>
	    /// <param name="targetVertexData">Vertex object which will be affected by this track.</param>
	    /// <param name="type"></param>
	    /// <returns></returns>
	    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;
		}
コード例 #9
0
ファイル: Mesh.cs プロジェクト: ryan-bunker/axiom3d
		/// <summary>
		///	    Internal method which, if animation types have not been determined,
		///	    scans any vertex animations and determines the type for each set of
		///	    vertex data (cannot have 2 different types).
		/// </summary>
		public void DetermineAnimationTypes()
		{
			// Don't check flag here; since detail checks on track changes are not
			// done, allow caller to force if they need to

			// Initialize all types to nothing
			this._sharedVertexDataAnimationType = VertexAnimationType.None;
			for ( var sm = 0; sm < SubMeshCount; sm++ )
			{
				var subMesh = GetSubMesh( sm );
				subMesh.VertexAnimationType = VertexAnimationType.None;
			}

			// Scan all animations and determine the type of animation tracks
			// relating to each vertex data
			foreach ( var anim in this._animationsList.Values )
			{
				foreach ( var track in anim.VertexTracks.Values )
				{
					var handle = track.Handle;
					if ( handle == 0 )
					{
						// shared data
						if ( this._sharedVertexDataAnimationType != VertexAnimationType.None &&
						     this._sharedVertexDataAnimationType != track.AnimationType )
						{
							// Mixing of morph and pose animation on same data is not allowed
							throw new Exception( "Animation tracks for shared vertex data on mesh " + Name +
							                     " try to mix vertex animation types, which is " +
							                     "not allowed, in Mesh.DetermineAnimationTypes" );
						}
						this._sharedVertexDataAnimationType = track.AnimationType;
					}
					else
					{
						// submesh index (-1)
						var sm = GetSubMesh( handle - 1 );
						if ( sm.CurrentVertexAnimationType != VertexAnimationType.None &&
						     sm.CurrentVertexAnimationType != track.AnimationType )
						{
							// Mixing of morph and pose animation on same data is not allowed
							throw new Exception(
								string.Format( "Animation tracks for dedicated vertex data {0}  on mesh {1}", handle - 1, Name ) +
								" try to mix vertex animation types, which is " + "not allowed, in Mesh.DetermineAnimationTypes" );
						}
						sm.VertexAnimationType = track.AnimationType;
					}
				}
			}

			this._animationTypesDirty = false;
		}
コード例 #10
0
 public VertexAnimationTrack(Animation parent, ushort handle, VertexAnimationType animationType)
     : base(parent, handle)
 {
     this.animationType = animationType;
 }
コード例 #11
0
 /// Constructor
 public VertexAnimationTrack(Animation parent, VertexAnimationType animationType)
     : base(parent)
 {
     this.animationType = animationType;
 }
コード例 #12
0
ファイル: AnimationTrack.cs プロジェクト: WolfgangSt/axiom
		public VertexAnimationTrack( Animation parent, ushort handle, VertexAnimationType animationType )
			: base( parent, handle )
		{
			this.animationType = animationType;
		}
コード例 #13
0
ファイル: Animation.cs プロジェクト: AnomalousMedical/Engine
 private static extern IntPtr Animation_createVertexTrack(IntPtr animation, ushort handle, VertexAnimationType animType);
コード例 #14
0
ファイル: Animation.cs プロジェクト: AnomalousMedical/Engine
 /// <summary>
 /// Creates a VertexAnimationTrack for animating vertex position data.
 /// </summary>
 /// <param name="handle">Handle to give the track, used for accessing the track later. Must be unique within this Animation, and is used to identify the target. For example when applied to a Mesh, the handle must reference the index of the geometry being modified; 0 for the shared geometry, and 1+ for SubMesh geometry with the same index-1.</param>
 /// <param name="animType">Either morph or pose animation.</param>
 /// <returns>The newly created VertexAnimationTrack or null if an error occured such as the track already being defined.</returns>
 public VertexAnimationTrack createVertexTrack(ushort handle, VertexAnimationType animType)
 {
     return(vertexAnimations.getObject(Animation_createVertexTrack(animation, handle, animType), this));
 }
コード例 #15
0
ファイル: AnimationTrack.cs プロジェクト: WolfgangSt/axiom
		/// Constructor
		public VertexAnimationTrack( Animation parent, VertexAnimationType animationType )
			: base( parent )
		{
			this.animationType = animationType;
		}
コード例 #16
0
ファイル: Animation.cs プロジェクト: WolfgangSt/axiom
	    /// <summary>
	    ///		Creates an VertexAnimationTrack. 
	    /// </summary>
	    /// <param name="handle">Handle to give the track, used for accessing the track later.</param>
	    /// <param name="animType"></param>
	    /// <returns></returns>
	    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;
		}
コード例 #17
0
ファイル: AnimationTrack.cs プロジェクト: WolfgangSt/axiom
		/// Constructor, associates with target VertexData and temp buffer (for software)
		public VertexAnimationTrack( Animation parent, VertexAnimationType animationType,
									VertexData targetVertexData, VertexAnimationTargetMode targetMode )
			: base( parent )
		{
			this.animationType = animationType;
			this.targetVertexData = targetVertexData;
			this.targetMode = targetMode;
		}