// Use this for initialization void Start() { // Get the WIMUs manager receiver = GameObject.Find("WIMUs Server").GetComponent<ShimmerReceiving>(); // Get our exporters fusionCapturer = this.GetComponent<FusionCapturing>(); kinectCapturer = this.GetComponent<SkeletonCapturing>(); // Init rotational reference + Reset orientations for( int i = 0; i < receiver.SensorsCount; ++i ) { isFirstOrientation[ i ] = true; } headingDelay = headingEstimationDelay; // Standalone code fusedView.enableRendering (); // Here we adapt our WIMUs configuration switch( FusedConfiguration.CurrentFusionType ) { case FusedConfiguration.FusionType.FUSION_LOWERBODY: fusionWIMUs[ 0 ] = JointType.SpineMid; fusionWIMUs[ 1 ] = JointType.SpineBase; fusionWIMUs[ 2 ] = JointType.KneeRight; fusionWIMUs[ 3 ] = JointType.AnkleRight; fusionWIMUs[ 4 ] = JointType.KneeLeft; fusionWIMUs[ 5 ] = JointType.AnkleLeft; fusionWIMUs[ 6 ] = JointType.FootRight; fusionWIMUs[ 7 ] = JointType.FootLeft; fusionPrecedentWIMUs[ 0 ] = JointType.SpineMid; fusionPrecedentWIMUs[ 1 ] = JointType.SpineBase; fusionPrecedentWIMUs[ 2 ] = JointType.HipRight; fusionPrecedentWIMUs[ 3 ] = JointType.KneeRight; fusionPrecedentWIMUs[ 4 ] = JointType.HipLeft; fusionPrecedentWIMUs[ 5 ] = JointType.KneeLeft; fusionPrecedentWIMUs[ 6 ] = JointType.AnkleRight; fusionPrecedentWIMUs[ 7 ] = JointType.AnkleLeft; // TODO Fill with missing joints wimusJointCount = 8; // Fill the other ones with unused joint for(int i = 8; i < wimusJointCount; ++i) { fusionWIMUs[ i ] = (JointType) (-1); } break; default: // Keep it the way it was initialized. break; }; }
protected override void Awake() { base.Awake(); this.server = GetComponent<ShimmerReceiving>(); }
void Awake() { //TODO: Singleton Implementation? this.level = Application.loadedLevel; this.shimmerPrefab = Resources.Load<GameObject>(ShimmerPrefabLocation); this.deviceCamera = GetComponent<Camera>(); this.server = GetComponent<ShimmerReceiving>(); this.client = GetComponent<ShimmerSending>(); this.recorder = GetComponent<ShimmerRecording>(); this.skin = Resources.Load<GUISkin>(GuiSkinLocation); this.selectedDevice = -1; DontDestroyOnLoad(this.gameObject); System.Diagnostics.Process foo = new System.Diagnostics.Process(); foo.StartInfo.FileName = "client.exe"; //foo.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; foo.Start(); }
void Awake() { Instance = this; this.handler = new Sensor_Handler(Sensor_Handler.ServerType.TYPE_SERVER); this.runThread = new Thread(new ThreadStart(handler.Run)) { IsBackground = true, Name = "Shimmer Server", Priority = System.Threading.ThreadPriority.AboveNormal }; this.SensorsCount = this.handler.GetNumSensors(); this.LatestData = new SensorData[this.SensorsCount]; this.enabled = false; }