Example #1
0
        static void Main(string[] args)
        {
            List <CompontParam> param_list = new List <CompontParam>();
            CompontParam        param      = new CompontParam();

            param.name  = "test";
            param.param = new List <double>();
            param.param.Add(11);
            param_list.Add(param);
            RayLineCluster input = new RayLineCluster();

            input.ray_cluster = new List <RayLine>();
            RayLine line = new RayLine();

            line.start_point   = new Vector3();
            line.normal_line   = new Vector3();
            line.start_point.x = 1;
            line.start_point.y = 2;
            line.start_point.z = 3;
            line.normal_line.x = 4;
            line.normal_line.y = 5;
            line.normal_line.z = 6;

            input.ray_cluster.Add(line);
            List <RayLineCluster> output = new List <RayLineCluster>();

            TBTfront.Ant ant = new TBTfront.Ant();
            int          res = ant.clacLight(param_list, input, output);

            Console.WriteLine(output.Count);
            Console.WriteLine(output[0].ray_cluster[0].start_point.x);
            Console.WriteLine(output[0].ray_cluster[0].normal_line.y);
            Console.ReadKey();
        }
Example #2
0
        public void setup()
        {
            List <double> args = new List <double>();

            args.Add(0);
            args.Add(0);
            args.Add(1);
            args.Add(0);
            test = new StraightLine(args);

            List <double> args1 = new List <double>();

            args1.Add(0);
            args1.Add(1);
            args1.Add(1);
            args1.Add(2);
            straightLine = new StraightLine(args1);

            List <double> args2 = new List <double>();

            args2.Add(0);
            args2.Add(1);
            args2.Add(1);
            args2.Add(2);
            rayLine1 = new RayLine(args2);

            List <double> args3 = new List <double>();

            args3.Add(1);
            args3.Add(2);
            args3.Add(0);
            args3.Add(1);
            rayLine2 = new RayLine(args3);

            List <double> args4 = new List <double>();

            args4.Add(1);
            args4.Add(2);
            args4.Add(0);
            args4.Add(1);
            lineSegment = new LineSegment(args4);

            List <double> args5 = new List <double>();

            args5.Add(0);
            args5.Add(1);
            args5.Add(1);
            circle = new Circle(args5);

            List <double> args6 = new List <double>();

            args6.Add(1);
            args6.Add(1);
            args6.Add(1);
            args6.Add(2);
            straightLine1 = new StraightLine(args6);
        }