Example #1
0
        protected override Matrix4F GetManipulatorMatrix()
        {
            ITransformable node = GetManipulatorNode(TransformationTypes.Pivot);

            if (node == null)
            {
                return(null);
            }

            Path <DomNode> path         = new Path <DomNode>(node.Cast <DomNode>().GetPath());
            Matrix4F       localToWorld = TransformUtils.CalcPathTransform(path, path.Count - 1);

            // Offset by pivot
            Matrix4F Pv = new Matrix4F();

            Pv.Set(node.Pivot);
            localToWorld.Mul(Pv, localToWorld);
            localToWorld.OrthoNormalize(localToWorld);
            return(new Matrix4F(localToWorld.Translation));
        }