Пример #1
0
        public override void SetBoundingBox()
        {
            Vector3 topLeft  = GetCircleVector(Segmentation / 8, Segmentation) * OuterRadius * 1.2f + Vector3.Down * CaseHeight / 2;
            Vector3 botRight = GetCircleVector(Segmentation * 5 / 8, Segmentation) * OuterRadius * 1.2f + Vector3.Down * (Height + CaseHeight / 2);

            box     = new BoundingBox(topLeft, botRight);
            buffers = BoundingBoxBuffers.CreateBoundingBoxBuffers(box, device);
        }
Пример #2
0
        public override void SetBoundingBox()
        {
            Vector3 topLeft  = TopLeft * CaseRadius + Vector3.Up * HalfSideWidth + Vector3.UnitZ * Height + Vector3.Left * TopWidth;
            Vector3 botRight = BottomRight * CaseRadius + Vector3.Down * HalfSideWidth - Vector3.UnitZ * Height + Vector3.UnitX * TopWidth;

            box     = new BoundingBox(topLeft, botRight);
            buffers = BoundingBoxBuffers.CreateBoundingBoxBuffers(box, device);
        }