Example #1
0
 /// <summary>
 /// Get the current position of the camera with an optionnal transformation of the camera frame/motion tracking frame.
 /// 
 /// </summary>
 /// <param name="rotation">the quaternion will be filled with the current rotation of the camera depending on the reference</param>
 /// <param name="position">the vector will be filled with the current position of the camera depending on the reference</param>
 /// <param name="targetQuaternion"></param>
 /// <param name="targetTranslation"></param>
 /// <param name="mat_type"></param>
 /// <returns></returns>
 public TRACKING_FRAME_STATE GetPosition(ref Quaternion rotation, ref Vector3 translation, ref Quaternion targetQuaternion, ref Vector3 targetTranslation, REFERENCE_FRAME mat_type = REFERENCE_FRAME.WORLD)
 {
     AssertCameraIsReady();
     return (TRACKING_FRAME_STATE)dllz_get_position_at_target_frame(ref rotation, ref translation, ref targetQuaternion, ref targetTranslation, (int)mat_type);
 }
Example #2
0
        /// <summary>
        /// Grab a new image, rectifies it and computes the
        /// disparity map and optionally the depth map.
        /// The grabbing function is typically called in the main loop.
        /// </summary>
        /// <param name="sensingMode">defines the type of disparity map, more info : SENSING_MODE definition</param>
        /// <returns>the function returns false if no problem was encountered,
        /// true otherwise.</returns>

        public sl.ERROR_CODE Grab(SENSING_MODE sensingMode = SENSING_MODE.FILL, bool computeDepth = true, REFERENCE_FRAME referenceFrame = REFERENCE_FRAME.CAMERA)
        {
            AssertCameraIsReady();
            sl.ERROR_CODE error = sl.ERROR_CODE.FAILURE;
            error = (sl.ERROR_CODE)dllz_grab((int)sensingMode, Convert.ToInt32(computeDepth), (int)referenceFrame);
            return error;
        }
Example #3
0
 /// <summary>
 ///  Gets the position of the camera and the current state of the Tracker
 /// </summary>
 /// <param name="rotation">the quaternion will be filled with the current rotation of the camera depending on the reference</param>
 /// <param name="position">the vector will be filled with the current position of the camera depending on the reference</param>
 /// <param name="referenceType">The reference type will fill the quaternion and vector with either the diffrences between the last pose(CAMERA) or the cumul of poses (WORLD)</param>
 /// <returns>A tracking frame state</returns>
 public TRACKING_FRAME_STATE GetPosition(ref Quaternion rotation, ref Vector3 position, REFERENCE_FRAME referenceType = REFERENCE_FRAME.WORLD)
 {
     AssertCameraIsReady();
     return (TRACKING_FRAME_STATE)dllz_get_position(ref rotation, ref position, (int)referenceType);
 }