/// <summary> /// Sets the 3D representation of the kinect camera in the 3D representation of the room /// </summary> /// <param name="devKinect">the representation of the kinect camera of the IGS to get its information of size and /// and position</param> public void SetKinectCamera(DevKinect devKinect) { Point3D center = new Point3D(); HelixToolkit.Wpf.BoxVisual3D addKinect = new HelixToolkit.Wpf.BoxVisual3D(); RotateTransform3D trans = new RotateTransform3D(); AxisAngleRotation3D rotation = new AxisAngleRotation3D(); center.X = devKinect.ball.Center.X; center.Y = devKinect.ball.Center.Y; center.Z = devKinect.ball.Center.Z; addKinect.Center = center; addKinect.Length = 0.38; addKinect.Width = 0.156; addKinect.Height = 0.123; rotation.Axis = (new Vector3D(0, 1, 0)); rotation.Angle = devKinect.roomOrientation; trans.Rotation = rotation; trans.CenterX = center.X; trans.CenterY = center.Y; trans.CenterZ = center.Z; addKinect.Transform = trans; this.kinect = addKinect; mainViewport.Children.Remove(kinect); mainViewport.Children.Add(kinect); }
/// <summary> /// this method intializes the representation of the kinect camera used for positioning and /// visualization by reading the information out of the config.xml /// </summary> public void createIGSKinect() { float ballRad = 0.4f; Point3D kinectCenter = new Point3D(environmentHandler.getKinectPosX(), environmentHandler.getKinectPosY(), environmentHandler.getKinectPosZ()); Ball kinectBall = new Ball(kinectCenter, ballRad); double roomOrientation = environmentHandler.getKinecHorizontalAngle(); double tiltingDegree = environmentHandler.getKinectTiltAngle(); IGSKinect = new DevKinect("DevKinect", kinectBall, tiltingDegree, roomOrientation); }