예제 #1
0
파일: MyMesh.cs 프로젝트: macupryk/EyeShot
        protected override bool ThroughTriangle(FrustumParams data)
        {
            SelectedSubItems.Sort();

            //if selection filter is ByPick/VisibleByPick selects only the first triangle
            if (vp.firstOnlyInternal && !vp.processVisibleOnly && SelectedSubItems.Count > 0)
            {
                return(false);
            }

            bool through = false;

            for (int i = 0; i < Triangles.Length; i++)
            {
                if (SelectedSubItems.BinarySearch(i) >= 0)
                {
                    continue;
                }

                if (ThroughTriangle(data, GetTriangleVertices(Triangles[i])))
                {
                    SelectedSubItems.Add(i);

                    through = true;

                    if (vp.firstOnlyInternal && !vp.processVisibleOnly)
                    {
                        return(true);
                    }
                }
            }

            return(through);
        }
예제 #2
0
파일: MyMesh.cs 프로젝트: macupryk/EyeShot
        protected override bool ThroughTriangleScreenPolygon(ScreenPolygonParams data)
        {
            SelectedSubItems.Sort();

            for (int i = 0; i < Triangles.Length; i++)
            {
                if (SelectedSubItems.BinarySearch(i) >= 0)
                {
                    continue;
                }

                var verts = GetTriangleVertices(Triangles[i]);
                if (ThroughTriangleScreenPolygon(verts[0], verts[1], verts[2], data))
                {
                    SelectedSubItems.Add(i);
                }
            }
            return(false);
        }