#include
<class_navigator_state_transitions_1_1_navigation_step.h>
Public Member Functions |
|
getPivotPoint () | |
getUpVector () | |
Calculates the up-vector for the given plane
normal and the given roll. |
|
getRollToInterpolateUpVector () | |
Calculates and returns the roll required for
the currentLookAtVector to help achieve a smooth transition.
|
NavigatorStateTransitions.NavigationStep.getPivotPoint | ( | ) |
NavigatorStateTransitions.NavigationStep.getUpVector | ( | ) |
Calculates the up-vector for the given plane normal and the given roll.
The planeNormal should be the normal of the plane where all possible up vectors could lie. The un-rolled up vector is generally (0, 0, 1) projected onto the plane. There are two special cases:
NavigatorStateTransitions.NavigationStep.getRollToInterpolateUpVector | ( | ) |
Calculates and returns the roll required for the currentLookAtVector to help achieve a smooth transition.
This is achieved by interpolating between the source up vector and the target up vector.
The previous algorithm had a problem since it would blindly interpolate between the roll values. If the transition was towards the the top or bottom view, it would snap quickly at the end since the up vector would change.
Using this function, the up vector is calculated by interpolating the angles of the the source and target up-vectors from the cross-product of the source and target look at vectors. Due to the nature of cross-product, this cross-product will always lie on the plane of valid up vectors for any vector including and between the source & target look at vectors.