Пример #1
0
        public void DrawTextLineTo(IScene3D dc, Matrix4x4 xform, string text, FontStyle color)
        {
            var offset = xform.Translation;

            foreach (var c in text)
            {
                _DrawGlyphAsLines(dc, xform, ref offset, c, color);
            }
        }
Пример #2
0
 public CanvasViewModel3d(
     IBitmapSource bitmapSource,
     IScene3D scene3D,
     ILogger logger,
     IDispatcherWrapper dispatcherWrapper)
 {
     _bitmapSource      = bitmapSource;
     _scene3D           = scene3D;
     _logger            = logger;
     _dispatcherWrapper = dispatcherWrapper;
 }
Пример #3
0
        public static Record3D CreateSideBySideSpheres()
        {
            var      record = new Record3D();
            IScene3D dc     = record;

            for (int i = 0; i < 2; ++i)
            {
                int x = -5 + i * 10;

                dc.DrawSphere((x, 0, -5), 8, (COLOR.Red, COLOR.Blue, 1));
                dc.DrawSphere((x, 0, 5), 8, COLOR.Red);

                dc = new Transforms.Decompose3D(record, 5, 3);
            }

            return(record);
        }
Пример #4
0
 public readonly void DrawTo(IScene3D dc, float cameraSize)
 {
     Camera.DrawCameraTo(dc, cameraSize);
     Camera.DrawFustrumTo(dc, cameraSize * 0.05f, COLOR.BlueViolet);
 }
Пример #5
0
 public static void DrawTextLine(this IScene3D dc, System.Numerics.Matrix4x4 xform, String text, ColorStyle color)
 {
     Fonts.FontDrawing.DrawFontAsLines(dc, xform, text, color);
 }
Пример #6
0
 public PlaneClip3D(IScene3D target, Plane plane)
 {
     _Target           = target;
     _DecomposedTarget = new Decompose3D(this, 6, 2);
     _Plane            = plane;
 }
Пример #7
0
 public static IScene3D CreateTransformed3D(this IScene3D t, XFORM4 xform)
 {
     return(xform.IsIdentity ? t : Transforms.Scene3DTransform.Create(t, xform));
 }
Пример #8
0
 public static ICanvas2D CreateTransformed2D(this IScene3D t, XFORM4 xform)
 {
     return(Transforms.Scene3DTransform.Create(t, xform));
 }
Пример #9
0
 public static void DrawAsset(this IScene3D dc, in XFORM4 transform, Object asset)