Nuitrack  1.11.2
3D Skeleton Tracking Middleware
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events Groups Pages
RGBFrame.h
1 #ifndef NUITRACK_RGBFRAME_H_
2 #define NUITRACK_RGBFRAME_H_
3 
4 #include "nuitrack/types/Color3.h"
5 #include "nuitrack/types/Frame.h"
6 #include "nuitrack/capi/ColorSensor_CAPI.h"
7 
8 namespace tdv
9 {
10 namespace nuitrack
11 {
16 class RGBFrame : public Frame<RGBFrame, Color3>
17 {
18 public:
20  RGBFrame(ColorSensorData* pimpl)
21  {
22  _pimpl = pimpl;
23  nuitrack_AddColorSensorDataRef(pimpl);
24  }
25 
26  virtual ~RGBFrame()
27  {
28  nuitrack_DestroyColorSensorData(_pimpl);
29  }
30 
34  int getRows() const
35  {
36  return nuitrack_GetColorFrameRows(_pimpl);
37  }
38 
42  int getCols() const
43  {
44  return nuitrack_GetColorFrameCols(_pimpl);
45  }
46 
50  uint64_t getID() const
51  {
52  return nuitrack_GetColorFrameID(_pimpl);
53  }
54 
58  const DataType* getData() const
59  {
60  return nuitrack_GetColorFrameData(_pimpl);
61  }
62 
67  uint64_t getTimestamp() const
68  {
69  return nuitrack_GetColorFrameTimestamp(_pimpl);
70  }
71 
72 private:
73  ColorSensorData* _pimpl;
74 };
75 
76 } /* namespace nuitrack */
77 } /* namespace tdv */
78 
79 #endif /* NUITRACK_RGBFRAME_H_ */
int getRows() const
Returns the number of rows in the RGB frame.
Definition: RGBFrame.h:34
uint64_t getTimestamp() const
Returns timestamp corresponding to the last received RGB frame in microseconds.
Definition: RGBFrame.h:67
Represents a generalized frame.
Definition: Frame.h:15
int getCols() const
Returns the number of columns in the RGB frame.
Definition: RGBFrame.h:42
Stores a frame color map.
Definition: RGBFrame.h:16
Definition: Color3.h:11
const DataType * getData() const
Returns the frame data.
Definition: RGBFrame.h:58
uint64_t getID() const
Returns the RGB frame ID.
Definition: RGBFrame.h:50
RGBFrame(ColorSensorData *pimpl)
Definition: RGBFrame.h:20