그래서 나는 "보기"조립이 XAML 코드를 가지고 :WPF 헬릭스 코드에서 뷰포트 3 차원을 "확대/축소"하는 방법은 무엇입니까?
새로운 플롯 (표시를 생성 내가 ScatterPlotVisual3D로 일부 데이터를 로딩하고 "뷰 - 모델"조립 몇 가지 포인트, boundarybox, 라벨 등의<helix:HelixViewport3D ZoomExtentsWhenLoaded="True"
ShowCoordinateSystem="True"
IsMoveEnabled="False"
Margin="5,5,5,0">
<helix:HelixViewport3D.Camera>
<OrthographicCamera LookDirection="1,1,-1"
Position="{Binding CameraPosition}"
UpDirection="0,0,1">
</OrthographicCamera>
</helix:HelixViewport3D.Camera>
<ModelVisual3D Content="{Binding Lights}"/>
<local:ScatterPlotVisual3D Points="{Binding Data}"
SolutionPoints="{Binding Solution}"
SurfaceBrush="{Binding SurfaceBrush}"/>
</helix:HelixViewport3D>
) :
private Model3D CreateModel()
{
var plotModel = new Model3DGroup();
if (Points == null && SolutionPoints == null) return plotModel;
List<Point3D> allPoints = new List<Point3D>();
if (Points != null && Points.Length != 0)
{
plotModel.Children.Add(CreatePointsModel(Points, Brushes.Green));
allPoints.AddRange(Points);
}
if (SolutionPoints != null && SolutionPoints.Length != 0)
{
plotModel.Children.Add(CreatePointsModel(SolutionPoints, Brushes.Red));
allPoints.AddRange(SolutionPoints);
}
CreateBoundaryAxis(plotModel, allPoints);
return plotModel;
}
그래서 내가해야 할 일을 힘 "하고"ZoomExtents에 HelixViewport3D() (또는 내 데이터를로드 할 때) 모델에 맞게 카메라를 줌의 다른 유사한 방법입니다.
문제 : 나는 나선에 대한 참조를 가지고 있겠지로 ZoomExtents()를 호출하지 못할 : HelixViewport3D 내 XAML에 선언