首页 新闻 搜索 专区 学院

Viewport3D三维空间中旋转某个Viewport2DVisual3D上的控件,旋转时候会自动缩放。求去掉缩放。

0
悬赏园豆:30 [已关闭问题] 关闭于 2017-05-18 23:23
   <Viewport3D>
            <Viewport3D.Camera>
                <OrthographicCamera LookDirection="0,-1,-1" Position="0,200,200" Width="10"/>
            </Viewport3D.Camera>
            <Viewport3D.Children>
                <ModelVisual3D>
                    <ModelVisual3D.Transform>
                        <Transform3DGroup>
                            <TranslateTransform3D OffsetZ="0" OffsetX="0" OffsetY="0"/>
                            <ScaleTransform3D ScaleZ="0.116" ScaleY="0.046" ScaleX="0.075"/>
                            <RotateTransform3D d:EulerAngles="-27,-0.194,0.099">
                                <RotateTransform3D.Rotation>
                                    <AxisAngleRotation3D Axis="-1,-0.008,0.002" Angle="27.001"/>
                                </RotateTransform3D.Rotation>
                            </RotateTransform3D>
                            <TranslateTransform3D OffsetZ="0" OffsetX="0" OffsetY="0"/>
                            <TranslateTransform3D OffsetZ="2.254" OffsetX="0" OffsetY="-2.4"/>
                        </Transform3DGroup>
                    </ModelVisual3D.Transform>
                    <ModelVisual3D.Content>
                        <AmbientLight Color="Transparent" />
                    </ModelVisual3D.Content>
                    <ModelVisual3D.Children>

                        <!--Out-->
                        <Viewport2DVisual3D >
                            <Viewport2DVisual3D.Transform>
                                <Transform3DGroup>
                                    <TranslateTransform3D />
                                    <ScaleTransform3D />
                                    <RotateTransform3D >
                                        <RotateTransform3D.Rotation>
                                            <AxisAngleRotation3D Axis="0,1,0"  Angle="0"/>
                                        </RotateTransform3D.Rotation>
                                    </RotateTransform3D>
                                    <TranslateTransform3D />
                                    <TranslateTransform3D />
                                </Transform3DGroup>
                            </Viewport2DVisual3D.Transform>
                            <Viewport2DVisual3D.Geometry>
                                <MeshGeometry3D Positions="-50,50,-50  -50,50,50  50,50,50  50,50,-50"
                                                Normals="0,0,1  0,0,1  0,0,1  0,0,1"
                                                TriangleIndices="0,1,2  0,2,3"
                                                TextureCoordinates="0,0  0,1  1,1  1,0"/>
                            </Viewport2DVisual3D.Geometry>
                            <Viewport2DVisual3D.Material>
                                <DiffuseMaterial Brush="Transparent" Viewport2DVisual3D.IsVisualHostMaterial="True"/>
                            </Viewport2DVisual3D.Material>
                            <Viewport2DVisual3D.Visual  >
                                <Ellipse  Width="500" Height="500" Stretch="Uniform" >
                                    <Ellipse.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform/>
                                            <SkewTransform/>
                                            <RotateTransform  x:Name="AngleOut" Angle="0"/>
                                            <TranslateTransform/>
                                        </TransformGroup>
                                    </Ellipse.RenderTransform>
                                    <Ellipse.Fill>
                                        <RadialGradientBrush>
                                            <GradientStop Color="Black" Offset="0.435"/>
                                            <GradientStop Color="White" Offset="0.632"/>
                                        </RadialGradientBrush>
                                    </Ellipse.Fill>
                                </Ellipse>
                            </Viewport2DVisual3D.Visual>
                        </Viewport2DVisual3D>

                    
                    </ModelVisual3D.Children>
                </ModelVisual3D>
            </Viewport3D.Children>
        </Viewport3D>
问题补充:

示例中旋转的时Elicpse

过客非归的主页 过客非归 | 初学一级 | 园豆:117
提问于:2017-04-05 09:44
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册