Hello,
I wonder if it is possible to change one or more points of a 3D object after it has been rendered. I tried it using XAML and C#.
I want to influence one of the points using a slider. This is the XAML-code that explains how I wanted to achieve a manipulation of the Y-dimension of the first point:
<Grid>
<Viewport3D>
<Viewport3D.Camera>
<PerspectiveCamera Position="0.5, 0.5, 4" LookDirection="0,0,-1"/>
</Viewport3D.Camera>
<Viewport3D.Children>
<ModelVisual3D>
<ModelVisual3D.Content>
<DirectionalLight Color="White" Direction="0,0,-1" />
</ModelVisual3D.Content>
</ModelVisual3D>
<ModelVisual3D>
<ModelVisual3D.Content>
<GeometryModel3D>
<GeometryModel3D.Geometry>
<MeshGeometry3D Positions="0, {Binding ElementName=PunktSlider, Path=Value} ,1 , 1,0,1 , 1,1,1 , 0,1,1
0,0,0 , 1,0,0 , 1,1,0 , 0,1,0"
TriangleIndices="0 1 2, 2 3 0,
1 5 6, 6 2 1,
5 4 7, 7 6 5,
4 0 3, 3 7 4,
2 6 7, 7 3 2,
0 4 5, 5 1 0" />
</GeometryModel3D.Geometry>
<GeometryModel3D.Transform>
<RotateTransform3D>
<RotateTransform3D.Rotation>
<AxisAngleRotation3D Axis="1,1,1" Angle="{Binding ElementName=RotationSlider, Path=Value}" />
</RotateTransform3D.Rotation>
</RotateTransform3D>
</GeometryModel3D.Transform>
<GeometryModel3D.Material>
<DiffuseMaterial Brush="OrangeRed" />
</GeometryModel3D.Material>
</GeometryModel3D>
</ModelVisual3D.Content>
</ModelVisual3D>
</Viewport3D.Children>
</Viewport3D>
<Slider x:Name="RotationSlider" Minimum="0" Maximum="360" Value="0"/>
<Slider x:Name="PunktSlider" Minimum="0" Maximum="1" Value="0"/>
</Grid>
Does anyone have an idea how to do this?
Thanks in advance for every idea...