在纵向标签组中有一个滚动条可以滑动。但在景观中如果所有标签的长度超过屏幕的宽度。 tabgroup正在更改为下拉列表
class mat3 {
std::array<vec3,3> val;
public:
using vtype = vec3::value_type;
mat3(const vtype v00, const vtype v01, const vtype v02,
const vtype v10, const vtype v11, const vtype v12,
const vtype v20, const vtype v21, const vtype v22) {
val[0][0] = v00; val[0][1] = v10; val[0][2] = v20;
val[1][0] = v01; val[1][1] = v11; val[1][2] = v21;
val[2][0] = v02; val[2][1] = v21; val[2][2] = v22;
}
mat3(const vtype m[3][3]) {
for(std::size_t i = 0; i < 3; ++i) {
for(std::size_t j = 0; j < 3; ++j) {
val[i][j] = m[j][i];
}
}
}
mat3(const vtype v)
: mat3(v, v, v,
v, v, v,
v, v, v) {}
mat3()
: mat3(0.0) {}
// how to make it `const`
mat3 operator+(const mat3& m) {
mat3 t;
for(std::size_t i = 0; i < 3; ++i) {
t[i] = val[i] + m[i];
}
return std::move(t);
}
vec3& operator[](const std::size_t index) {
switch(index) {
case 0:
return val[0];
case 1:
return val[1];
case 2:
return val[2];
default:
throw std::invalid_argument("mat3 supports upto 3(0-2) vec3");
}
}
};
如何停止更改