A compatibility pack between CSpaceEngine and Qt
- CSpaceEngine
- Qt 6.6.0 or higher version
Some types in CSE and Qt are almost same, so this module provides convert functions for each other.
Use "cse::ToQType" and "cse::ToCSEType" to convert them between CSE and Qt.
The following types are supported.
CSE Type | Qt Type |
---|---|
cse::gl::gl_vec2<float> | QVector2D |
cse::gl::gl_vec3<float> | QVector3D |
cse::gl::gl_vec4<float> | QVector4D |
cse::matrix<type, col, row> | QGenericMatrix<col, row, type> |
cse::epoch::CSEDate | QDate |
cse::epoch::CSETime | QTime |
cse::CSEDateTime | QDateTime |
Note: QVectorND uses 32-bit floating point to store values and only has this type.
So it convertion to CSE type is also using 32-bit floating point and not cse::vec2
Because cse::vecN uses 64-bit floating point. If you want to convert to cse::vecN,
use "cse::VConvert" to convert. Also, QVectorND can't get values directly, it uses
"x()" function instead. I think this feature is "chicken ribs", "pitiful to throw
them away, yet there is not much to eat."
It is recommanded to using Offsetseconds mode when converting Datetime, because Timezone data will possibly not be reserved when convertion.
Some of CSE types can be output with qDebug().