public static void SaveToBitmap(string filePath, int width, int height, SceneView3D view, IDrawable3D scene) { var rt = CreateRenderTargetBitmap(width, height, view, scene); SaveToPNG(rt, filePath); }
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); }
public DrawListItem(Camera camera, IDrawable3D item) { DistFromCamera = Vector3.DistanceSquared(camera.CameraPosition, item.WorldPosition); ListItem = item; }