示例#1
0
            private void OnDrawGizmos()
            {
                if (Slices != null && (viewParameters.drawSlices || viewParameters.drawSliceAABB))
                {
                    foreach (Slice slice in Slices)
                    {
                        foreach (FourierCurve curve in slice.curves)
                        {
                            if (viewParameters.drawSlices)
                            {
                                GizmosExtension.DrawCurve(curve, slice.LocalX, slice.LocalY, slice.RefPoint, GizmosExtension.lightGreen);
                            }

                            if (viewParameters.drawSliceAABB)
                            {
                                GizmosExtension.DrawRectangle(curve.AABB, slice.LocalX, slice.LocalY, slice.RefPoint, GizmosExtension.lightRed);
                            }
                        }
                    }
                }

                if (viewParameters.drawBoundingSphere && BoundingSphere.CenterW != null)
                {
                    Gizmos.color = GizmosExtension.lightBlue;
                    Gizmos.DrawWireSphere(BoundingSphere.CenterW, BoundingSphere.Radius);
                    //Gizmos.DrawSphere(BoundingSphere.Center, BoundingSphere.Radius);
                }
            }