예제 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (u_x1_3.Text == "" || u_x2_3.Text == "" || u_y1_3.Text == "" || u_y2_3.Text == "" || u_h1.Text == "" || u_h2.Text == "")
            {
                MessageBox.Show("Please Enter All The Values For Both The Vectors");
            }
            else
            {
                vector1_3 = new Genetibase.MathX.NuGenStructures.NuGenPnt3D();

                vector1_3._x = new Double[3];

                vector1_3._x[0] = Double.Parse(u_x1_3.Text);
                vector1_3._x[1] = Double.Parse(u_y1_3.Text);
                vector1_3._x[2] = Double.Parse(u_h1.Text);


                vector2_3    = new Genetibase.MathX.NuGenStructures.NuGenPnt3D();
                vector2_3._x = new Double[3];

                vector2_3._x[0] = double.Parse(u_x2_3.Text);
                vector2_3._x[1] = double.Parse(u_y2_3.Text);
                vector2_3._x[2] = Double.Parse(u_h2.Text);


                button_add_3.Enabled        = true;
                button_div_3.Enabled        = true;
                button_equal_3.Enabled      = true;
                button_less_equal_3.Enabled = true;
                button_mul_3.Enabled        = true;

                button_sub_3.Enabled = true;
            }
        }
예제 #2
0
 public static bool ApproxEquals(NuGenPnt3D a, NuGenPnt3D b)
 {
     return
         (Math.Abs(a._x[0] - b._x[0]) < NuGenVector.TINY_DOUBLE &&
          Math.Abs(a._x[1] - b._x[1]) < NuGenVector.TINY_DOUBLE &&
          Math.Abs(a._x[2] - b._x[2]) < NuGenVector.TINY_DOUBLE);
 }
예제 #3
0
 public static NuGenPnt3D Max(NuGenPnt3D a, NuGenPnt3D b)
 {
     return(new NuGenPnt3D(
                Math.Max(a._x[0], b._x[0]),
                Math.Max(a._x[1], b._x[1]),
                Math.Max(a._x[2], b._x[2])
                ));
 }
예제 #4
0
        public override bool Equals(object obj)
        {
            NuGenPnt3D x = (NuGenPnt3D)obj;

            return(
                _x[0] == x._x[0] &&
                _x[1] == x._x[1] &&
                _x[2] == x._x[2]
                );
        }
예제 #5
0
 public static NuGenBox3D operator +(NuGenBox3D b, NuGenBox3D c)
 {
     return(new NuGenBox3D(NuGenPnt3D.Min(b.lower, c.lower), NuGenPnt3D.Max(b.upper, c.upper)));
 }
예제 #6
0
 public bool IsOnBorder(NuGenPnt3D p)
 {
     return(IsInsideOrOnBorder(p) && !IsInside(p));
 }
예제 #7
0
 public bool IsInsideOrOnBorder(NuGenPnt3D p)
 {
     return(lower <= p && upper >= p);
 }
예제 #8
0
 public bool IsInside(NuGenPnt3D p)
 {
     return(lower < p && upper > p);
 }
예제 #9
0
 public NuGenBox3D(NuGenPnt3D lower, NuGenPnt3D upper)
 {
     this.lower = lower;
     this.upper = upper;
 }
예제 #10
0
 public static NuGenPnt3D Max(NuGenPnt3D a, NuGenPnt3D b)
 {
     return new NuGenPnt3D(
         Math.Max(a._x[0], b._x[0]),
         Math.Max(a._x[1], b._x[1]),
         Math.Max(a._x[2], b._x[2])
         );
 }
예제 #11
0
        private void button2_Click(object sender, EventArgs e)
        {


            if (u_x1_3.Text == "" || u_x2_3.Text == "" || u_y1_3.Text == "" || u_y2_3.Text == "" || u_h1.Text == "" || u_h2.Text == "")
            {
                MessageBox.Show("Please Enter All The Values For Both The Vectors");
            }
            else
            {
                vector1_3 = new Genetibase.MathX.NuGenStructures.NuGenPnt3D ();

                vector1_3._x = new Double[3];

                vector1_3._x[0] = Double.Parse(u_x1_3.Text);
                vector1_3._x[1] = Double.Parse(u_y1_3.Text);
                vector1_3._x[2] = Double.Parse(u_h1.Text);


                vector2_3 = new Genetibase.MathX.NuGenStructures.NuGenPnt3D ();
                vector2_3._x = new Double[3];

                vector2_3._x[0] = double.Parse(u_x2_3.Text);
                vector2_3._x[1] = double.Parse(u_y2_3.Text);
                vector2_3._x[2] = Double.Parse(u_h2.Text);


                button_add_3.Enabled = true;
                button_div_3.Enabled = true;
                button_equal_3.Enabled = true;
                button_less_equal_3.Enabled = true;
                button_mul_3.Enabled = true;

                button_sub_3.Enabled = true;

            }
        }
예제 #12
0
 public NuGenRay3D(NuGenPnt3D p, NuGenVec3D v)
 {
     this.p = p;
     this.v = v;
 }
예제 #13
0
 public NuGenRay3D(NuGenPnt3D p, NuGenVec3D v)
 {
     this.p = p;
     this.v = v;
 }
예제 #14
0
 public NuGenTriangle3D(NuGenPnt3D a, NuGenPnt3D b, NuGenPnt3D c)
 {
     p0 = a; p1 = b; p2 = c;
 }
예제 #15
0
 public NuGenSphere3D(NuGenPnt3D center, double radius)
 {
     this.center = center;
     this.radius = radius;
 }
예제 #16
0
 public NuGenTriangle3D(NuGenPnt3D a, NuGenPnt3D b, NuGenPnt3D c)
 {
     p0 = a; p1 = b; p2 = c;
 }
예제 #17
0
 public NuGenSphere3D(NuGenPnt3D center, double radius)
 {
     this.center = center;
     this.radius = radius;
 }