For bugs and new features, use the issue tracker located at GitHub.
Also try the chat room!
Databinding HelixView (MVVM)
vuurvos wrote at 2011-04-21 16:08:
Hi,
I want to bind the HelixView3D to a model (MVVM design pattern). The only fully working way I found was by not using the MVVM design pattern. Since the MVVM pattern is a must and used in other all parts of the project, I want to use it also for the HelixView3D.
When I bind to the ModelVisual3D.content to its content in the model, the Viewport3DHelper doesnt work anymore. The viewport3DHelper doesn't detected a Visual3D which is near the clicked point. When I check the VisualChildernCount, its shows me one child.
I think the VisualChild isn't the child (3D Model) which I am clicking on. I guess its an ambientlight visual....
Regards
VuurVOS
zeux wrote at 2011-04-25 20:54:
try adding this to HelixView3D:
protected override void OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{ //base.OnItemsChanged(e); switch (e.Action) { case System.Collections.Specialized.NotifyCollectionChangedAction.Add: Add(e.NewItems.ToList<Visual3D>()); break; case System.Collections.Specialized.NotifyCollectionChangedAction.Move: break; case System.Collections.Specialized.NotifyCollectionChangedAction.Remove: Remove(e.OldItems.ToList<Visual3D>()); break; case System.Collections.Specialized.NotifyCollectionChangedAction.Replace: break; case System.Collections.Specialized.NotifyCollectionChangedAction.Reset: ClearChildren(); break; default: break; } }
objo wrote at 2011-06-19 12:27:
vuurvos: I added a MvvmDemo that binds to HelixVis3D.ItemsSource. Adding new Visual3Ds should work now. (In the past I have used to add Visual3Ds in the XAML and bind to Model3Ds in the ViewModels)
zeux: thanks for pointing out the missing code! I added it to HelixView3D with some modifications (seems like you have added different Add/Remove methods) The implementation of Move and Replace is also remaining, as you point out.
The MvvmDemo is not complete, will add more when I learn more Caliburn.Micro...
Orientation of image assigned to SphereVisual3D
tacheleu wrote at 2012-12-07 20:42:
I am using the helixtoolkit of codeplex.
¿How I can set the orientation of the image that I assign to a sphere3D?
I can assign the ImageMaterial but ¿how to rotate/orientate the image?
Thanks in advace
objo wrote at 2012-12-07 21:25:
To rotate the image, try applying a Transform2D to the TextureCoordinates in your sphere geometry.
Or create a material from a VisualBrush or ImageBrush that contains a rotated image (slower performance).
http://msdn.microsoft.com/en-us/library/system.windows.media.transform(v=vs.95).aspx
http://msdn.microsoft.com/en-us/library/system.windows.media.media3d.meshgeometry3d.texturecoordinates.aspx
F1 = click on bottom of cube
bennasi wrote at 2012-12-03 11:45:
Hi,
How can I make this:
If I press F1 I would like the same thing to happen (switch view) as it would do when clicking on the bottom of the view cube.
Thanks
objo wrote at 2012-12-03 21:26:
I think it should be possible to add a KeyBinding to the CameraController.BottomViewCommand!
But why F1? That's for help!
bennasi wrote at 2012-12-04 11:05:
Want to use the keybindings as they are in another software package (ANSA).
so I want to change the function keys to default camera positions.
I cannot find the helixviewport.cameracontroller.bottomviewcommand.
Could you give me some sample code please.
Disable Touch Pan and Rotate
rys322 wrote at 2012-04-25 17:29:
Does anyone know of a way to disable the pan and rotate manipulations when using multi-touch? I am using helixview on a project that works great with a mouse, but when I use it on a touch interface the pan and rotate operations interfere with me interacting with objects in the helixview. I do however like the pinch to zoom and would like to keep that want to keep that, but need a way to turn off pan and rotate. If needed I would be happy to make changes to the source, but figured maybe there is a more graceful way to solve the problem. Thanks!
objo wrote at 2012-04-25 22:30:
I added TouchMode and IsTouchZoomEnabled properties on the HelixViewport3D/CameraController classes. Set TouchMode = None, and it should hopefully not pan/rotate. Sorry, it has not been tested - I have no touch screen...
rys322 wrote at 2012-04-25 23:51:
Thanks for making those changes. Unfortunately, it still has some issues. When touchmode is set to none it still doesn't allow touches to transferred to the objects in the helixview. If you touch anywhere it takes you into camera change mode ( the circle in the center appears) but moving your finger does nothing.
Using Helix 3D with Visual C# Express
cobra18t wrote at 2011-11-28 17:53:
How can I use the Helix 3D toolkit with Visual C# Express 2010? The suggested SVN method requires an internet connection, which I cannot get on my development machine and NuGet does not work on Visual C# Express 2010. Does anyone know a way around this?
-Thomas
objo wrote at 2011-11-28 19:07:
hi Thomas, you have a "Download" link under the source code page. This will give you everything in a zip. Good luck!
scrollwheel zoom stops on large scene
mihaipruna wrote at 2014-08-17 17:53:
Is there a way to enable more zoom on a bigger scene?
mihaipruna wrote at 2014-08-19 17:26:
private void hv_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
{
if (hv.Camera.LookDirection.Length >= 800 && e.Delta < 0)
{
Vector3D vava = hv.Camera.LookDirection;
vava = Vector3D.Multiply(800 / vava.Length, vava);
hv.Camera.LookDirection = vava;
}
if (hv.Camera.LookDirection.Length <= 1 && e.Delta > 0)
{
Vector3D vava = hv.Camera.LookDirection;
vava.Normalize();
hv.Camera.LookDirection = vava;
}
}
How to import 3ds with materials
musicxpg wrote at 2013-02-26 05:40:
Than you!
Young
musicxpg wrote at 2013-02-26 06:14:
Many thanks to author's amazing Helix 3D toolkit!
Programmatic control of camera parameters
AnotherBor wrote at 2013-11-20 07:26:
First of all I want to say big THANK YOU to all the contributors and authors of Helix. THIS IS OSOM!
Now to the point.
I need to control FOV, point of view and other parameters of the scene in the code but with the visual effects provided by manual control.
For example, if I change camera FOV in CameraSettings in the code, the FOV changes instantly but other properties of the camera remain unchanged. That's obviously how it's supposed to be.
But when you change camera FOV using mouse, the distance of the camera is adjusted (behind the scenes) so that apparent perspective changes, but ZOOM remains constant.
How can I achieve the same in the code??
I have same question/requirement for other parameters. For example, it's super easy to control the point of view of camera using mouse. How could I change the camera position with the same nice animation and effects in code instead?
objo wrote at 2013-12-02 20:08:
ChangeDirection and LookAt has animation time parameters, I agree there should also be a ChangeFov method! I added an issue: https://helixtoolkit.codeplex.com/workitem/10010
AnotherBor wrote at 2014-01-03 14:48:
I have to say, I'm deeply impressed with helixtoolkit. Really great work!!
I'm sorry for not replying earlier. Too many things on my head.
Cylindrical panoramas
Provagino wrote at 2012-01-09 16:41:
How I do create a cylindrical panorama? ( Image source http://blog.360cities.net/)
Thanks
objo wrote at 2012-01-09 19:32:
A simple cylinder with the panorama as a texture should work! For spherical panoramas, use a sphere.
Remember to place the camera in the middle of the cylinder/sphere! And use an emissive material or ambient light!
AddTriangles error/fix
mentalarray wrote at 2012-04-08 04:32:
Hi
there seemed to be an error in the triangleIndices code for AddTriangles as i had points in all wrong places i have added code that fixes it below
//Not working (old code)
/*
int indexEnd = this.positions.Count;
for (int i = index0; i + 2 < indexEnd; i++)
{
this.triangleIndices.Add(i);
this.triangleIndices.Add(i + 1);
this.triangleIndices.Add(i + 2);
}
*/
//Working
for (int i = 0; i < this.positions.Count; i+=3)
{
this.triangleIndices.Add(i);
this.triangleIndices.Add(i + 1);
this.triangleIndices.Add(i + 2);
}
objo wrote at 2012-04-08 13:10:
thanks! I submitted a fix on the AddTriangles method. Notice that the triangle indices should be based on the index of the first point added (this will allow AddTriangles to be called multiple times). I also corrected some errors in the argument checks.
I found that this method is currently not in use in the library, but I will leave it there in case someone use it. Will add more unit tests/examples for the mesh builder later.
Mentalarray wrote at 2012-04-08 13:24:
Oh great objo yea i realised about the index afterwards as i was adding my object all in one go good point
great work on the whole library btw,,,
Customer support service by UserEcho