/** * @brief Gets a new data sample from the smoothing algorithm * @param[in] timestamp * @return smoothed value in PXCPoint3DF32 format */ public PXCMPoint3DF32 GetSample(Int64 timestamp) { PXCMPoint3DF32 point = new PXCMPoint3DF32(); PXCMDataSmoothing_Smoother3D_GetSample(instance, timestamp, out point); return(point); }
/** * @brief Return the 3D center of mass of the hand in world space (in meters). */ public PXCMPoint3DF32 QueryMassCenterWorld() { PXCMPoint3DF32 point = new PXCMPoint3DF32(); PXCMHandData_IHand_QueryMassCenterWorld(instance, ref point); return(point); }
internal static Int32 QueryFeaturePointsINT(IntPtr util, Int32 size, PXCMPoint3DF32[] points, Boolean returnActive, Boolean returnInactive) { if (size == 0 || points==null) return 0; IntPtr ppoints = IntPtr.Zero; Int32 numPoints = PXCMTrackerUtils_QueryFeaturePoints(util, size, out ppoints, returnActive, returnInactive); for (int i = 0; i < Math.Min(size, numPoints); i++) { Marshal.PtrToStructure(ppoints, points[i]); ppoints = new IntPtr(ppoints.ToInt64() + Marshal.SizeOf(typeof(PXCMPoint3DF32))); } return Math.Min(size, numPoints); }
/** @brief Add a new data sample to the smoothing algorithm @param[in] value the latest data sample @return smoothed value in PXCMPoint3DF32 format */ public PXCMPoint3DF32 SmoothValue(PXCMPoint3DF32 value) { return PXCMSmoother_Smoother3D_SmoothValue(instance, value); }
internal static extern pxcmStatus PXCMProjection_ProjectCameraToColor(IntPtr p, Int32 npoints, PXCMPoint3DF32[] pos3d, [Out] PXCMPointF32[] pos_ij);
public AngleAxis() { axis = new PXCMPoint3DF32(); angle = 0; }
/** @brief Return the 3D center of mass of the hand in world space (in meters). */ public PXCMPoint3DF32 QueryMassCenterWorld() { PXCMPoint3DF32 point = new PXCMPoint3DF32(); PXCMHandData_IHand_QueryMassCenterWorld(instance, ref point); return point; }
/** @brief Map depth coordinates to world coordinates for a few pixels. @param[in] pos_uvz The array of depth coordinates + depth value in the PXCMPoint3DF32 structure. @param[out] pos3d The array of world coordinates, in mm, to be returned. @return PXCM_STATUS_NO_ERROR Successful execution. */ public pxcmStatus ProjectDepthToCamera(PXCMPoint3DF32[] pos_uvz, PXCMPoint3DF32[] pos3d) { return PXCMProjection_ProjectDepthToCamera(instance, pos_uvz.Length, pos_uvz, pos3d); }
internal extern static void PXCMRotation_SetFromEulerAngles(IntPtr instance, PXCMPoint3DF32 eulerAngles, PXCMRotation.EulerOrder order);
/** * @brief Add a new data sample to the smoothing algorithm * @param[in] value the latest data sample * @return smoothed value in PXCMPoint3DF32 format */ public PXCMPoint3DF32 SmoothValue(PXCMPoint3DF32 value) { return(PXCMSmoother_Smoother3D_SmoothValue(instance, value)); }
/** @brief: Allows Users to access the surface's vertices that are within view from camera's current pose. @param[out] vertices: Array of pre-allocated PXCMPoint3DF32 to store vertices. Each element is a vector of x, y and z components. The image size in pixels must be QVGA and hence the array size in bytes should be: (PXCMPoint3DF32's byte size) x (320 x 240) @returns: On success PXCM_STATUS_NO_ERROR, Otherwise error code will be returned on failure */ public pxcmStatus GetVertices(PXCMPoint3DF32[] vertices) { return PXCMScenePerception_GetVertices(instance, vertices); }
/** @brief: Allows users to access normals of surface that are within view from the camera's current pose. @param[out] normals: Array of pre-allocated PXCMPoint3DF32 to store normal vectors. Each normal vector has three components namely x, y and z. The size in pixels must be QVGA and hence the array size in bytes should be: (PXCMPoint3DF32's byte size) x (320 x 240) @returns: On success PXCM_STATUS_NO_ERROR, Otherwise error code will be returned on failure */ public pxcmStatus GetNormals(PXCMPoint3DF32[] normals) { return PXCMScenePerception_GetNormals(instance, normals); }
internal extern static void PXCMDataSmoothing_Smoother3D_GetSample(IntPtr instance, Int64 timestamp, out PXCMPoint3DF32 sample);
internal extern static pxcmStatus PXCMDataSmoothing_Smoother3D_AddSample(IntPtr instance, PXCMPoint3DF32 newSample, Int64 timestamp);
/** @brief Add a new data sample to the smoothing algorithm @param[in] newSample the latest data sample @param[in] timestamp @return PXCM_STATUS_NO_ERROR */ public pxcmStatus AddSample(PXCMPoint3DF32 newSample) { return AddSample(newSample, 0); }
internal extern static PXCMPoint3DF32 PXCMSmoother_Smoother3D_SmoothValue(IntPtr instance, PXCMPoint3DF32 value);
/** @brief Retrieve the vertices for the specific depth image. The vertices is a PXCMPoint3DF32 array of depth size width*height. The world coordiantes units are in mm. @param[in] depth The depth image instance. @param[out] inv_uvmap The inverse UV map, to be returned. @return PXCM_STATUS_NO_ERROR Successful execution. */ public pxcmStatus QueryVertices(PXCMImage depth, PXCMPoint3DF32[] vertices) { return PXCMProjection_QueryVertices(instance, depth.instance, vertices); }
/** @brief Map camera coordinates to depth coordinates for a few pixels. @param[in] pos3d The array of world coordinates, in mm. @param[out] pos_uv The array of depth coordinates, to be returned. @return PXCM_STATUS_NO_ERROR Successful execution. */ public pxcmStatus ProjectCameraToDepth(PXCMPoint3DF32[] pos3d, PXCMPointF32[] pos_uv) { return PXCMProjection_ProjectCameraToDepth(instance, pos3d.Length, pos3d, pos_uv); }
internal extern static pxcmStatus PXCMPointConverter_Set3DPoint(IntPtr instance, PXCMPoint3DF32 point3D);
/** @brief Set rotation based on Euler angles representation. Euler angles are a 3D point that represents rotation in 3D. Each variable is the angle of rotation around a certain axis (x/y/z). @param[in] eulerAngles the rotation in Euler angles representation. @param[in] order the order in which we set the rotation (ROLL_PITCH_YAW as default). */ public void SetFromEulerAngles(PXCMPoint3DF32 eulerAngles, PXCMRotation.EulerOrder order) { PXCMRotation_SetFromEulerAngles(instance, eulerAngles, order); }
internal extern static PXCMPoint3DF32 PXCMRotation_RotateVector(IntPtr instance, PXCMPoint3DF32 vec);
/** * @brief Add a new data sample to the smoothing algorithm * @param[in] newSample the latest data sample * @param[in] timestamp * @return PXCM_STATUS_NO_ERROR */ public pxcmStatus AddSample(PXCMPoint3DF32 newSample) { return(AddSample(newSample, 0)); }
internal extern static void PXCMRotation_SetFromAngleAxis(IntPtr instance, Single angle, PXCMPoint3DF32 axis);
public PXCMBox3DF32(PXCMPoint3DF32 centerOffset, PXCMPoint3DF32 dimension) { this.centerOffset = centerOffset; this.dimension = dimension; }
/** * @brief Set 2D point to be converted * @note only relevant when using CreateCustomPointConverter * @return PXCM_STATUS_ITEM_UNAVAILABLE if not using CustomPointConverter */ public pxcmStatus Set3DPoint(PXCMPoint3DF32 point3D) { return(PXCMPointConverter_Set3DPoint(instance, point3D)); }
/** @brief Add a new data sample to the smoothing algorithm @param[in] newSample the latest data sample @param[in] timestamp @return PXCM_STATUS_NO_ERROR */ public pxcmStatus AddSample(PXCMPoint3DF32 newSample, Int64 timestamp) { return PXCMDataSmoothing_Smoother3D_AddSample(instance, newSample, timestamp); }
/** * Retrieve the detected feature points for map creation. Active points are ones which have been detected * in the current frame, inactive points were detected previously but are not detected in the current frame. * * \param points: Array where the feature points will be stored * \param returnActive: Return the active (currently tracked) features in the array * \param returnInactive: Return the inactive (not currently tracked) features in the array * * \return The number of feature points copied into \c points * * \sa QueryNumberFeaturePoints * \sa Start3DMapCreation * \sa Start3DMapExtension */ public Int32 QueryFeaturePoints(PXCMPoint3DF32[] points, Boolean returnActive, Boolean returnInactive) { return QueryFeaturePointsINT(instance, (points==null)?0:points.Length, points, returnActive, returnInactive); }
/** @brief Gets a new data sample from the smoothing algorithm @param[in] timestamp @return smoothed value in PXCPoint3DF32 format */ public PXCMPoint3DF32 GetSample(Int64 timestamp) { PXCMPoint3DF32 point = new PXCMPoint3DF32(); PXCMDataSmoothing_Smoother3D_GetSample(instance, timestamp, out point); return point; }
/** * @brief Get rotated vector according to current rotation. * @param[in] vec - the vector we want to rotate * @return rotated vector according to current rotation. */ public PXCMPoint3DF32 RotateVector(PXCMPoint3DF32 vec) { return(PXCMRotation_RotateVector(instance, vec)); }
/** * @brief Set rotation based on Euler angles representation. * Euler angles are a 3D point that represents rotation in 3D. Each variable is the angle * of rotation around a certain axis (x/y/z). * * @param[in] eulerAngles the rotation in Euler angles representation. * @param[in] order the order in which we set the rotation (ROLL_PITCH_YAW as default). */ public void SetFromEulerAngles(PXCMPoint3DF32 eulerAngles, PXCMRotation.EulerOrder order) { PXCMRotation_SetFromEulerAngles(instance, eulerAngles, order); }
/** * @brief Set rotation based on a rotation angle(RADIANS) around an axis. * angle-axis represents rotation (angle in RADIANS) around an axis * @param[in] angle rotation angle (RADIANS). * @param[in] axis rotation around this axis. */ public void SetFromAngleAxis(Single angle, PXCMPoint3DF32 axis) { PXCMRotation_SetFromAngleAxis(instance, angle, axis); }
/* Member Functions */ /** @brief Map depth coordinates to color coordinates for a few pixels. @param[in] pos_uvz The array of depth coordinates + depth value in the PXCMPoint3DF32 structure. @param[out] pos_ij The array of color coordinates, to be returned. @return PXCM_STATUS_NO_ERROR Successful execution. */ public pxcmStatus MapDepthToColor(PXCMPoint3DF32[] pos_uvz, PXCMPointF32[] pos_ij) { return PXCMProjection_MapDepthToColor(instance, pos_uvz.Length, pos_uvz, pos_ij); }
/** @brief Map color pixel coordinates to camera coordinates for a few pixels. @param[in] pos_ijz The array of color coordinates + depth value in the PXCMPoint3DF32 structure. @param[out] pos3d The array of camera coordinates, in mm, to be returned. @return PXCM_STATUS_NO_ERROR Successful execution. */ public pxcmStatus ProjectColorToCamera(PXCMPoint3DF32[] pos_ijz, PXCMPoint3DF32[] pos3d) { return PXCMProjection_ProjectColorToCamera(instance, pos_ijz.Length, pos_ijz, pos3d); }
/** @brief Map camera coordinates to color coordinates for a few pixels. @param[in] pos3d The array of world coordinates, in mm. @param[out] pos_ij The array of color coordinates, to be returned. @return PXCM_STATUS_NO_ERROR Successful execution. */ public pxcmStatus ProjectCameraToColor(PXCMPoint3DF32[] pos3d, PXCMPointF32[] pos_ij) { return PXCMProjection_ProjectCameraToColor(instance, pos3d.Length, pos3d, pos_ij); }
internal static extern void PXCMHandData_IHand_QueryMassCenterWorld(IntPtr instance, ref PXCMPoint3DF32 point);
/** @brief Get rotated vector according to current rotation. @param[in] vec - the vector we want to rotate @return rotated vector according to current rotation. */ public PXCMPoint3DF32 RotateVector(PXCMPoint3DF32 vec) { return PXCMRotation_RotateVector(instance, vec); }
internal static extern pxcmStatus PXCMProjection_MapDepthToColor(IntPtr p, Int32 npoints, PXCMPoint3DF32[] pos_uvz, [Out] PXCMPointF32[] pos_ij);
/** @brief Set rotation based on a rotation angle(RADIANS) around an axis. angle-axis represents rotation (angle in RADIANS) around an axis @param[in] angle rotation angle (RADIANS). @param[in] axis rotation around this axis. */ public void SetFromAngleAxis(Single angle, PXCMPoint3DF32 axis) { PXCMRotation_SetFromAngleAxis(instance, angle, axis); }
internal static extern pxcmStatus PXCMProjection_ProjectDepthToCamera(IntPtr p, Int32 npoints, PXCMPoint3DF32[] pos_uvz, [Out] PXCMPoint3DF32[] pos3d);
/** * @brief Add a new data sample to the smoothing algorithm * @param[in] newSample the latest data sample * @param[in] timestamp * @return PXCM_STATUS_NO_ERROR */ public pxcmStatus AddSample(PXCMPoint3DF32 newSample, Int64 timestamp) { return(PXCMDataSmoothing_Smoother3D_AddSample(instance, newSample, timestamp)); }