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

How to draw a pyramid using two points?

Anonymous 11 years ago 0
This discussion was imported from CodePlex

mcab21 wrote at 2014-02-04 16:26:

Hi,

I want to write a method that takes in two parameters, point1 and point2 (XYZ points), and that the method will draw an pyramid. The origin point will be point1 and the end points will be the square with point2 in the centre.

Any ideas how to do this? I see the one AddPyramid method already but it only takes one point.

Thanks in advance!
0

TerrainDemo

Anonymous 11 years ago updated by anonymous 8 years ago 1
This discussion was imported from CodePlex

icube wrote at 2011-06-21 15:16:

Hi,

Looking at the TerrainDemo project, it uses a .btz file. How can i create such a file? Can't really find anything on google regarding this...

And also, could you do a MultiTouchDemo that uses multi touch input to navigate the HelixView3D.

Thanks for this awesome project.

Regards


objo wrote at 2011-06-22 10:18:

.btz is just a gzip compressed .bt file (binary terrain file). It is only used inside Helix toolkit to reduce the size of the .bt files. You can use GZipStream to compress a .bt file, and the TerrainModel class should be able to read it. You find the TerrainModel class in Visual3Ds/Composite/TerrainVisual3D.cs

Note that this class does not implement a level of detail algorithm, so it is only useful for small models. (You can find LOD implementations on http://www.vterrain.org/)

For documentation on .bt files, see http://www.vterrain.org/Implementation/Formats/BT.html

A multi-touch demo would be very interesting, but I don't have any hardware to test it on myself!

0

Enable/disable Camera transformation

Anonymous 11 years ago updated by Michael Powell 10 years ago 1
This discussion was imported from CodePlex

JoJo1 wrote at 2013-12-10 06:26:

Hi,
I need to enable or disable the camera transformations (pan, rotate, zoom). In case of disabling the camera transformation I set the HelixViewport3D properties 'IsPanEnabled', 'IsRotationEnabled' and 'IsZoomEnabled' to false. This will disable the transformations for mouse input.
Unfortunately the camera can still be transformed by keyboard input:
Ctrl+F, Ctrl+B, Ctrl+L, Ctrl+R, Ctrl+U, Ctrl+D: change view to front, back, left, right, up or down
A,D,W,S,Q,Z: moving along x,y and z axis

Is there any other property to be set?
Is this the intended behavior or is it maybe a bug?

objo wrote at 2013-12-12 21:42:

This sounds like a bug, I have added issue
https://helixtoolkit.codeplex.com/workitem/10011

objo wrote at 2013-12-13 14:46:

This should be corrected now: the view cube is disabled when IsRotationEnabled = false, and ADSWQZ is disabled when IsMoveEnabled = false
0

How to overlay image on wire frame model in Helix SharpDX version

vsharu 10 years ago updated by ไอยดา สุรีวงค์ 4 years ago 1

Hi , i want to overlay image while model in wireframe mode.

please help me to do how to do that

0

Suggestion for ViewCube

Anonymous 11 years ago 0
This discussion was imported from CodePlex

Elemental wrote at 2011-11-18 07:24:

I really like your ViewCube, but one of my collegues at work had an idea that makes it even beter (in my opinion ;-) )

When you click on one side of the cube it rotates to the side. The change is that it rotates to the opposite site on double click.

It an easy change and I thought maybe you want to add it to your library...

 

       private DateTime lastClick = DateTime.MinValue;

        void cube_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            DateTime currentTime = DateTime.Now;

            Vector3D normalVector = this.m_dicNormalVectors[sender];
            Vector3D upVector = this.m_dicUpVectors[sender];

            //check if this was a double click or a normal click
            if ((currentTime - lastClick).TotalSeconds < 0.5)
            {
                //this was a double click, so scroll to the opposite side of the cube
                normalVector = this.m_dicOppositeNormalVectors[sender];
                upVector = this.m_dicOppositeUpVectors[sender];
            }
            lastClick = currentTime;

            var camera = this.MainViewport.Camera as ProjectionCamera;
            Point3D target = camera.Position + camera.LookDirection;
            double distance = camera.LookDirection.Length;

            Vector3D lookDirection = -normalVector;
            lookDirection.Normalize();
            lookDirection = lookDirection * distance;

            Point3D pos = target - lookDirection;
            Vector3D upDirection = upVector;
            upDirection.Normalize();

            Helper.AnimateTo(camera, pos, lookDirection, upDirection, 500);
        }

 

Best Regards


objo wrote at 2011-11-18 19:00:

good idea! I added double-click to the ViewCube in change set 72415!


Elemental wrote at 2011-11-20 18:55:

Wow, I learn so much from your toolkit!

Didn't know the MouseButtonEventArgs has a ClickCount property :-)

0

Calculate volume of Object

Anonymous 11 years ago 0
This discussion was imported from CodePlex

JustFreak wrote at 2013-05-09 21:08:

Hello,

First of all wonderful job with the library!! I have been using the ModelImporter class for loading STL files into my program, but I would also like to calculate the Volume of a given GeometryModel with a MeshGeometry or a whole ModelGroup with several geometry models inside. I have already found a method to calculate a volume from here Calculate Volume but since I'm new to this I'm not sure how to re-factor it to fit in my case. Any help is greatly appreciated.
Thanks

objo wrote at 2013-05-27 15:23:

You can use the Visual3DHelper.TraverseModel method to traverse the Model3DGroup. This method will also give you the transforms that should be applied to each MeshGeometry3D to calculate the volumes correctly!
0

specific object visibility range

Anonymous 11 years ago 0
This discussion was imported from CodePlex

mihaipruna wrote at 2014-04-20 00:42:

I'd like for certain objects like billboards to disappear automatically from view as my camera is far enough away. Mostly interested in billboards and stuff doing that.
Is there a way to do this without having to remove objects from the viewport?
Thanks

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

This is an interesting feature request. I added
https://helixtoolkit.codeplex.com/workitem/10037
0

Visual3D material with alpha color

Anonymous 11 years ago 0
This discussion was imported from CodePlex

viettp wrote at 2011-10-02 19:22:

I found that alpha color of plane in ExportDemo only work if the transparent plane is declared last.

I need transparent surface feature in my project and don't want to depend on order of visuals. Is there anyway to overcome this issue?


objo wrote at 2011-10-03 19:31:

try the SortingVisual3D, this object sorts its children on distance from the camera to the center of each child's bounding box. 

This is sufficient for simple models like the one shown in the TransparencyDemo, but for more complicated models it might not always give the correct result..

http://helixtoolkit.codeplex.com/wikipage?title=TransparencyDemo

0

Cuttingplane demo

Anonymous 11 years ago 0
This discussion was imported from CodePlex

etick wrote at 2013-02-16 11:56:

Great work on this, will tryuto create a IFC importer for it and create some functions to select objects that can be manipulated (Hide, Transparent etc..)

But have a question about the cutting plane demo!

Is it possible to draw the wall transparent or an simple axis where the cutting planes are.
And how can you manipulate them (move, add, remove)

objo wrote at 2013-03-12 11:44:

Yes, it should be possible to add a (semi-)transparent plane and a TranslateManipulator to do this. Use bindings to control the cutting plane. See the Manipulator example in the 'Example Browser'!
0

Light problem in Helix Sharp DX

Amit Pathak 10 years ago updated 10 years ago 1

Hello,

I am trying to build an obj file viewer using 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??


Problem using Helix Sharp DX:

Image 21


Original model looks like this in Adobe DC Reader:

Image 22


Viewport3DX settings are:


<Window.Resources>

<DataTemplate x:Key="Template1">
<hx:MyMeshGeometryModel3D Geometry="{Binding Geometry}" Transform="{Binding Transform}" Material="{Binding Material}"/>
</DataTemplate>
<hx:RenderTechniqueConverter x:Key="RenderTechniqueConverter"/></Window.Resources>

<hx:Viewport3DX x:Name="helixViewport"

Camera="{Binding Camera}" CameraRotationMode="Trackball"
RenderTechnique="{Binding RenderTechnique}"
RenderTechniquesManager="{Binding RenderTechniquesManager}"
EffectsManager="{Binding EffectsManager}"
BackgroundColor="{Binding BackgroundColor}"
UseDefaultGestures="False">
<hx:Viewport3DX.InputBindings>
<MouseBinding Gesture="LeftClick" Command="hx:ViewportCommands.Rotate"/>
<MouseBinding Gesture="MiddleClick" Command="hx:ViewportCommands.Zoom"/>
<MouseBinding Gesture="RightClick" Command="hx:ViewportCommands.Pan"/>
</hx:Viewport3DX.InputBindings>
<hx:AmbientLight3D Color="{Binding AmbientLightColor}"/>
<hx:DirectionalLight3D Color="{Binding DirectionalLightColor1}" Direction="-1,-1,-1"/>
<hx:DirectionalLight3D Color="{Binding DirectionalLightColor2}" Direction="1,-1,-0.1"/>
<hx:DirectionalLight3D Color="{Binding DirectionalLightColor3}" Direction="0.1,1,-1"/>
<hx:DirectionalLight3D Color="{Binding DirectionalLightColor4}" Direction="0.1,0.1,1"/>
<hx:ItemsModel3D x:Name="itemsModel3d" ItemTemplate="{StaticResource Template1}" ItemsSource="{Binding Items}/">
</hx:Viewport3DX>