public IEnumerable <HitObject> GenerateHitObjects(IItem item)
        {
            var hitObjects = new List <HitObject> {
                // simple outer borders:
                new LineSeg(
                    new Vertex2D(_data.Right, _data.Top),
                    new Vertex2D(_data.Right, _data.Bottom),
                    _table.TableHeight,
                    _table.GlassHeight,
                    ItemType.Table,
                    item
                    ),
                new LineSeg(
                    new Vertex2D(_data.Left, _data.Bottom),
                    new Vertex2D(_data.Left, _data.Top),
                    _table.TableHeight,
                    _table.GlassHeight,
                    ItemType.Table,
                    item
                    ),
                new LineSeg(
                    new Vertex2D(_data.Right, _data.Bottom),
                    new Vertex2D(_data.Left, _data.Bottom),
                    _table.TableHeight,
                    _table.GlassHeight,
                    ItemType.Table,
                    item
                    ),
                new LineSeg(
                    new Vertex2D(_data.Left, _data.Top),
                    new Vertex2D(_data.Right, _data.Top),
                    _table.TableHeight,
                    _table.GlassHeight,
                    ItemType.Table,
                    item
                    )
            };

            // glass
            var rgv3D = new[] {
                new Vertex3D(_data.Left, _data.Top, _table.GlassHeight),
                new Vertex3D(_data.Right, _data.Top, _table.GlassHeight),
                new Vertex3D(_data.Right, _data.Bottom, _table.GlassHeight),
                new Vertex3D(_data.Left, _data.Bottom, _table.GlassHeight)
            };
            var hit3DPoly = new Hit3DPoly(rgv3D, ItemType.Table, item);

            hit3DPoly.CalcHitBBox();
            hitObjects.AddRange(hit3DPoly.ConvertToTriangles());

            foreach (var hitObject in hitObjects)
            {
                hitObject.ItemIndex   = _table.Index;
                hitObject.ItemVersion = _table.Version;
            }

            return(hitObjects);
        }
        public IEnumerable <HitObject> GenerateHitObjects()
        {
            var hitObjects = new List <HitObject> {
                // simple outer borders:
                new LineSeg(
                    new Vertex2D(_data.Right, _data.Top),
                    new Vertex2D(_data.Right, _data.Bottom),
                    _data.TableHeight,
                    _data.GlassHeight,
                    ItemType.Table
                    ),
                new LineSeg(
                    new Vertex2D(_data.Left, _data.Bottom),
                    new Vertex2D(_data.Left, _data.Top),
                    _data.TableHeight,
                    _data.GlassHeight,
                    ItemType.Table
                    ),
                new LineSeg(
                    new Vertex2D(_data.Right, _data.Bottom),
                    new Vertex2D(_data.Left, _data.Bottom),
                    _data.TableHeight,
                    _data.GlassHeight,
                    ItemType.Table
                    ),
                new LineSeg(
                    new Vertex2D(_data.Left, _data.Top),
                    new Vertex2D(_data.Right, _data.Top),
                    _data.TableHeight,
                    _data.GlassHeight,
                    ItemType.Table
                    )
            };

            // glass
            var rgv3D = new[] {
                new Vertex3D(_data.Left, _data.Top, _data.GlassHeight),
                new Vertex3D(_data.Right, _data.Top, _data.GlassHeight),
                new Vertex3D(_data.Right, _data.Bottom, _data.GlassHeight),
                new Vertex3D(_data.Left, _data.Bottom, _data.GlassHeight)
            };
            var hit3DPoly = new Hit3DPoly(rgv3D, ItemType.Table);

            hit3DPoly.CalcHitBBox();
            hitObjects.Add(hit3DPoly);

            return(hitObjects.ToArray());
        }