public void Render(Vector3 pivotPoint, Color fillColor, Color borderLineColor, float sizeInPixels)
        {
            Camera  camera      = SceneViewCamera.Camera;
            Vector2 screenPoint = camera.WorldToScreenPoint(pivotPoint);

            Circle2D circle = new Circle2D(screenPoint, sizeInPixels * 0.5f);

            GizmosEx.Render2DFilledCircle(circle, fillColor);
            GizmosEx.Render2DCircleBorderLines(circle, borderLineColor);
        }
Exemple #2
0
        public void RenderGizmos()
        {
            if (_state != State.Inactive && _isPivotAvailable)
            {
                Circle2D circle = new Circle2D(SceneViewCamera.Camera.WorldToScreenPoint(_pivot), 6.0f);
                GizmosEx.Render2DCircleBorderLines(circle, Color.black);
                GizmosEx.Render2DFilledCircle(circle, Color.green);

                foreach (var parent in _selectedParents)
                {
                    OrientedBox worldOOBB = parent.GetHierarchyWorldOrientedBox();
                    GizmosEx.RenderOrientedBoxEdges(worldOOBB, Color.yellow);
                }
            }
        }
Exemple #3
0
        public void RenderGizmos(ObjectVertexSnapSession session, ObjectVertexSnapSessionRenderSettings renderSettings)
        {
            if (!session.IsActive)
            {
                return;
            }

            if (session.SourceGameObject != null)
            {
                if (renderSettings.RenderSourceVertex)
                {
                    Vector2 vertexScreenPos = SceneViewCamera.Camera.WorldToScreenPoint(session.SourceVertex);

                    Circle2D circle = new Circle2D(vertexScreenPos, renderSettings.SourceVertexRadiusInPixels);
                    GizmosEx.Render2DFilledCircle(circle, renderSettings.SourceVertexFillColor);
                    GizmosEx.Render2DCircleBorderLines(circle, renderSettings.SourceVertexBorderColor);
                }
            }
        }