Nuitrack  1.6.0
3D Skeleton Tracking Middleware
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events Groups Pages
DepthFrame.h
1 #ifndef NUITRACK_DEPTHFRAME_H_
2 #define NUITRACK_DEPTHFRAME_H_
3 
4 #include "nuitrack/types/Frame.h"
5 #include "nuitrack/capi/DepthSensor_CAPI.h"
6 
7 namespace tdv
8 {
9 namespace nuitrack
10 {
15 class DepthFrame : public Frame<DepthFrame, uint16_t>
16 {
17 public:
19  DepthFrame(DepthSensorData* pimpl)
20  {
21  _pimpl = pimpl;
22  nuitrack_AddDepthSensorDataRef(pimpl);
23  }
24 
25  virtual ~DepthFrame()
26  {
27  nuitrack_DestroyDepthSensorData(_pimpl);
28  }
29 
33  int getRows() const
34  {
35  return nuitrack_GetDepthFrameRows(_pimpl);
36  }
37 
41  int getCols() const
42  {
43  return nuitrack_GetDepthFrameCols(_pimpl);
44  }
45 
49  uint64_t getID() const
50  {
51  return nuitrack_GetDepthFrameID(_pimpl);
52  }
53 
57  const DataType* getData() const
58  {
59  return nuitrack_GetDepthFrameData(_pimpl);
60  }
61 
66  uint64_t getTimestamp() const
67  {
68  return nuitrack_GetDepthFrameTimestamp(_pimpl);
69  }
70 
71 private:
72  DepthSensorData* _pimpl;
73 };
74 
75 } /* namespace nuitrack */
76 } /* namespace tdv */
77 
78 #endif /* NUITRACK_DEPTHFRAME_H_ */
int getRows() const
Returns the number of rows in the depth frame.
Definition: DepthFrame.h:33
const DataType * getData() const
Returns the frame data.
Definition: DepthFrame.h:57
Represents a generalized frame.
Definition: Frame.h:15
Stores a frame depth map.
Definition: DepthFrame.h:15
uint64_t getTimestamp() const
Returns timestamp corresponding to the last received depth frame in microseconds. ...
Definition: DepthFrame.h:66
int getCols() const
Returns the number of columns in the depth frame.
Definition: DepthFrame.h:41
DepthFrame(DepthSensorData *pimpl)
Definition: DepthFrame.h:19
uint64_t getID() const
Returns the depth frame ID.
Definition: DepthFrame.h:49