helix-3d-toolkit

Asynchronous operations within a loop - how to keep control of execution?

一曲冷凌霜 提交于 2021-01-29 19:05:26
问题 Follow-on question to this one. I am trying to generate and save a series of images. Rendering is done by Helix Toolkit, which I am told utilises the WPF composite render thread. This is causing problems because it executes asynchronously. My original problem was that I couldn't save a given image because it hadn't yet been rendered at that time I was trying to save it. The above answer provides a workaround to this by putting the 'save' operation inside an Action which is called with low

How to resolve synchronisation problem with Helix Toolkit rendering on WPF composite render thread

江枫思渺然 提交于 2021-01-29 06:37:44
问题 C#, WPF, Helix Toolkit. I am trying to generate a bitmap from a HelixViewport3D and have encountered a few problems. The first problem is that I cannot find a way to render off-screen. There are a few references to this online (e.g. here) and as far as I can see it does not have a built-in solution. As a somewhat sub-optimal workaround I have proceeded to render to the screen where the user can see it, with the intention of creating a bitmap from that rendered image. I now have the problem

WPF with Helix toolkit, animate with code-behind?

邮差的信 提交于 2021-01-29 02:49:36
问题 I am new to WPF, and am trying to build a 3d viewport with helix toolkit. The viewport, grid etc show up as expected, And I add a simple tube. Now, i want to use a new function to update the Transform of the tube, based on user input, but I cannot get it to work. Where am i going wrong here? Thank you. .xaml <UserControl x:Class="WPFUserControl.UserControl1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http:

WPF with Helix toolkit, animate with code-behind?

不羁的心 提交于 2021-01-29 02:44:04
问题 I am new to WPF, and am trying to build a 3d viewport with helix toolkit. The viewport, grid etc show up as expected, And I add a simple tube. Now, i want to use a new function to update the Transform of the tube, based on user input, but I cannot get it to work. Where am i going wrong here? Thank you. .xaml <UserControl x:Class="WPFUserControl.UserControl1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http:

Why rendering image in code behind do not work?

穿精又带淫゛_ 提交于 2021-01-07 03:33:27
问题 I'm trying to generate screenshot from helix control but only in code behind - why this not work? Something is missing? private void generate() { ModelImporter importer = new ModelImporter(); Model3D model = importer.Load(@"c:\test\test.obj"); Model3DGroup group = new Model3DGroup(); group.Children.Add(model); ModelVisual3D myModelVisual3D = new ModelVisual3D(); myModelVisual3D.Content = group; HelixViewport3D viewer = new HelixViewport3D(); viewer.Children.Add(myModelVisual3D); Dispatcher

Why rendering image in code behind do not work?

≯℡__Kan透↙ 提交于 2021-01-07 03:33:09
问题 I'm trying to generate screenshot from helix control but only in code behind - why this not work? Something is missing? private void generate() { ModelImporter importer = new ModelImporter(); Model3D model = importer.Load(@"c:\test\test.obj"); Model3DGroup group = new Model3DGroup(); group.Children.Add(model); ModelVisual3D myModelVisual3D = new ModelVisual3D(); myModelVisual3D.Content = group; HelixViewport3D viewer = new HelixViewport3D(); viewer.Children.Add(myModelVisual3D); Dispatcher

ViewPort3D: How to create a WPF Object (Cube) with text on it from Code behind

老子叫甜甜 提交于 2020-01-24 13:42:53
问题 I want to draw a set of 3D-Cubes, each Cube should display a name and also should have its own event handler when the cube is selected. Is it possible to implement it using code behind or xaml binding? 回答1: To draw a 3D cube from code behind I would use the Helix3D toolkit CubeVisual3D. However if you want to stick with stock WPF 3D elements it is fairly simple to implement. start here to Learn about Text in 3D enviroments http://www.codeproject.com/Articles/33893/WPF-Creation-of-Text-Labels

ViewPort3D: How to create a WPF Object (Cube) with text on it from Code behind

主宰稳场 提交于 2020-01-24 13:41:33
问题 I want to draw a set of 3D-Cubes, each Cube should display a name and also should have its own event handler when the cube is selected. Is it possible to implement it using code behind or xaml binding? 回答1: To draw a 3D cube from code behind I would use the Helix3D toolkit CubeVisual3D. However if you want to stick with stock WPF 3D elements it is fairly simple to implement. start here to Learn about Text in 3D enviroments http://www.codeproject.com/Articles/33893/WPF-Creation-of-Text-Labels

Rotate an object in HelixViewport3D in a WPF app

僤鯓⒐⒋嵵緔 提交于 2020-01-23 07:57:06
问题 I'm trying to show a 3d object in a WPF app using helixtoolkit and rotate it according to 3 variables (user inputs) along x,y,z axes. But i coudn't find a function in helix toolkit to to rotate the 3d object. C# code using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows

Lights not working properly in Helix Sharp DX

情到浓时终转凉″ 提交于 2020-01-05 11:36:08
问题 I am trying to build an obj file viewer using Helix Toolkit (https://github.com/helix-toolkit/helix-toolkit) with SharpDX. So far I am able to load an object file and render it's contents to Helix Viewport3DX. Model looks good with some obj files but for others there are some lightning problem and back surfaces are always black. I am not sure what am I doing wrong. Is this light problem due to the fact that SharpDX does not support back materials?? Please help. Problem using Helix Sharp DX: