コード例 #1
0
ファイル: Faceshift.cs プロジェクト: Eddy002/SCARYGAME
        //! Loads the t pose of the character.
        public bool LoadTPoseFromFile(string filename_with_path)
        {
            TPose new_tpose = new TPose();

            if (new_tpose.loadFromFile(filename_with_path))
            {
                m_tpose       = new_tpose;
                m_tpose_asset = null;
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
ファイル: Faceshift.cs プロジェクト: Eddy002/SCARYGAME
        //! Loads the t pose of the character.
        public bool LoadTPoseFromAsset(TextAsset asset)
        {
            TPose new_tpose = new TPose();

            if (new_tpose.loadFromBytes(asset.bytes))
            {
                m_tpose       = new_tpose;
                m_tpose_asset = asset;
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #3
0
		public bool LoadTPoseFromAsset(TextAsset asset) {
			
			if (asset == null) return false;
			
			TPose tpose = new TPose();
			if (!tpose.LoadFromBytes(asset.bytes)) {
				ResetTPose();
				return false;
			}
			
			m_TPose = tpose;
			m_TPoseAsset = asset;
			
			return true;
		}
コード例 #4
0
        public bool LoadTPoseFromAsset(TextAsset asset)
        {
            if (asset == null)
            {
                return(false);
            }

            TPose tpose = new TPose();

            if (!tpose.LoadFromBytes(asset.bytes))
            {
                ResetTPose();
                return(false);
            }

            m_TPose      = tpose;
            m_TPoseAsset = asset;

            return(true);
        }
コード例 #5
0
        void Start()
        {
            m_mutex = new Mutex();

            m_data_parser   = new DataParser();
            m_current_track = new TrackData();

            m_connection = new NetworkConnection(this);
            if (!m_connection.Start(hostName, port, true))
            {
                Debug.LogError("could not access faceshift over the network on " + hostName + ":" + port + " using the TCP/IP protocol");
            }

            // get the blendshapes from fs studio
            askForBlendshapeNames();

            if (RetargetingAsset != null)
            {
                m_retargeting = ClipRetargeting.load(RetargetingAsset.bytes);
                if (m_retargeting == null)
                {
                    Debug.LogError("could not load retargeting from asset");
                }
            }

            if (TPoseAsset != null)
            {
                m_tpose = new TPose();
                if (!m_tpose.loadFromBytes(TPoseAsset.bytes))
                {
                    Debug.LogError("could not load tpose from asset");
                }
            }

            // get game object blendshapes and transformations
            Utils.getGameObjectBlendshapes(gameObject, m_game_object_blendshapes);
            Utils.getGameObjectTransformations(gameObject, m_game_object_transformations);
        }
コード例 #6
0
ファイル: Faceshift.cs プロジェクト: Eddy002/SCARYGAME
 /**
  * Saves the current pose of the character as T-pose
  * @param path [in] The path to the file
  */
 public void SetTPose()
 {
     m_tpose = new TPose();
     Utils.getGameObjectTransformations(gameObject, m_tpose.m_joints);
 }
コード例 #7
0
ファイル: Faceshift.cs プロジェクト: Eddy002/SCARYGAME
 //! Clears the tpose
 public void ClearTPose()
 {
     m_tpose       = null;
     m_tpose_asset = null;
 }
コード例 #8
0
 public void ResetTPose()
 {
     m_TPose      = null;
     m_TPoseAsset = null;
 }
コード例 #9
0
		//! Loads the t pose of the character.
		public bool LoadTPoseFromFile(string filename_with_path) {
		
			TPose new_tpose = new TPose();
			if (new_tpose.LoadFromFile (filename_with_path)) {
				m_TPose = new_tpose;
				m_TPoseAsset = null;
				return true;
			} else {
				return false;
			}
		}
コード例 #10
0
		/**
		 * Saves the current pose of the character as T-pose
		 * @param path [in] The path to the file
		 */
		public void SetTPose() {
			m_TPose = new TPose();
			Utils.GetGameObjectTransformations (gameObject, m_TPose.m_joints);
		}
コード例 #11
0
		public void ResetTPose() {
			m_TPose = null;
			m_TPoseAsset = null;
		}