Exemplo n.º 1
0
        private void SetExCoreReprojection(float rotation)
        {
            Matrix T      = Matrix.Transpose(Matrix.CreateTranslation(0, 0, -TranslationZ));
            Matrix Ti     = Matrix.Invert(T);
            Matrix R      = Matrix.CreateRotationY(rotation);
            Matrix space  = R * T * Context.DepthInverseIntrinsics;
            Matrix reproj = Context.DepthIntrinsics * Ti * R * T * Context.DepthInverseIntrinsics;

            ReprojectionTransform.SetValue(reproj);
            SpaceTransform.SetValue(space);
            SplitPlaneVector.SetValue(new Vector4(0f, 0f, 1f, 0f));
            FusionTransform.SetValue(Matrix.CreateRotationY(-SplitPlaneAngle + MathHelper.PiOver2) * space);
        }
Exemplo n.º 2
0
        private void SetFusionReprojection(float rotation, float fusionRotation)
        {
            Matrix T      = Matrix.Transpose(Matrix.CreateTranslation(0, 0, -TranslationZ));
            Matrix Ti     = Matrix.Invert(T);
            Matrix R      = Matrix.CreateRotationY(rotation);
            Matrix space  = R * T * Context.DepthInverseIntrinsics;
            Matrix reproj = Context.DepthIntrinsics * Ti * R * T * Context.DepthInverseIntrinsics;

            ReprojectionTransform.SetValue(reproj);
            SpaceTransform.SetValue(space);
            SplitPlaneVector.SetValue(new Vector4((float)Math.Cos(SplitPlaneAngle), 0f, (float)Math.Sin(SplitPlaneAngle), 0f));
            FusionTransform.SetValue(Matrix.CreateRotationY(fusionRotation) * space);
        }