Exemplo n.º 1
0
 public Exhibition(string name, string path, GeometryHandler.Plane plane)
 {
     this.name = name;
     this.path = path;
     this.exhibitionPlane = plane;
     this.exhibits = new List<Exhibit>();
 }
Exemplo n.º 2
0
 public Exhibition(string name, string path, List<Point3D> plane, List<Exhibit> exhibits)
 {
     this.name = name;
     this.path = path;
     this.exhibitionPlane = new GeometryHandler.Plane(plane);
     this.exhibits = exhibits;
 }
Exemplo n.º 3
0
 public Exhibition(string name, GeometryHandler.Plane plane, List<Exhibit> exhibits)
 {
     this.name = name;
     this.exhibitionPlane = plane;
     this.exhibits = exhibits;
 }
Exemplo n.º 4
0
 // ONLY FOR IMMEDIATE AND PROPER INSTANTIATION (LOADING FROM CONFIG-FILE OR DEFAULT-VALUES) ! ! !
 public Exhibition(string name)
 {
     this.name = name;
     this.exhibitionPlane = new GeometryHandler.Plane();
 }
Exemplo n.º 5
0
 public Exhibition(string name, List<Point3D> plane)
 {
     this.name = name;
     this.exhibitionPlane = new GeometryHandler.Plane(plane);
     this.exhibits = new List<Exhibit>();
 }
Exemplo n.º 6
0
        private Point3D userPosition; // User's head position

        #endregion Fields

        #region Constructors

        // ONLY FOR IMMEDIATE AND PROPER INSTANTIATION (LOADING FROM CONFIG-FILE OR DEFAUL-VALUES) ! ! !
        public Exhibition()
        {
            this.exhibitionPlane = new GeometryHandler.Plane();
        }
Exemplo n.º 7
0
 public void setExhibitionPlane(GeometryHandler.Plane plane)
 {
     this.exhibitionPlane = plane;
 }
Exemplo n.º 8
0
        public GeometryHandler.Plane makePlane(GeometryHandler.Plane plane1, GeometryHandler.Plane plane2)
        {
            GeometryHandler.Plane plane = new GeometryHandler.Plane(geometryHandler.getCenter(plane1.Start, plane2.Start), geometryHandler.getCenter(plane1.End1, plane2.End1), geometryHandler.getCenter(plane1.End2, plane2.End2));

            return plane;
        }
Exemplo n.º 9
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            switch (this.headline)
            {
                case Headline.Start: //"load existing exhibition"
                    if (this.loadConfigDialog.ShowDialog() == true) // Temporary file path has been set
                    {
                        this.exhibition = this.fileHandler.loadExhibition(this.TMP_PATH);
                        this.TMP_PATH = null;

                        this.contentLabel1 = this.exhibition.getName().ToUpper();
                        this.contentButton4 = "Einstellungen";
                        this.contentButton5 = "schließen";
                        this.headline = Headline.Exhibition;
                        updateLayout();
                    }
                    break;
                case Headline.Exhibition: //"hidden"
                    break;
                case Headline.LoadExhibit: //"edit exhibit"
                    this.TMP_EXHIBIT = this.exhibition.getExhibit(this.TMP_EXHIBIT_INDEX);
                    this.TMP_EXHIBIT_INDEX = this.comboBox1.SelectedIndex - 1;

                    this.contentLabel1 = this.TMP_EXHIBIT.getName().ToUpper() + " - BEARBEITEN";
                    this.contentTextBox1 = this.TMP_EXHIBIT.getDescription();
                    this.headline = Headline.EditExhibit;
                    updateLayout();
                    break;
                case Headline.NewExhibit: //"load existing exhibit"
                    if (this.loadConfigDialog.ShowDialog() == true) // Temporary file path has been set
                    {
                        this.TMP_EXHIBIT = this.fileHandler.loadExhibit(this.TMP_PATH);
                        this.TMP_PATH = null;
                        this.exhibition.addExhibit(this.TMP_EXHIBIT);
                        this.TMP_EXHIBIT_INDEX = this.exhibition.getExhibits().Count - 1;

                        this.contentLabel1 = this.TMP_EXHIBIT.getName().ToUpper() + " - BEARBEITEN";
                        this.contentTextBox1 = this.TMP_EXHIBIT.getDescription();
                        this.headline = Headline.EditExhibit;
                        updateLayout();
                    }
                    else // Temporary file path hat not been set
                    { }
                    break;
                case Headline.EditExhibit: //"hidden"
                    break;
                case Headline.ExhibitionPlane: //"load exisiting definition of the exhibition plane"
                    if (this.loadConfigDialog.ShowDialog() == true) // Temporary file path has been set
                    {
                        this.TMP_EXHIBITION_PLANE = this.fileHandler.loadExhibitionPlane(this.TMP_PATH);
                        this.TMP_PATH = null;
                        this.exhibition = new Exhibition(this.TMP_NAME, this.TMP_EXHIBITION_PLANE);

                        this.contentLabel1 = this.exhibition.getName().ToUpper();
                        this.contentButton4 = "Einstellungen";
                        this.contentButton5 = "schließen";
                        this.headline = Headline.Exhibition;
                        updateLayout();
                    }
                    break;
                case Headline.ExhibitionPlaneDef: //"hidden"
                    break;
                case Headline.ExhibitionPlaneVal: //"hidden"
                    break;
                case Headline.ExhibitionPlaneDone: //"hidden"
                    break;
                case Headline.NewName: //"hidden"
                    break;
                case Headline.ExhibitDef: //"hidden"
                    break;
                case Headline.ExhibitVal: //"hidden"
                    break;
                case Headline.ExhibitDone: //"hidden"
                    break;
                case Headline.ExhibitionSettings: //"hidden"
                    break;
                case Headline.ExhibitSettings: //"hidden"
                    break;
                default:
                    break;
            }
        }
Exemplo n.º 10
0
        private void definePlane()
        {
            int mode = 2; // 0 := pointing, 1 := aiming, 2 := both
            this.calibrationHandler = new CalibrationHandler(this.SAMPLING_VECTORS); // Initiate calibrator
            List<GeometryHandler.Vector> vectors = sampleVectors(this.SAMPLING_POINTS, this.SAMPLING_POSITIONS, this.SAMPLING_VECTORS, mode); // Sampled vectors
            List<Point3D> corners = this.calibrationHandler.definePlane(vectors, this.SAMPLING_POSITIONS, mode); // Calibration-points

            switch (this.headline)
            {
                case Headline.ExhibitionPlaneDef:
                    this.TMP_EXHIBITION_PLANE = new GeometryHandler.Plane(corners);

                    this.contentLabel1 = this.TMP_NAME.ToUpper() + " - EBENENVALIDIERUNG";
                    this.contentLabel2 = this.INSTRUCTIONS_EXHIBITION_PLANE;
                    this.contentButton4 = "zurück";
                    this.contentButton5 = "Start";
                    this.headline = Headline.ExhibitionPlaneVal;

                    stopCalibration();
                    break;
                case Headline.ExhibitionPlaneVal:
                    this.TMP_EXHIBITION_PLANE_2 = new GeometryHandler.Plane(corners);

                    this.contentLabel1 = this.TMP_NAME.ToUpper() + " - EBENENBESTIMMUNG";
                    if (this.calibrationHandler.validatePlane(this.TMP_EXHIBITION_PLANE, this.TMP_EXHIBITION_PLANE_2))
                    {
                        this.exhibition = new Exhibition(this.TMP_NAME, this.calibrationHandler.makePlane(this.TMP_EXHIBITION_PLANE, this.TMP_EXHIBITION_PLANE_2));

                        this.contentLabel2 = "Eckpunkte erfolgreich validiert.";
                        this.contentButton4 = "zurück";
                        this.contentButton5 = "OK";
                        this.headline = Headline.ExhibitionPlaneDone;

                        stopCalibration();
                        stopTracking();
                    }
                    else
                    {
                        this.contentLabel2 = "Eckpunkte konnten nicht validiert werden." + '\n' + '\n' + "Erneut definieren?";
                        this.contentButton4 = "zurück";
                        this.contentButton5 = "OK";
                        this.headline = Headline.ExhibitionPlaneDef;

                        stopCalibration();
                    }

                    break;
                default:
                    MessageBox.Show("definePlane()-Problem!");
                    break;
            }
        }