Common classes and utilities
Blake.NUI includes several common classes and utilities that are useful for a variety of NUI and multi-touch applications.
DisplayMatrix represents the data behind translation, rotation, and scale transformations for custom multi-touch controls. It allows you to get or set the individual translation, rotate, and scale values, as well as apply delta values, and it calculates the
Matrix. You can use this Matrix to transform points to and from the original and transformed spaces.
uses a DisplayMatrix to record and update the transformation of the infinite canvas.
uses DisplayMatrix also to record the positions of content. You can also use DisplayMatrix to create custom ScatterView-type controls.
If you know the translation, rotation, and scale values for an interface element, ScatterMatrixHelper can generate and update the RenderTransform for the element.
AnimateUtility has static helper methods that set up and run an animation Storyboard on any DependencyProperty for any element. This is extremely useful for programmatically animating elements. Animation methods are provided for animating double, Point, and
SurfaceAnimateUtility provides the ThrowSVI method, which makes the necessary AnimateUtility calls to animate a ScatterViewItem's position and orientation to wherever youwant.
MathUtility has a few common math operations including IsEqualFuzzy, MapValue, Clamp, NormalizeAngle, RotateVector, and Get2DAngle.
VisualUtility has two methods useful for walking the visual tree: FindVisualParent and GetChildByType