示例#1
0
            public static IndexOfMaxComponent3Job Init()
            {
                var length = 4;
                var job    = new IndexOfMaxComponent3Job
                {
                    In  = new NativeArray <float3>(length, Allocator.TempJob),
                    Out = new NativeArray <int>(length, Allocator.TempJob)
                };

                job.In[0] = new float3(-1, -1, 1);
                job.In[1] = new float3(1, -1, -1);
                job.In[2] = new float3(-1, 1, -1);
                job.In[3] = new float3(float.NaN, float.PositiveInfinity, float.NegativeInfinity);

                return(job);
            }
示例#2
0
        public void TestIndexOfMaxComponent()
        {
            var indexOfMaxComponent2Job = IndexOfMaxComponent2Job.Init();

            indexOfMaxComponent2Job.Run();
            indexOfMaxComponent2Job.Dispose();

            var indexOfMaxComponent3Job = IndexOfMaxComponent3Job.Init();

            indexOfMaxComponent3Job.Run();
            indexOfMaxComponent3Job.Dispose();

            var indexOfMaxComponent4Job = IndexOfMaxComponent4Job.Init();

            indexOfMaxComponent4Job.Run();
            indexOfMaxComponent4Job.Dispose();
        }