Example #1
0
            /// <inheritdoc />
            public override unsafe void OnDebugDraw(ViewportDebugDrawData data)
            {
                // Draw box volume debug shapes
                ParentNode.OnDebugDraw(data);

                // Draw plane of the selected side
                int trangle0, trangle1;

                switch (Index)
                {
                case 0:
                    // Front
                    trangle0 = 8;
                    trangle1 = 9;
                    break;

                case 1:
                    // Back
                    trangle0 = 10;
                    trangle1 = 11;
                    break;

                case 2:
                    // Up
                    trangle0 = 0;
                    trangle1 = 1;
                    break;

                case 3:
                    // Down
                    trangle0 = 4;
                    trangle1 = 5;
                    break;

                case 4:
                    // Left
                    trangle0 = 2;
                    trangle1 = 3;
                    break;

                case 5:
                    // Right
                    trangle0 = 6;
                    trangle1 = 7;
                    break;

                default: return;
                }
                var actor   = (BoxVolume)((BoxVolumeNode)ParentNode).Actor;
                var box     = actor.OrientedBox;
                var corners = stackalloc Vector3[8];

                box.GetCorners(corners);
                var t0    = BoxTrianglesIndicesCache[trangle0];
                var t1    = BoxTrianglesIndicesCache[trangle1];
                var color = Color.CornflowerBlue.AlphaMultiplied(0.3f);

                DebugDraw.DrawTriangle(corners[t0.X], corners[t0.Y], corners[t0.Z], color);
                DebugDraw.DrawTriangle(corners[t1.X], corners[t1.Y], corners[t1.Z], color);
            }
Example #2
0
            public override void OnDebugDraw(ViewportDebugDrawData data)
            {
                var actor      = (Spline)_node.Actor;
                var pos        = actor.GetSplinePoint(Index);
                var tangentIn  = actor.GetSplineTangent(Index, true).Translation;
                var tangentOut = actor.GetSplineTangent(Index, false).Translation;

                // Draw spline path
                ParentNode.OnDebugDraw(data);

                // Draw selected point highlight
                DebugDraw.DrawSphere(new BoundingSphere(pos, 5.0f), Color.Yellow, 0, false);

                // Draw tangent points
                if (tangentIn != pos)
                {
                    DebugDraw.DrawLine(pos, tangentIn, Color.White.AlphaMultiplied(0.6f), 0, false);
                    DebugDraw.DrawWireSphere(new BoundingSphere(tangentIn, 4.0f), Color.White, 0, false);
                }
                if (tangentIn != pos)
                {
                    DebugDraw.DrawLine(pos, tangentOut, Color.White.AlphaMultiplied(0.6f), 0, false);
                    DebugDraw.DrawWireSphere(new BoundingSphere(tangentOut, 4.0f), Color.White, 0, false);
                }
            }
Example #3
0
        /// <inheritdoc />
        public override void OnDebugDraw(ViewportDebugDrawData data)
        {
            base.OnDebugDraw(data);

            var transform = Actor.Transform;
            DebugDraw.DrawWireArrow(transform.Translation, transform.Orientation, 1.0f, Color.Red, 0.0f, false);
        }
Example #4
0
        /// <inheritdoc />
        public override void OnDebugDraw(ViewportDebugDrawData data)
        {
            base.OnDebugDraw(data);

            if (Actor is UIControl uiControl)
            {
                DebugDraw.DrawWireBox(uiControl.Bounds, Color.BlueViolet);
            }
        }
Example #5
0
        /// <inheritdoc />
        public override void OnDebugDraw(ViewportDebugDrawData data)
        {
            base.OnDebugDraw(data);

            if (Actor is UICanvas uiCanvas && uiCanvas.Is3D)
            {
                DebugDraw.DrawWireBox(uiCanvas.Bounds, Color.BlueViolet);
            }
        }
Example #6
0
            public override void OnDebugDraw(ViewportDebugDrawData data)
            {
                // Draw spline and spline point
                ParentNode.OnDebugDraw(data);

                // Draw selected tangent highlight
                var actor = (Spline)_node.Actor;
                var pos   = actor.GetSplineTangent(_index, _isIn).Translation;

                DebugDraw.DrawSphere(new BoundingSphere(pos, 5.0f), Color.YellowGreen, 0, false);
            }
Example #7
0
 /// <inheritdoc />
 public override void OnDebugDraw(ViewportDebugDrawData data)
 {
     ParentNode.OnDebugDraw(data);
     data.HighlightBrushSurface(Brush.Surfaces[Index]);
 }
Example #8
0
 /// <inheritdoc />
 public override void OnDebugDraw(ViewportDebugDrawData data)
 {
     ParentNode.OnDebugDraw(data);
 }