Ejemplo n.º 1
0
        /// <summary>
        /// Apply the inverse local rotate/translate/scale at transform to frameIn
        /// </summary>
        public static Frame3f ApplyInverseTransform(ITransformed transform, Frame3f frameIn)
        {
            Frame3f result = transform.GetLocalFrame(CoordSpace.ObjectCoords).ToFrame(frameIn);

            result.Scale(1.0f / transform.GetLocalScale());
            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Apply the inverse local rotate/translate/scale at transform to vector
        /// </summary>
        public static Vector3f ApplyInverseTransformV(ITransformed transform, Vector3f v)
        {
            Vector3f vInv  = transform.GetLocalFrame(CoordSpace.ObjectCoords).ToFrameV(ref v);
            Vector3f scale = transform.GetLocalScale();

            return(vInv / scale);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Apply the inverse local rotate/translate/scale at transform to frameIn
        /// </summary>
        public static Frame3f ApplyInverseTransform(ITransformed transform, Frame3f frameIn)
        {
            Frame3f  result = transform.GetLocalFrame(CoordSpace.ObjectCoords).ToFrame(ref frameIn);
            Vector3f scale  = transform.GetLocalScale();

            Util.gDevAssert(IsUniformScale(scale));
            result.Scale(1.0f / scale);
            return(result);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Apply the local rotate/translate/scale at transform to frameIn
        /// </summary>
        public static Frame3f ApplyTransform(ITransformed transform, Frame3f frameIn)
        {
            Frame3f result = frameIn.Scaled(transform.GetLocalScale());

            return(transform.GetLocalFrame(CoordSpace.ObjectCoords).FromFrame(result));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Apply the local rotate/translate/scale at transform to vector
        /// </summary>
        public static Vector3f ApplyTransformV(ITransformed transform, Vector3f vIn)
        {
            Vector3f v = vIn * transform.GetLocalScale();

            return(transform.GetLocalFrame(CoordSpace.ObjectCoords).FromFrameV(ref v));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Apply the local rotate/translate/scale at transform to point
        /// </summary>
        public static Vector3f ApplyTransformP(ITransformed transform, Vector3f pIn)
        {
            Vector3f p = pIn * transform.GetLocalScale();

            return(transform.GetLocalFrame(CoordSpace.ObjectCoords).FromFrameP(ref p));
        }