開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
VC++
https://github.com/OSVR/OSVR-Core/blob/master/plugins/videoimufusion/VideoIMUFusion.cpp
上面網址的156 行
StartupData()
: last(getNow()), positionFilter(filters::one_euro::Params{}),
orientationFilter(filters::one_euro::Params{}) {}
上面是 class constructor initializer list
不懂 positionFilter(filters::one_euro::Params{}) 為什麼可以 assign, 它們之間沒有class 不同class 也沒有繼承關係
filters::one_euro::Params{} 是什麼特殊語法嗎?
Params 型態定義如下
struct Params {
Params() : minCutoff(1), beta(0), derivativeCutoff(1) {}
Params(double minCut, double b, double dCut = 1)
: minCutoff(minCut), beta(b), derivativeCutoff(dCut) {}
double minCutoff;
double beta;
double derivativeCutoff;
};
filters::OneEuroFilter<Eigen::Vector3d> positionFilter;
positionFilter 型態如下 , 因為程式碼有點長, 我貼網址在178行
https://github.com/OSVR/OSVR-Core/blob/master/inc/osvr/Util/EigenFilters.h
謝謝