Exemplo n.º 1
0
        /// <summary>
        ///   Normalize a quaternion.
        ///   Instance represents: Input quaternion.
        /// </summary>
        /// <returns>Normalized quaternion.</returns>
        public HQuaternion QuatNormalize()
        {
            IntPtr proc = HalconAPI.PreCall(224);

            this.Store(proc, 0);
            HalconAPI.InitOCT(proc, 0);
            int err = HalconAPI.CallProcedure(proc);

            this.UnpinTuple();
            HQuaternion hquaternion;
            int         procResult = HQuaternion.LoadNew(proc, 0, err, out hquaternion);

            HalconAPI.PostCall(proc, procResult);
            GC.KeepAlive((object)this);
            return(hquaternion);
        }
Exemplo n.º 2
0
        /// <summary>
        ///   Multiply two quaternions.
        ///   Instance represents: Left quaternion.
        /// </summary>
        /// <param name="quaternionRight">Right quaternion.</param>
        /// <returns>Product of the input quaternions.</returns>
        public HQuaternion QuatCompose(HQuaternion quaternionRight)
        {
            IntPtr proc = HalconAPI.PreCall(232);

            this.Store(proc, 0);
            HalconAPI.Store(proc, 1, (HData)quaternionRight);
            HalconAPI.InitOCT(proc, 0);
            int err = HalconAPI.CallProcedure(proc);

            this.UnpinTuple();
            HalconAPI.UnpinTuple((HTuple)((HData)quaternionRight));
            HQuaternion hquaternion;
            int         procResult = HQuaternion.LoadNew(proc, 0, err, out hquaternion);

            HalconAPI.PostCall(proc, procResult);
            GC.KeepAlive((object)this);
            return(hquaternion);
        }
Exemplo n.º 3
0
 internal static int LoadNew(IntPtr proc, int parIndex, int err, out HQuaternion obj)
 {
     return(HQuaternion.LoadNew(proc, parIndex, HTupleType.MIXED, err, out obj));
 }