Axis Icon - Settings - Printable Version
+- AB4D Forum (https://forum.ab4d.com)
+-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4)
+--- Forum: Viewer3ds and Ab3d.Reader3ds (https://forum.ab4d.com/forumdisplay.php?fid=5)
+--- Thread: Axis Icon - Settings (/showthread.php?tid=116)
Axis Icon - Settings - YGT - 05-03-2011
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
RE: Axis Icon - Settings - abenedik - 05-08-2011
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.