Skip to content

Commit

Permalink
Initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
dsuarezv committed Mar 13, 2017
0 parents commit 409436e
Show file tree
Hide file tree
Showing 37 changed files with 2,189 additions and 0 deletions.
224 changes: 224 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
packages
.vs/
*.lock.json

*.7z
*.7z.???

#################
## Eclipse
#################

*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath


#################
## Visual Studio
#################

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results

[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
*.meta
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.Publish.xml
*.pubxml

# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
App_Data/*.mdf
App_Data/*.ldf

#############
## Windows detritus
#############

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac crap
.DS_Store


#############
## Python
#############

*.py[co]

# Packages
*.egg
*.egg-info
dist/
build/
eggs/
parts/
var/
sdist/
develop-eggs/
.installed.cfg

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox

#Translations
*.mo

#Mr Developer
.mr.developer.cfg


*.dump
30 changes: 30 additions & 0 deletions Dyquo.Charts3d/Chart3d.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<UserControl x:Class="Dyquo.Charts3d.Chart3d"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:h="clr-namespace:HelixToolkit.Wpf;assembly=HelixToolkit.Wpf"
xmlns:local="clr-namespace:Dyquo.Charts3d"
mc:Ignorable="d"
d:DesignHeight="500" d:DesignWidth="500">
<Grid>
<h:HelixViewport3D ZoomExtentsWhenLoaded="False" ShowCoordinateSystem="True" ShowViewCube="False" Name="View3d" ShowTriangleCountInfo="False" ViewCubeWidth="50" ViewCubeHeight="50">
<h:HelixViewport3D.Camera>
<!-- HelixViewport3D.ZoomExtentsWhenLoaded will figure out the position of the Camera -->
<PerspectiveCamera LookDirection="2,4,-2" UpDirection="0,0,1"/>
</h:HelixViewport3D.Camera>

<!-- Lights -->
<ModelVisual3D x:Name="viewportLightsModelVisual3D">
<ModelVisual3D.Content>
<Model3DGroup>
<AmbientLight x:Name="ambientLight" Color="#DDDDDD"/>
<DirectionalLight x:Name="directionalLight" Color="#444444" Direction="0 -1 -1" />
<SpotLight x:Name="spotLight" Color="#666666" Direction="0 0 -1" InnerConeAngle="30" OuterConeAngle="60" Position="0 1 30" />
</Model3DGroup>
</ModelVisual3D.Content>
</ModelVisual3D>

</h:HelixViewport3D>
</Grid>
</UserControl>
58 changes: 58 additions & 0 deletions Dyquo.Charts3d/Chart3d.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
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.Media;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Dyquo.Charts3d
{
public partial class Chart3d : UserControl
{
public Chart3d()
{
InitializeComponent();
}

public void ZoomExtents()
{
View3d.ZoomExtents(0.5);
}

public void AddSurface(Surface3dViewModel surface)
{
surface.UpdateSurface();

var plot = new SurfacePlotVisual3D();
Bind(plot, SurfacePlotVisual3D.PointsProperty, surface, "Data");
Bind(plot, SurfacePlotVisual3D.ColorValuesProperty, surface, "ColorValues");
Bind(plot, SurfacePlotVisual3D.SurfaceBrushProperty, surface, "SurfaceBrush");

View3d.Children.Add(plot);
}

public void AddContent(Model3D content)
{
var visual = new ModelVisual3D();
visual.Content = content;
View3d.Children.Add(visual);
}

private static void Bind(SurfacePlotVisual3D target, DependencyProperty targetProperty, object source, string sourcePath)
{
var b = new Binding();
b.Source = source;
b.Path = new PropertyPath(sourcePath);
BindingOperations.SetBinding(target, targetProperty, b);
}
}
}
Loading

0 comments on commit 409436e

Please sign in to comment.