Axis Icon - Settings
#1
Hi
I am using a AxisIcon with following settings.

Please let me know what is the meaning of FlowDirection="LeftToRight" property. Currently when I see axis-Icon the Z-Axis is pointing towards screen.

Can I change the settings of the axis-icon so it can point outside the screen.

<axisPanel:CameraAxisPanel VerticalAlignment="Bottom" Name="axisIcon" HorizontalAlignment="Left" Margin="5" BorderBrush="AliceBlue" FlowDirection="LeftToRight" Width="100" Height="100" Grid.IsSharedSizeScope="False" HorizontalContentAlignment="Left" MinWidth="0" MinHeight="0" OverridesDefaultStyle="False" ForceCursor="True" />

Thanks in advance
YGT
#2
The CameraAxisPanel is derived from Control - therefore it has many unused properties - FlowDirection is one of them.

Please see the help file to see which properties can be used to control the CameraAxisPanel or other controls.

As you can see in the "Camera controllers sample" when the camera's heading and attitude are 0, the camera axis panel is showing the red (Z) axis pointing outside the screen - because the camera is not rotated, we are having the default WPF coordinate system where the Z is pointing out of the screen - as the asix panel is showing.

So I do not understand why would you like to change the orientation of the Z axis.

However it is quite simple to create your own Camera Axis panel. You need to create a new Viewport3D that contains a ColoredAxisVisual3D. Than add a TargetPositionCamera that is linked to the new Viewport3D.

Now subscribe to the camera's changed event on the main scene camera - each time the main camera is changes you need to change the TargetPositionCamera that was created to see the ColoredAxisVisual3D. In the CameraAxisPanel the heading, attitude and bank are copied from the main camera. But if you need to change the direction of the axis, you can add 180 to the camera's heading.
Andrej Benedik
  


Forum Jump:


Users browsing this thread:
1 Guest(s)