This is the discussion forum for Helix Toolkit.
For bugs and new features, use the issue tracker located at GitHub.
Also try the chat room!
0

AddPolygon wrong number of normals

Anonymous 12 years ago updated by asim 2 months ago 1
This discussion was imported from CodePlex

murray_b wrote at 2012-01-30 05:07:

Hi 

I am trying to display a mesh created from a polygon.

But when I run the toMesh I am getting the message "Wrong number of normals" And I am not sure what that message is referring to.

 

List<Point3D> vrt = new List<Point3D>();
                // Create a list of Points
                for (int i = 0; i < set.Count(); i++)
                {
                    vrt.Add(
                     new Point3D
                    (
                        
                          (double)set[i].X,
                        (double)set[i].Y,
                        (double)set[i].Z
                    ));

                }

                var surface = new MeshBuilder();
                surface.AddPolygon(vrt);
                
                var mesh = surface.ToMesh();

Any help will be greatly appreciated. I am very new to WPF 3D and am finding the learning curve quite steep.

Thanks a lot

Murray


objo wrote at 2012-01-30 08:41:

hi Murray, 

I see this can be a bit confusing, it should be improved..

The parameterless MeshBuilder constructor will create a mesh with both normals and texture coordinates. The AddPolygon will currently only add vertices, not normals and texture coordinates.

I think changing the constructor to

new MeshBuilder(false,false)

should work.

I think there are two possible improvements here

a. Let AddPolygon calculate normals and texture coordinates if this is requested

b. Remove the parameterless constructor of MeshBuilder - so you _have to_ specify if normals/texture coordinates should be generated 


murray_b wrote at 2012-01-31 09:07:

Thanks for the quick reply Objo

That fixed the error I was getting.

Great work!


murray_b wrote at 2012-01-31 09:34:

Objo

When the meshbuilder now creates the mesh I can only see it from one side.

How do I get the meshbuilder to generate a mesh that I can rotate around and see from both sides?

Regards

Murray


objo wrote at 2012-01-31 10:01:

Remember to set the BackMaterial, it can be the same as the (front) Material.

0

Helix Sharpdx

Anonymous 12 years ago 0
This discussion was imported from CodePlex

eonxxx wrote at 2014-01-30 22:54:

Hi there,

i tried to integrate parts of source code from deferred shading demo into my own app.
cproject compiles well. but at runtime i get following error:

error registering effect: sharpdx_direct3d11_effects_x86.dll

where in the project path should the file located and how shuld i register it to my project?

thanks
eonxxx

objo wrote at 2014-02-02 12:06:

Did you install SharpDX and DirectX SDK?
http://www.microsoft.com/en-us/download/details.aspx?id=6812
http://sharpdx.org/download/

This is a fork and I am not sure about the build requirements for it at the moment.

eonxxx wrote at 2014-02-02 21:38:

Yes. It's installed.
Examples (whole fork) compiled well and all the examples run fine.

eonxxx wrote at 2014-02-28 22:52:

anyone got a simple standalone project on effects wich works?
thanks eonxxx

VishwaPrasad wrote at 2014-07-25 13:37:

Hi,

I was also got the same error in my standalone application, I have copied sharpdx_direct3d11_effects_x86.dll file in bin folder. and issue has resolved.

But , when I test SharDX on XBAP, same issue occur, even I copied the dlls also , but issue still persist.

Can anyone help on this.

Thanks
Vishwa
0

Samples

Anonymous 12 years ago 0
This discussion was imported from CodePlex

saphua wrote at 2011-02-24 09:14:

I can't find any downloads for the samples?

Edit: Never mind, found them in the source code. Personally, i think that's a little confusing. But then again I can understand making sepperate downloads of each sample is a lot of work.


objo wrote at 2011-02-24 13:57:

you are right, the examples are changed/added frequently - so I haven't made any downloads yet. I'll make a download for the examples at release 1.0!

0

how to make chart like this

Anonymous 12 years ago 0
This discussion was imported from CodePlex


objo wrote at 2014-04-29 10:12:

See SurfacePlotDemo. Note this is only a demo, there are no plans for more charting functionality in this library.
0
Under review

Has anyone tried to load Helix WPF into an Open Inventor project

John Lovell 11 years ago updated by Øystein Bjørke 11 years ago 1
Open Inventor 9.x claims to support WPF, and Helix WPF build on WPF. So it should really be, er, quite straightforward to use Helix inside an Open Inventor app.

Obviously devil will be in the details. Has anyone tried to do this?

Thanks,
0

<ht:PanoramaCube3D Source="Models\GrandHotel\"/> Its giving XML PARSE EXCEPTION

Divya Raghuvanshi 11 years ago updated 11 years ago 1
<Window x:Class="PanoramaDemo.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ht="clr-namespace:HelixToolkit.Wpf;assembly=HelixToolkit.Wpf"
Title="MainWindow" Height="350" Width="525">
<Grid>
<ht:HelixViewport3D x:Name="view1" RenderOptions.BitmapScalingMode="HighQuality" RenderOptions.EdgeMode="Aliased" ShowViewCube="False" ShowCameraTarget="False" CameraMode="FixedPosition" RotationSensitivity="0.6">
<ModelVisual3D>
<ht:PanoramaCube3D Source="Models\GrandHotel\"/>
<ModelVisual3D.Content>
<AmbientLight Color="White"/>
</ModelVisual3D.Content>
</ModelVisual3D>
</ht:HelixViewport3D>
</Grid>
</Window>

0

How to make RTS camera?

Anonymous 12 years ago updated by Nathan Cornelius 2 years ago 0
This discussion was imported from CodePlex

Overlord123 wrote at 2012-01-03 19:21:

Is it possible to create a RTS camera, like in Starcraft II etc?


objo wrote at 2012-01-03 19:55:

sorry, I have no experience with Starcraft or any other real time strategy games, so I don't know what is needed. Do you need camera translation by WASD keys?

can this link help (from irrlicht 3d)? http://www.irrlicht3d.org/wiki/index.php?n=Main.RTSCameraByCmdKewin


Overlord123 wrote at 2012-01-03 20:27:

Yeah, basically the feature set of the linked camera is what I need.

  • No vertical translation 
  • Translates with WASD keys, (right mouse button and arrow keys) 
  • Translates with mouse movement on border screen. Left, Right, Up and Down 
  • Zooms with wheel (and right-left mouse buttons) 
  • Ability to recenter itself around a node
  • define min and max zoom levels
  • define boundaries for translation so it does not translate outside the map.

I put not so important stuff in brackets. Is this possible to realize with the Helix 3D Toolkit?

Thanks.


objo wrote at 2012-01-03 21:09:

This should be included in the 'walkaround' camera mode - I have not tested it after latest camera control refactorings, might need some updates...

http://helixtoolkit.codeplex.com/wikipage?title=Input%20gestures&referringTitle=Documentation

0

RotateManipulator help please

Anonymous 12 years ago updated by ไอยดา สุรีวงค์ 5 years ago 1
This discussion was imported from CodePlex

badgerbadger wrote at 2011-12-14 16:41:

I am attempting to code a RotateManipulator in C# codebehind (not xaml) to add rotateable and translateable planes on a double click event.

How would this line from ManipulatorDemo / MainWindow.xaml line 185 be coded in c#?

<ht:RotateManipulator Color="Blue" Axis="0,0,1" Transform="{Binding Transform, ElementName=plane2}" TargetTransform="{Binding Transform, ElementName=plane2}" Diameter="1"/>

It is the syntax of the binding transforms that I am struggling with (I am new to wpf if you haven't guessed)

Thanks! badgerbadger.



badgerbadger wrote at 2011-12-15 10:11:

Thanks, I had been using that but not getting it to work. Attempted to code ManipulatorDemo / MainWindow.xaml line 185 as

var plane = new RectangleVisual3D();

plane. etc

var manip = new RotateManipulator();

...

BindingOperations.SetBinding(manip, RotateManipulator.TransformProperty, new Binding("Transform") { ElementName = "plane" });
BindingOperations.SetBinding(manip, RotateManipulator.TargetTransformProperty, new Binding("Transform") { ElementName = "plane" });

and other combinations of setBinding but get "System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=plane'"...

Apologies if this is a newbie wpf error but not finding much relevant on the web

0

How to 'dampen' RMouse 'scrolling'?

Anonymous 12 years ago 0
This discussion was imported from CodePlex

BogusException wrote at 2014-07-29 21:13:

Experts,

I can't seem to find where I would make my right-mouse-drag rotation of objects a little less quick/severe.

In other words, how much rotation I get with RMouse down moving 1", I'd like to actually take 3"-in other words, less sensitive to mouse.

Any ideas?

TIA!

pat
:)

everytimer wrote at 2014-07-30 19:35:

I think there are some properties of HelixViewport3D that might interest you:
LeftRightRotationSensitivity

RotationSensitivity
I'm not sure if this is what you were looking for, let us know if this helped! Good luck

BogusException wrote at 2014-07-30 21:17:

Thanks!!!

pat
:)
0

Captions to the objects

Anonymous 12 years ago 0
This discussion was imported from CodePlex

finder_sl wrote at 2012-06-11 12:38:

Hello.

I need to add labels to objects, for example, to sign the top of the cube.

Like this: https://dl.dropbox.com/u/22892769/screen.PNG

How can I do that? Thanks.