public static void SaveToBitmap(string filePath, int width, int height, SceneView3D view, IDrawable3D scene)
        {
            var rt = CreateRenderTargetBitmap(width, height, view, scene);

            SaveToPNG(rt, filePath);
        }
예제 #2
0
 public DrawListItem(float distFromCameraSquared, IDrawable3D item)
 {
     DistFromCamera = distFromCameraSquared;
     ListItem       = item;
 }
        public static RENDERTARGET CreateRenderTargetBitmap(int width, int height, SceneView3D view, IDrawable3D scene)
        {
            var rt  = new RENDERTARGET(width, height, 96, 96, System.Windows.Media.PixelFormats.Default);
            var ctx = new WPFDrawingContext2D();

            ctx.DrawScene(rt, new Size(width, height), view, scene);
            return(rt);
        }
예제 #4
0
 public DrawListItem(Camera camera, IDrawable3D item)
 {
     DistFromCamera = Vector3.DistanceSquared(camera.CameraPosition, item.WorldPosition);
     ListItem       = item;
 }