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

Changes latest version?

Anonymous 12 years ago 0
This discussion was imported from CodePlex

davidop wrote at 2013-08-02 16:55:

What are the main changes in this latest version? I just have not found the change log.

objo wrote at 2013-08-08 08:19:

See the change list descriptions - click "History" under the "Source code" tab. A new version is normally built at every code check-in.

davidop wrote at 2013-08-08 09:56:

Thank you!. My question was because I was interested in the new version if it had included the limits of the camera zoom. We'll have to keep waiting.
0

How to pause/resume a rotation?

Anonymous 12 years ago 0
This discussion was imported from CodePlex

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

Experts,

I had awful luck with rotating my object and it keeping it's lat/lon straight, so I did the below-which I think is rotating my camera around the single object I have...

I want to let me users stop & start the rotation (menu, keypress, all in code-behind), but all I can do now is either in XAML... I might be doing this wrong, and as a result the right way is eluding me..

Thoughts?

<Grid.Triggers>
        <EventTrigger RoutedEvent="Canvas.Loaded">
            <BeginStoryboard>
                <Storyboard>
                    <DoubleAnimation x:Name="camRotate360"  
                                     AutoReverse="False" 
                                     Duration="0:1:00" 
                                     From="360" 
                                     RepeatBehavior="Forever" 
                                     Storyboard.TargetName="camRotation" 
                                     Storyboard.TargetProperty="Angle" 
                                     To="0" />
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </Grid.Triggers>
[...]
 <t:HelixViewport3D x:Name="view1" 
                       CameraRotationMode="Turnball"
                       ClipToBounds="False"
                       Grid.Column="0" 
                       IsChangeFieldOfViewEnabled="True"
                       IsHeadLightEnabled="True" 
                       IsHitTestVisible="True"
                       IsInertiaEnabled="True"
                       IsManipulationEnabled="True"
                       IsMoveEnabled="True"
                       IsPanEnabled="False"
                       IsRotationEnabled="True"
                       IsTouchZoomEnabled="True"
                       IsZoomEnabled="True"
                       LeftRightRotationSensitivity="5"
                       MouseDown="OnMouseDown" 
                       MouseMove="OnMouseMove" 
                       RotationSensitivity="5"
                       ShowCameraInfo="False"
                       ShowCameraTarget="False"
                       ShowCoordinateSystem="False"
                       ShowFieldOfView="False"
                       ShowFrameRate="True"
                       ShowTriangleCountInfo="True"
                       ShowViewCube="False"
                       SubTitle=""
                       SubTitleSize="0"
                       Title=""
                       TitleSize="0"
                       ZoomExtentsWhenLoaded="True" 
                       ZoomSensitivity="2"
                       ZoomAroundMouseDownPoint="True">
        <t:HelixViewport3D.Camera>
            <PerspectiveCamera Position="600,27400,0" 
                               LookDirection="0,1,0" 
                               UpDirection="0,0,1" 
                               NearPlaneDistance="0.01" 
                               FarPlaneDistance="Infinity" 
                               FieldOfView="40">

                <!-- I have to comment out the below to make the shape not rotate -->
                <!--<PerspectiveCamera.Transform>
                    <Transform3DGroup>
                        <RotateTransform3D>
                            <RotateTransform3D.Rotation>
                                <AxisAngleRotation3D Axis="0,0,1" Angle="0" x:Name="camRotation" />
                            </RotateTransform3D.Rotation>
                        </RotateTransform3D>
                    </Transform3DGroup>
                </PerspectiveCamera.Transform>-->

            </PerspectiveCamera>
        </t:HelixViewport3D.Camera>
0

Any Help

Anonymous 12 years ago 0
This discussion was imported from CodePlex

elkhalafy wrote at 2013-08-06 12:56:

peace on U

brothers, I want to create 3d modelling app with helix so can I do that with helix TK, or anyone know library for .net and compatible with Helix 3d TK for 3d modelling ?

I want anyone help me ,
Thanks,

elkhalafy wrote at 2013-08-09 14:03:

No answers ,

OK I want make modelling WPF 3D APIs with support of helix TK

Mrme wrote at 2013-08-12 15:52:

I can't see a question here. just go use helix and when you have troubles come back to ask
0

CompositionTarget.Render and ZoomExtents

Anonymous 12 years ago 0
This discussion was imported from CodePlex

Badgor wrote at 2013-11-01 19:43:

Hello,

This is probably a trivial problem, but I'm new to C# and WPF, and I've been scratching my head for some time now.
I'm using a CompositionTarget.Render, such that I can disable and re-enable some parts of the rendering (think I got this from the Points and Lines example).

Before I got all this to work, I used the Loaded += MainWindow_Loaded like in a lot of the examples. This included the ZoomExtents. A neat little feature.

I would like to know how I can incorporate this with the Compositiontarget.Render.

Some code below.
        public MainWindow()
        {
            InitializeComponent();
            DataContext = this;
            CompositionTarget.Rendering += this.OnCompositionTargetRendering;            
       }
        void OnCompositionTargetRendering(object sender, EventArgs e)
        {

            if (ShowEdges && lines == null)
            {
                lines = new LinesVisual3D { Color = Colors.Red };
                view.Children.Add(lines);
            }
            if (!ShowEdges && lines != null)
            {
                lines.IsRendering = false;
                view.Children.Remove(lines);
                lines = null;
            }
            if (ShowFaceNormals && faceNormals == null)
            {
                faceNormals = new LinesVisual3D {Color = Colors.Purple};
                view.Children.Add(faceNormals);
            }
            if (!ShowFaceNormals && faceNormals != null)
            {
                faceNormals.IsRendering = false;
                view.Children.Remove(faceNormals);
                faceNormals = null;
            }
            if (ShowFaces && faces==null)
            {
                faces = new ModelVisual3D
                {
                    Content = new GeometryModel3D
                    {
                        Material = Materials.Red,
                        BackMaterial = Materials.Blue
                    }
                };

                view.Children.Add(faces);
            }
            if (!ShowFaces && faces != null)
            {
                view.Children.Remove(faces);
                faces = null;
            }

            if (lines != null)
            {
                createWireframe();
            }
            if (faceNormals != null)
            {
                createFaceNormals();
            }
            if (faces != null)
            {
                createFaces();
            }
        }
0

PipeVisual3D is transparency issue

Anonymous 12 years ago updated by anonymous 7 years ago 0
This discussion was imported from CodePlex

Mrme wrote at 2013-11-04 14:26:

hi,
I added some models first and then added a PipeVisual3D , when I make the PipeVisual3D transparent by changing the Material and BackMaterial opacity, those models I added first appear just fine inside the pipe when I look from outside side, but if I added some models after I already add the PipeVisual3D, none of these appear , it looks transparent but it actually it is not , I would appreciate any clue

RobPerkins wrote at 2013-11-05 17:34:

You must manually control the order of the Visual3D elements which you add to the scene, since WPF doesn't do transparency in the same way as OpenGL or even DirectX.

Add your Visual3Ds in order of decreasing opacity to get the right effects.

Rob

Mrme wrote at 2013-11-05 18:43:

Thanks for your reply, Opacity is just for the PipeVisual3D, so the models are always with Opacity = 1, I don't have the choice here, the users want to be able to add some models/PipeVisual3D and delete them at any time, as I understood from your post , I have always to make sure that the models have to be as if they were added first, when I add a new model and change it's position on the tree,would that solve my problem ?
Thanks

RobPerkins wrote at 2013-11-06 15:02:

Yes, it's just as you described. WPF renders the elements in list order. Just make sure the elements with less opacity are last in the list.

At times, I do this by specifying one list of Visual3Ds for the opaque stuff, and a second list for the non-opaque, stuff, and lay that out in the XAML. That pretty much guarantees the right behavior.

Rob

a5r wrote at 2013-11-06 15:24:

maybe you can use ElementSortingHelper.SortModel(Point3D position, IList<Visual3D> model);
0

SharpDx version 2.5?

Anonymous 12 years ago 0
This discussion was imported from CodePlex

activity1 wrote at 2013-12-19 21:18:

Hi,
the fork for SharpDx is on version 2.4.0.
My need is to add DirectD2D1 library, but I only have it since 2.4.2. However, when I change Helix3D/SharpDx to either 2.4.2 or 2.5 (latter needs modifications in Helix.SharpDx), only a white page is rendered.
Q1: Is that normal? I am using Windows7.
Q2: Are there plans to update, or is that the reason why it is on old version?
Q3: Else, my problem is that I do not find the D2D1 lib for SharpDx 2.4.0 on the web, could somebody please help or advise.

Thanks a lot in advance,
Helix3D is a great help,
rüdiactivity

objo wrote at 2014-01-07 22:28:

pm knows more about this fork than myself.
Q2: I think we should follow the latest stable version of SharpDx
0

How to implement the VisualHelper.TraverseModel for loaded model

Anonymous 12 years ago 0
This discussion was imported from CodePlex

mateovidro wrote at 2013-03-07 22:32:

Hi obj,
I try to use Visualhelper Class to subdivide the model graph of my imported model (.stl).
I try to use the Subdivision project and modify the UpdateModel(), but I get the triangle subdivision but not efect in the loaded model(Visual)
private void Load(string model) {
CurrentModel = ModelImporter.Load(model);

Visual3DHelper.TraverseModel<Model3D>(CurrentModel, ????);

I like the way to smoothing meshes but in code behind, loaded from database. Or any help!!

Thanks
0

Mesh reduction

Anonymous 12 years ago 0
This discussion was imported from CodePlex

pDeac wrote at 2014-08-20 14:49:

Hello,

Is there any build in support in Helix 3D for reducing the triangles of a mesh geometry ?

Thanks
Paul

objo wrote at 2014-08-22 21:55:

Sorry, no. Only the opposite :-)
We could add a feature request. Does anyone know how to do this?
0

Camera Controller - key board input for panning

Anonymous 12 years ago 0
This discussion was imported from CodePlex

Tungsten wrote at 2012-04-26 18:26:

Firstly, thank you for the great work.

 

My question relates to the behavior of the keyboard panning (shift-arrows).

Clicking left causes the camera to move to the right (model moves to the left).  I realize this is is just a difference in perspective, however feedback I have received indicates that this is counter-intuitive to them.  These folk are video game players in which the more common pan would yield the camera moving in the same direction.

 

Would it be possible to have an inversion property added?  I investigated stealing keyboard events or overriding gestures, but the camera controller is attaching itself to the keydown event directly.  The only option I found is to disable panning, however I still need panning to occur via addPanForce (which I invoke directly from an onscreen controller I created).

 

Thanks.


objo wrote at 2012-04-26 23:07:

I added a LeftRightRotationSensitivity property. Try to set this to -1 to invert the keys. 


Tungsten wrote at 2012-04-27 00:17:

Thank you for the quick response.

 

The LeftRightPanSensitivity and UpDownPanSensivity are exactly what I need, however did you intend to not add the template bindings for all 5 new sensitivity properties (the 2 rotations were added).   I am applying the properties to the CameraController directly for now.


objo wrote at 2012-04-27 06:48:

Of course, I had forgotten the 3 last ones. Thank you, fix submitted.

0

Rotate camera

Anonymous 12 years ago updated by Subhan Khan 4 months ago 1
This discussion was imported from CodePlex

solcruiser wrote at 2011-12-12 15:03:

Hi,

how can i rotate the camera in per code?

i can't find any methods for that in CameraController.

(or schould i use wpf's RotateTransform3D)

greetz chris


objo wrote at 2011-12-13 18:46:

you can use the "AddRotateForce" method - that's what the keyboard bindings are using.

If you need more custom rotations, I suggest you create a Quaternion and do the rotations on the LookDirection and Camera Position.

You find the camera rotation transformations in the RotateHandler class.