我们使用了3dtools(
http://3dtools.codeplex.com
)为了绘制一条三维线,它允许用户用鼠标旋转它。我有个问题,如何限制用户只能在Z轴上旋转?还是只在X轴,Y轴上?
<tool:TrackballDecorator >
<tool:Interactive3DDecorator
ContainsInk="True">
<Viewport3D>
<Viewport3D.Camera>
<PerspectiveCamera x:Name="camera1" Position="4.89,-11,5" LookDirection="-4.89,11,-5"
FieldOfView="45" UpDirection="-4,9,-1"/>
</Viewport3D.Camera>
<ModelVisual3D x:Name="modelVisual3D">
<ModelVisual3D.Children>
<tool:ScreenSpaceLines3D x:Name="axisX" Color="Cyan"
Thickness="2.0"
Points="0, 0, 0, 5, 0, 0" />
<tool:ScreenSpaceLines3D Color="LightCyan"
Thickness="2.0"
Points="-5, 0, 0, 0, 0, 0" />
<tool:ScreenSpaceLines3D x:Name="axisY" Color="Green"
Thickness="2.0"
Points="0,0,0, 0,5,0"/>
<tool:ScreenSpaceLines3D Color="LightGreen"
Thickness="2.0"
Points="0,-5,0, 0,0,0"/>
<tool:ScreenSpaceLines3D x:Name="axisZ" Color="Red"
Thickness="2.0"
Points="0,0,0, 0,0,5"/>
<tool:ScreenSpaceLines3D Color="LightPink"
Thickness="2.0"
Points="0,0,-5, 0,0,0"/>
</ModelVisual3D.Children>
</ModelVisual3D>
</Viewport3D>
</tool:Interactive3DDecorator>
</tool:TrackballDecorator>