コード例 #1
0
ファイル: Face.cs プロジェクト: kuramu1108/watch1159
        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
ファイル: Lug.cs プロジェクト: kuramu1108/watch1159
        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);
        }