![]() |
OpenNI 1.5.7
|
00001 /***************************************************************************** 00002 * * 00003 * OpenNI 1.x Alpha * 00004 * Copyright (C) 2012 PrimeSense Ltd. * 00005 * * 00006 * This file is part of OpenNI. * 00007 * * 00008 * Licensed under the Apache License, Version 2.0 (the "License"); * 00009 * you may not use this file except in compliance with the License. * 00010 * You may obtain a copy of the License at * 00011 * * 00012 * http://www.apache.org/licenses/LICENSE-2.0 * 00013 * * 00014 * Unless required by applicable law or agreed to in writing, software * 00015 * distributed under the License is distributed on an "AS IS" BASIS, * 00016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 00017 * See the License for the specific language governing permissions and * 00018 * limitations under the License. * 00019 * * 00020 *****************************************************************************/ 00021 #ifndef __XN_TYPES_H__ 00022 #define __XN_TYPES_H__ 00023 00024 //--------------------------------------------------------------------------- 00025 // Includes 00026 //--------------------------------------------------------------------------- 00027 #include <XnStatus.h> 00028 #include <XnOS.h> 00029 00030 //--------------------------------------------------------------------------- 00031 // Defines 00032 //--------------------------------------------------------------------------- 00034 #define XN_MAX_NAME_LENGTH 80 00035 00037 #define XN_MAX_CREATION_INFO_LENGTH 255 00038 00040 #define XN_MAX_LICENSE_LENGTH 255 00041 00043 #define XN_NODE_WAIT_FOR_DATA_TIMEOUT 2000 00044 00046 #define XN_VENDOR_OPEN_NI "OpenNI" 00047 00049 #define XN_FORMAT_NAME_ONI "oni" 00050 00052 #define XN_SCRIPT_FORMAT_XML "xml" 00053 00055 #define XN_PLAYBACK_SPEED_FASTEST 0.0 00056 00058 #define XN_AUTO_CONTROL XN_MIN_INT32 00059 00061 #define XN_PAUSE_AUTO_CONTROL XN_MAX_INT32 00062 00063 //--------------------------------------------------------------------------- 00064 // Forward Declarations 00065 //--------------------------------------------------------------------------- 00066 struct XnInternalNodeData; 00067 00068 //--------------------------------------------------------------------------- 00069 // Types 00070 //--------------------------------------------------------------------------- 00071 00072 #if XN_PLATFORM != XN_PLATFORM_ARC 00073 #pragma pack (push, 1) 00074 #endif 00075 00079 typedef struct XnContext XnContext; 00080 00084 typedef struct XnInternalNodeData* XnNodeHandle; 00085 00089 typedef XnUInt32 XnLockHandle; 00090 00094 typedef XnInt32 XnProductionNodeType; 00095 00099 typedef enum XnPredefinedProductionNodeType 00100 { 00102 XN_NODE_TYPE_INVALID = -1, 00103 00105 XN_NODE_TYPE_DEVICE = 1, 00106 00108 XN_NODE_TYPE_DEPTH = 2, 00109 00111 XN_NODE_TYPE_IMAGE = 3, 00112 00114 XN_NODE_TYPE_AUDIO = 4, 00115 00117 XN_NODE_TYPE_IR = 5, 00118 00120 XN_NODE_TYPE_USER = 6, 00121 00123 XN_NODE_TYPE_RECORDER = 7, 00124 00126 XN_NODE_TYPE_PLAYER = 8, 00127 00129 XN_NODE_TYPE_GESTURE = 9, 00130 00132 XN_NODE_TYPE_SCENE = 10, 00133 00135 XN_NODE_TYPE_HANDS = 11, 00136 00138 XN_NODE_TYPE_CODEC = 12, 00139 00141 XN_NODE_TYPE_PRODUCTION_NODE = 13, 00142 XN_NODE_TYPE_GENERATOR = 14, 00143 XN_NODE_TYPE_MAP_GENERATOR = 15, 00144 XN_NODE_TYPE_SCRIPT = 16, 00145 00146 XN_NODE_TYPE_FIRST_EXTENSION, 00147 00148 } XnPredefinedProductionNodeType; 00149 00153 typedef struct XnVersion 00154 { 00155 XnUInt8 nMajor; 00156 XnUInt8 nMinor; 00157 XnUInt16 nMaintenance; 00158 XnUInt32 nBuild; 00159 } XnVersion; 00160 00164 typedef struct XnProductionNodeDescription 00165 { 00167 XnProductionNodeType Type; 00169 XnChar strVendor[XN_MAX_NAME_LENGTH]; 00171 XnChar strName[XN_MAX_NAME_LENGTH]; 00173 XnVersion Version; 00174 } XnProductionNodeDescription; 00175 00179 typedef struct XnNodeInfo XnNodeInfo; 00180 00184 typedef struct XnNodeInfoListNode XnNodeInfoListNode; 00185 00189 typedef struct XnNodeInfoList XnNodeInfoList; 00190 00194 typedef struct XnNodeInfoListIterator 00195 { 00196 XnNodeInfoListNode* pCurrent; 00197 } XnNodeInfoListIterator; 00198 00199 typedef struct XnNodeQuery XnNodeQuery; 00200 00204 typedef struct XnLicense 00205 { 00207 XnChar strVendor[XN_MAX_NAME_LENGTH]; 00209 XnChar strKey[XN_MAX_LICENSE_LENGTH]; 00210 } XnLicense; 00211 00216 typedef struct XnEnumerationErrors XnEnumerationErrors; 00217 00221 typedef void* XnModuleNodeHandle; 00222 00229 typedef void (XN_CALLBACK_TYPE* XnStateChangedHandler)(XnNodeHandle hNode, void* pCookie); 00230 00237 typedef void (XN_CALLBACK_TYPE* XnErrorStateChangedHandler)(XnStatus errorState, void* pCookie); 00238 00244 typedef void (XN_CALLBACK_TYPE* XnFreeHandler)(const void* pData); 00245 00246 typedef void (XN_CALLBACK_TYPE* XnContextShuttingDownHandler)(XnContext* pContext, void* pCookie); 00247 00258 typedef void (XN_CALLBACK_TYPE* XnNodeCreationHandler)(XnContext* pContext, XnNodeHandle hCreatedNode, void* pCookie); 00259 00267 typedef void (XN_CALLBACK_TYPE* XnNodeDestructionHandler)(XnContext* pContext, const XnChar* strDestroyedNodeName, void* pCookie); 00268 00270 typedef void* XnCallbackHandle; 00271 00272 typedef struct XnModuleExportedProductionNodeInterface XnModuleExportedProductionNodeInterface; // Forward Declaration 00273 00274 //--------------------------------------------------------------------------- 00275 // 3D Vision Types 00276 //--------------------------------------------------------------------------- 00278 typedef XnUInt16 XnDepthPixel; 00279 00281 #define XN_DEPTH_NO_SAMPLE_VALUE ((XnDepthPixel)0) 00282 00284 typedef struct XnRGB24Pixel 00285 { 00286 XnUInt8 nRed; 00287 XnUInt8 nGreen; 00288 XnUInt8 nBlue; 00289 } XnRGB24Pixel; 00290 00292 typedef struct XnYUV422DoublePixel 00293 { 00294 XnUInt8 nU; 00295 XnUInt8 nY1; 00296 XnUInt8 nV; 00297 XnUInt8 nY2; 00298 } XnYUV422DoublePixel; 00299 00301 typedef XnUInt8 XnGrayscale8Pixel; 00302 00304 typedef XnUInt16 XnGrayscale16Pixel; 00305 00307 typedef XnGrayscale16Pixel XnIRPixel; 00308 00310 typedef XnUInt16 XnLabel; 00311 00312 //--------------------------------------------------------------------------- 00313 // Generators Capabilities 00314 //--------------------------------------------------------------------------- 00315 #define XN_CAPABILITY_EXTENDED_SERIALIZATION "ExtendedSerialization" 00316 #define XN_CAPABILITY_MIRROR "Mirror" 00317 #define XN_CAPABILITY_ALTERNATIVE_VIEW_POINT "AlternativeViewPoint" 00318 #define XN_CAPABILITY_CROPPING "Cropping" 00319 #define XN_CAPABILITY_USER_POSITION "UserPosition" 00320 #define XN_CAPABILITY_SKELETON "User::Skeleton" 00321 #define XN_CAPABILITY_POSE_DETECTION "User::PoseDetection" 00322 #define XN_CAPABILITY_LOCK_AWARE "LockAware" 00323 #define XN_CAPABILITY_ERROR_STATE "ErrorState" 00324 #define XN_CAPABILITY_FRAME_SYNC "FrameSync" 00325 #define XN_CAPABILITY_DEVICE_IDENTIFICATION "DeviceIdentification" 00326 #define XN_CAPABILITY_BRIGHTNESS "Brightness" 00327 #define XN_CAPABILITY_CONTRAST "Contrast" 00328 #define XN_CAPABILITY_HUE "Hue" 00329 #define XN_CAPABILITY_SATURATION "Saturation" 00330 #define XN_CAPABILITY_SHARPNESS "Sharpness" 00331 #define XN_CAPABILITY_GAMMA "Gamma" 00332 #define XN_CAPABILITY_COLOR_TEMPERATURE "ColorTemperature" 00333 #define XN_CAPABILITY_BACKLIGHT_COMPENSATION "BacklightCompensation" 00334 #define XN_CAPABILITY_GAIN "Gain" 00335 #define XN_CAPABILITY_PAN "Pan" 00336 #define XN_CAPABILITY_TILT "Tilt" 00337 #define XN_CAPABILITY_ROLL "Roll" 00338 #define XN_CAPABILITY_ZOOM "Zoom" 00339 #define XN_CAPABILITY_EXPOSURE "Exposure" 00340 #define XN_CAPABILITY_AUTO_EXPOSURE "AutoExposure" 00341 #define XN_CAPABILITY_IRIS "Iris" 00342 #define XN_CAPABILITY_FOCUS "Focus" 00343 #define XN_CAPABILITY_LOW_LIGHT_COMPENSATION "LowLightCompensation" 00344 #define XN_CAPABILITY_ANTI_FLICKER "AntiFlicker" 00345 #define XN_CAPABILITY_HAND_TOUCHING_FOV_EDGE "Hands::HandTouchingFOVEdge" 00346 00347 // Backwards compatibility - typo was fixed 00348 #define XN_CAPABILITY_ANTI_FILCKER XN_CAPABILITY_ANTI_FLICKER 00349 00350 // deprecated pragma is only supported in Visual Studio 00351 #if (XN_PLATFORM == XN_PLATFORM_WIN32) 00352 #pragma deprecated("XN_CAPABILITY_ANTI_FILCKER") 00353 #endif 00354 00355 //--------------------------------------------------------------------------- 00356 // Generators API Structs 00357 //--------------------------------------------------------------------------- 00358 00359 #define XN_QQVGA_X_RES 160 00360 #define XN_QQVGA_Y_RES 120 00361 00362 #define XN_CGA_X_RES 320 00363 #define XN_CGA_Y_RES 200 00364 00365 #define XN_QVGA_X_RES 320 00366 #define XN_QVGA_Y_RES 240 00367 00368 #define XN_VGA_X_RES 640 00369 #define XN_VGA_Y_RES 480 00370 00371 #define XN_SVGA_X_RES 800 00372 #define XN_SVGA_Y_RES 600 00373 00374 #define XN_XGA_X_RES 1024 00375 #define XN_XGA_Y_RES 768 00376 00377 #define XN_720P_X_RES 1280 00378 #define XN_720P_Y_RES 720 00379 00380 #define XN_SXGA_X_RES 1280 00381 #define XN_SXGA_Y_RES 1024 00382 00383 #define XN_UXGA_X_RES 1600 00384 #define XN_UXGA_Y_RES 1200 00385 00386 #define XN_1080P_X_RES 1920 00387 #define XN_1080P_Y_RES 1080 00388 00389 #define XN_QCIF_X_RES 176 00390 #define XN_QCIF_Y_RES 144 00391 00392 #define XN_240P_X_RES 423 00393 #define XN_240P_Y_RES 240 00394 00395 #define XN_CIF_X_RES 352 00396 #define XN_CIF_Y_RES 288 00397 00398 #define XN_WVGA_X_RES 640 00399 #define XN_WVGA_Y_RES 360 00400 00401 #define XN_480P_X_RES 864 00402 #define XN_480P_Y_RES 480 00403 00404 #define XN_576P_X_RES 1024 00405 #define XN_576P_Y_RES 576 00406 00407 #define XN_DV_X_RES 960 00408 #define XN_DV_Y_RES 720 00409 00410 typedef enum XnResolution 00411 { 00412 XN_RES_CUSTOM = 0, 00413 XN_RES_QQVGA = 1, 00414 XN_RES_CGA = 2, 00415 XN_RES_QVGA = 3, 00416 XN_RES_VGA = 4, 00417 XN_RES_SVGA = 5, 00418 XN_RES_XGA = 6, 00419 XN_RES_720P = 7, 00420 XN_RES_SXGA = 8, 00421 XN_RES_UXGA = 9, 00422 XN_RES_1080P = 10, 00423 XN_RES_QCIF = 11, 00424 XN_RES_240P = 12, 00425 XN_RES_CIF = 13, 00426 XN_RES_WVGA = 14, 00427 XN_RES_480P = 15, 00428 XN_RES_576P = 16, 00429 XN_RES_DV = 17, 00430 } XnResolution; 00431 00435 typedef struct XnMapOutputMode 00436 { 00438 XnUInt32 nXRes; 00440 XnUInt32 nYRes; 00442 XnUInt32 nFPS; 00443 } XnMapOutputMode; 00444 00445 typedef enum XnSampleRate 00446 { 00447 XN_SAMPLE_RATE_8K = 8000, 00448 XN_SAMPLE_RATE_11K = 11025, 00449 XN_SAMPLE_RATE_12K = 12000, 00450 XN_SAMPLE_RATE_16K = 16000, 00451 XN_SAMPLE_RATE_22K = 22050, 00452 XN_SAMPLE_RATE_24K = 24000, 00453 XN_SAMPLE_RATE_32K = 32000, 00454 XN_SAMPLE_RATE_44K = 44100, 00455 XN_SAMPLE_RATE_48K = 48000, 00456 } XnSampleRate; 00457 00458 typedef struct XnWaveOutputMode 00459 { 00460 XnUInt32 nSampleRate; 00461 XnUInt16 nBitsPerSample; 00462 XnUInt8 nChannels; 00463 } XnWaveOutputMode; 00464 00468 typedef struct XnVector3D 00469 { 00470 XnFloat X; 00471 XnFloat Y; 00472 XnFloat Z; 00473 } XnVector3D; 00474 00475 typedef XnVector3D XnPoint3D; 00476 00480 typedef struct XnBoundingBox3D 00481 { 00482 XnPoint3D LeftBottomNear; 00483 XnPoint3D RightTopFar; 00484 } XnBoundingBox3D; 00485 00489 typedef struct XnCropping 00490 { 00492 XnBool bEnabled; 00494 XnUInt16 nXOffset; 00496 XnUInt16 nYOffset; 00498 XnUInt16 nXSize; 00500 XnUInt16 nYSize; 00501 } XnCropping; 00502 00506 typedef struct XnFieldOfView 00507 { 00509 XnDouble fHFOV; 00511 XnDouble fVFOV; 00512 } XnFieldOfView; 00513 00514 typedef enum XnPixelFormat 00515 { 00516 XN_PIXEL_FORMAT_RGB24 = 1, 00517 XN_PIXEL_FORMAT_YUV422 = 2, 00518 XN_PIXEL_FORMAT_GRAYSCALE_8_BIT = 3, 00519 XN_PIXEL_FORMAT_GRAYSCALE_16_BIT = 4, 00520 XN_PIXEL_FORMAT_MJPEG = 5, 00521 } XnPixelFormat; 00522 00523 typedef struct XnSupportedPixelFormats 00524 { 00525 XnBool m_bRGB24 : 1; 00526 XnBool m_bYUV422 : 1; 00527 XnBool m_bGrayscale8Bit : 1; 00528 XnBool m_bGrayscale16Bit : 1; 00529 XnBool m_bMJPEG : 1; 00530 XnUInt m_nPadding : 3; 00531 XnUInt m_nReserved : 24; 00532 } XnSupportedPixelFormats; 00533 00534 typedef enum XnPlayerSeekOrigin 00535 { 00536 XN_PLAYER_SEEK_SET = 0, 00537 XN_PLAYER_SEEK_CUR = 1, 00538 XN_PLAYER_SEEK_END = 2, 00539 } XnPlayerSeekOrigin; 00540 00541 typedef enum XnPowerLineFrequency 00542 { 00543 XN_POWER_LINE_FREQUENCY_OFF = 0, 00544 XN_POWER_LINE_FREQUENCY_50_HZ = 50, 00545 XN_POWER_LINE_FREQUENCY_60_HZ = 60, 00546 } XnPowerLineFrequency; 00547 00548 // User 00549 typedef XnUInt32 XnUserID; 00550 typedef XnFloat XnConfidence; 00551 00553 typedef struct XnMatrix3X3 00554 { 00556 XnFloat elements[9]; 00557 } XnMatrix3X3; 00558 00563 typedef struct XnPlane3D 00564 { 00566 XnVector3D vNormal; 00567 00569 XnPoint3D ptPoint; 00570 } XnPlane3D; 00571 00576 typedef struct XnSkeletonJointPosition 00577 { 00579 XnVector3D position; 00580 00582 XnConfidence fConfidence; 00583 } XnSkeletonJointPosition; 00584 00592 typedef struct XnSkeletonJointOrientation 00593 { 00595 XnMatrix3X3 orientation; 00597 XnConfidence fConfidence; 00598 } XnSkeletonJointOrientation; 00599 00603 typedef struct XnSkeletonJointTransformation 00604 { 00606 XnSkeletonJointPosition position; 00608 XnSkeletonJointOrientation orientation; 00609 } XnSkeletonJointTransformation; 00610 00614 typedef enum XnSkeletonJoint 00615 { 00616 XN_SKEL_HEAD = 1, 00617 XN_SKEL_NECK = 2, 00618 XN_SKEL_TORSO = 3, 00619 XN_SKEL_WAIST = 4, 00620 00621 XN_SKEL_LEFT_COLLAR = 5, 00622 XN_SKEL_LEFT_SHOULDER = 6, 00623 XN_SKEL_LEFT_ELBOW = 7, 00624 XN_SKEL_LEFT_WRIST = 8, 00625 XN_SKEL_LEFT_HAND = 9, 00626 XN_SKEL_LEFT_FINGERTIP =10, 00627 00628 XN_SKEL_RIGHT_COLLAR =11, 00629 XN_SKEL_RIGHT_SHOULDER =12, 00630 XN_SKEL_RIGHT_ELBOW =13, 00631 XN_SKEL_RIGHT_WRIST =14, 00632 XN_SKEL_RIGHT_HAND =15, 00633 XN_SKEL_RIGHT_FINGERTIP =16, 00634 00635 XN_SKEL_LEFT_HIP =17, 00636 XN_SKEL_LEFT_KNEE =18, 00637 XN_SKEL_LEFT_ANKLE =19, 00638 XN_SKEL_LEFT_FOOT =20, 00639 00640 XN_SKEL_RIGHT_HIP =21, 00641 XN_SKEL_RIGHT_KNEE =22, 00642 XN_SKEL_RIGHT_ANKLE =23, 00643 XN_SKEL_RIGHT_FOOT =24 00644 } XnSkeletonJoint; 00645 00647 typedef enum XnSkeletonProfile 00648 { 00650 XN_SKEL_PROFILE_NONE = 1, 00651 00653 XN_SKEL_PROFILE_ALL = 2, 00654 00656 XN_SKEL_PROFILE_UPPER = 3, 00657 00659 XN_SKEL_PROFILE_LOWER = 4, 00660 00662 XN_SKEL_PROFILE_HEAD_HANDS = 5, 00663 } XnSkeletonProfile; 00664 00666 typedef enum XnPoseDetectionStatus 00667 { 00668 XN_POSE_DETECTION_STATUS_OK = 0, 00669 XN_POSE_DETECTION_STATUS_NO_USER = 1, 00670 XN_POSE_DETECTION_STATUS_TOP_FOV = 2, 00671 XN_POSE_DETECTION_STATUS_SIDE_FOV = 3, 00672 XN_POSE_DETECTION_STATUS_ERROR = 4, 00673 XN_POSE_DETECTION_STATUS_NO_TRACKING = 5 00674 } XnPoseDetectionStatus; 00675 00676 00678 typedef enum XnPoseDetectionState 00679 { 00680 XN_POSE_DETECTION_STATE_IN_POSE =0, 00681 XN_POSE_DETECTION_STATE_OUT_OF_POSE =1, 00682 XN_POSE_DETECTION_STATE_UNDEFINED =2 00683 } XnPoseDetectionState; 00685 typedef enum XnCalibrationStatus 00686 { 00687 XN_CALIBRATION_STATUS_OK = 0, 00688 XN_CALIBRATION_STATUS_NO_USER = 1, 00689 XN_CALIBRATION_STATUS_ARM = 2, 00690 XN_CALIBRATION_STATUS_LEG = 3, 00691 XN_CALIBRATION_STATUS_HEAD = 4, 00692 XN_CALIBRATION_STATUS_TORSO = 5, 00693 XN_CALIBRATION_STATUS_TOP_FOV = 6, 00694 XN_CALIBRATION_STATUS_SIDE_FOV = 7, 00695 XN_CALIBRATION_STATUS_POSE = 8, 00696 XN_CALIBRATION_STATUS_MANUAL_ABORT = 9, 00697 XN_CALIBRATION_STATUS_MANUAL_RESET = 10, 00698 XN_CALIBRATION_STATUS_TIMEOUT_FAIL = 11 00699 } XnCalibrationStatus; 00700 00701 typedef enum XnDirection 00702 { 00703 XN_DIRECTION_ILLEGAL = 0, 00704 XN_DIRECTION_LEFT = 1, 00705 XN_DIRECTION_RIGHT = 2, 00706 XN_DIRECTION_UP = 3, 00707 XN_DIRECTION_DOWN = 4, 00708 XN_DIRECTION_FORWARD = 5, 00709 XN_DIRECTION_BACKWARD = 6, 00710 } XnDirection; 00711 00712 // User 00720 typedef void (XN_CALLBACK_TYPE* XnUserHandler)(XnNodeHandle hNode, XnUserID user, void* pCookie); 00721 00722 // Hands 00732 typedef void (XN_CALLBACK_TYPE* XnHandCreate)(XnNodeHandle hNode, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie); 00733 00743 typedef void (XN_CALLBACK_TYPE* XnHandUpdate)(XnNodeHandle hNode, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie); 00744 00753 typedef void (XN_CALLBACK_TYPE* XnHandDestroy)(XnNodeHandle hNode, XnUserID user, XnFloat fTime, void* pCookie); 00754 00765 typedef void (XN_CALLBACK_TYPE* XnHandTouchingFOVEdge)(XnNodeHandle hNode, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, XnDirection eDir, void* pCookie); 00766 // Gesture Module 00776 typedef void (XN_CALLBACK_TYPE* XnGestureRecognized)(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pIDPosition, const XnPoint3D* pEndPosition, void* pCookie); 00786 typedef void (XN_CALLBACK_TYPE* XnGestureProgress)(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pPosition, XnFloat fProgress, void* pCookie); 00787 00788 typedef void (XN_CALLBACK_TYPE* XnGestureIntermediateStageCompleted)(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pPosition, void* pCookie); 00789 typedef void (XN_CALLBACK_TYPE* XnGestureReadyForNextIntermediateStage)(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pPosition, void* pCookie); 00790 00791 // Skeleton 00799 typedef void (XN_CALLBACK_TYPE* XnCalibrationStart)(XnNodeHandle hNode, XnUserID user, void* pCookie); 00808 typedef void (XN_CALLBACK_TYPE* XnCalibrationEnd)(XnNodeHandle hNode, XnUserID user, XnBool bSuccess, void* pCookie); 00809 00810 typedef void (XN_CALLBACK_TYPE* XnCalibrationInProgress)(XnNodeHandle hNode, XnUserID user, XnCalibrationStatus calibrationError, void* pCookie); 00811 typedef void (XN_CALLBACK_TYPE* XnCalibrationComplete)(XnNodeHandle hNode, XnUserID user, XnCalibrationStatus calibrationError, void* pCookie); 00812 00813 // Pose Detection 00822 typedef void (XN_CALLBACK_TYPE* XnPoseDetectionCallback)(XnNodeHandle hNode, const XnChar* strPose, XnUserID user, void* pCookie); 00823 00824 typedef void (XN_CALLBACK_TYPE* XnPoseDetectionInProgress)(XnNodeHandle hNode, const XnChar* strPose, XnUserID user, XnPoseDetectionStatus poseDetectionError, void* pCookie); 00825 00826 //--------------------------------------------------------------------------- 00827 // Recorder Types 00828 //--------------------------------------------------------------------------- 00829 00835 typedef enum XnRecordMedium 00836 { 00838 XN_RECORD_MEDIUM_FILE = 0, 00839 } XnRecordMedium; 00840 00842 typedef XnUInt32 XnCodecID; 00843 00845 #define XN_CODEC_ID(c1, c2, c3, c4) (XnCodecID)((c4 << 24) | (c3 << 16) | (c2 << 8) | c1) 00846 00852 typedef struct XnRecorderOutputStreamInterface 00853 { 00859 XnStatus (XN_CALLBACK_TYPE* Open)(void* pCookie); 00860 00869 XnStatus (XN_CALLBACK_TYPE* Write)(void* pCookie, const XnChar* strNodeName, 00870 const void* pData, XnUInt32 nSize); 00871 00879 XnStatus (XN_CALLBACK_TYPE* Seek)(void* pCookie, XnOSSeekType seekType, const XnInt32 nOffset); 00880 00889 XnUInt32 (XN_CALLBACK_TYPE* Tell)(void* pCookie); 00890 00896 void (XN_CALLBACK_TYPE* Close)(void* pCookie); 00897 00905 XnStatus (XN_CALLBACK_TYPE* Seek64)(void* pCookie, XnOSSeekType seekType, const XnInt64 nOffset); 00906 00915 XnUInt64 (XN_CALLBACK_TYPE* Tell64)(void* pCookie); 00916 00917 } XnRecorderOutputStreamInterface; 00918 00924 typedef struct XnPlayerInputStreamInterface 00925 { 00931 XnStatus (XN_CALLBACK_TYPE* Open)(void* pCookie); 00932 00942 XnStatus (XN_CALLBACK_TYPE* Read)(void* pCookie, void* pBuffer, XnUInt32 nSize, XnUInt32* pnBytesRead); 00943 00951 XnStatus (XN_CALLBACK_TYPE* Seek)(void* pCookie, XnOSSeekType seekType, const XnInt32 nOffset); 00952 00960 XnUInt32 (XN_CALLBACK_TYPE* Tell)(void* pCookie); 00961 00967 void (XN_CALLBACK_TYPE* Close)(void* pCookie); 00968 00976 XnStatus (XN_CALLBACK_TYPE* Seek64)(void* pCookie, XnOSSeekType seekType, const XnInt64 nOffset); 00977 00986 XnUInt64 (XN_CALLBACK_TYPE* Tell64)(void* pCookie); 00987 00988 } XnPlayerInputStreamInterface; 00989 00993 typedef struct XnNodeNotifications 00994 { 01001 XnStatus (XN_CALLBACK_TYPE* OnNodeAdded) 01002 (void* pCookie, const XnChar* strNodeName, XnProductionNodeType type, 01003 XnCodecID compression); 01004 01011 XnStatus (XN_CALLBACK_TYPE* OnNodeRemoved) 01012 (void* pCookie, const XnChar* strNodeName); 01013 01022 XnStatus (XN_CALLBACK_TYPE* OnNodeIntPropChanged) 01023 (void* pCookie, const XnChar* strNodeName, 01024 const XnChar* strPropName, XnUInt64 nValue); 01025 01034 XnStatus (XN_CALLBACK_TYPE* OnNodeRealPropChanged) 01035 (void* pCookie, const XnChar* strNodeName, 01036 const XnChar* strPropName, XnDouble dValue); 01037 01046 XnStatus (XN_CALLBACK_TYPE* OnNodeStringPropChanged) 01047 (void* pCookie, const XnChar* strNodeName, 01048 const XnChar* strPropName, const XnChar* strValue); 01049 01059 XnStatus (XN_CALLBACK_TYPE* OnNodeGeneralPropChanged) 01060 (void* pCookie, const XnChar* strNodeName, 01061 const XnChar* strPropName, XnUInt32 nBufferSize, const void* pBuffer); 01062 01069 XnStatus (XN_CALLBACK_TYPE* OnNodeStateReady) 01070 (void* pCookie, const XnChar* strNodeName); 01071 01081 XnStatus (XN_CALLBACK_TYPE* OnNodeNewData) 01082 (void* pCookie, const XnChar* strNodeName, 01083 XnUInt64 nTimeStamp, XnUInt32 nFrame, const void* pData, XnUInt32 nSize); 01084 01085 } XnNodeNotifications; 01086 01088 typedef struct XnUInt32XYPair 01089 { 01090 XnUInt32 X; 01091 XnUInt32 Y; 01092 } XnUInt32XYPair; 01093 01095 typedef struct XnOutputMetaData 01096 { 01098 XnUInt64 nTimestamp; 01099 01101 XnUInt32 nFrameID; 01102 01104 XnUInt32 nDataSize; 01105 01107 XnBool bIsNew; 01108 01109 } XnOutputMetaData; 01110 01112 typedef struct XnMapMetaData 01113 { 01115 XnOutputMetaData* pOutput; 01116 01118 XnUInt32XYPair Res; 01119 01121 XnUInt32XYPair Offset; 01122 01124 XnUInt32XYPair FullRes; 01125 01127 XnPixelFormat PixelFormat; 01128 01130 XnUInt32 nFPS; 01131 } XnMapMetaData; 01132 01134 typedef struct XnDepthMetaData 01135 { 01137 XnMapMetaData* pMap; 01138 01140 const XnDepthPixel* pData; 01141 01143 XnDepthPixel nZRes; 01144 } XnDepthMetaData; 01145 01147 typedef struct XnImageMetaData 01148 { 01150 XnMapMetaData* pMap; 01151 01153 const XnUInt8* pData; 01154 } XnImageMetaData; 01155 01157 typedef struct XnIRMetaData 01158 { 01160 XnMapMetaData* pMap; 01161 01163 const XnIRPixel* pData; 01164 } XnIRMetaData; 01165 01166 typedef struct XnAudioMetaData 01167 { 01169 XnOutputMetaData* pOutput; 01170 01172 XnWaveOutputMode Wave; 01173 01175 const XnUInt8* pData; 01176 } XnAudioMetaData; 01177 01178 typedef struct XnSceneMetaData 01179 { 01181 XnMapMetaData* pMap; 01182 01184 const XnLabel* pData; 01185 } XnSceneMetaData; 01186 01187 #if XN_PLATFORM != XN_PLATFORM_ARC 01188 #pragma pack (pop) 01189 #endif 01190 01191 #endif //__XN_TYPES_H__