예제 #1
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_tpose_asset = null;
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #2
0
        //! 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);
            }
        }
		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;
		}
        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
 /**
  * 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
 //! Clears the tpose
 public void ClearTPose()
 {
     m_tpose       = null;
     m_tpose_asset = null;
 }
 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);
		}
		public void ResetTPose() {
			m_TPose = null;
			m_TPoseAsset = null;
		}