我正在使用英特尔的 PCSDK,从一个示例中我无法从语法上理解其中抽象类的构造函数被覆盖的部分。具体来说,这一行:
GesturePipeline (void):UtilPipeline(),m_render(L"Gesture Viewer") {
EnableGesture();
}
UtilPipeline() 和 m_render 之间的逗号是什么意思?这是上下文的完整代码:
#include "util_pipeline.h"
#include "gesture_render.h"
#include "pxcgesture.h"
class GesturePipeline: public UtilPipeline {
public:
GesturePipeline (void):UtilPipeline(),m_render(L"Gesture Viewer") {
EnableGesture();
}
virtual void PXCAPI OnGesture(PXCGesture::Gesture *data) {
if (data->active) m_gdata = (*data);
}
virtual void PXCAPI OnAlert(PXCGesture::Alert *data) {
switch (data->label) {
case PXCGesture::Alert::LABEL_FOV_TOP:
wprintf_s(L"******** Alert: Hand touches the TOP boundary!\n");
break;
case PXCGesture::Alert::LABEL_FOV_BOTTOM:
wprintf_s(L"******** Alert: Hand touches the BOTTOM boundary!\n");
break;
case PXCGesture::Alert::LABEL_FOV_LEFT:
wprintf_s(L"******** Alert: Hand touches the LEFT boundary!\n");
break;
case PXCGesture::Alert::LABEL_FOV_RIGHT:
wprintf_s(L"******** Alert: Hand touches the RIGHT boundary!\n");
break;
}
}
virtual bool OnNewFrame(void) {
return m_render.RenderFrame(QueryImage(PXCImage::IMAGE_TYPE_DEPTH),
QueryGesture(), &m_gdata);
}
protected:
GestureRender m_render;
PXCGesture::Gesture m_gdata;
};