StellarDX / CSpaceEngine-QtCompatibility

Qt Compatibility for CSpaceEngine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Qt Compatibility for CSpaceEngine

A compatibility pack between CSpaceEngine and Qt

System requirements

  • CSpaceEngine
  • Qt 6.6.0 or higher version

Type compatibilities

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 TypeQt 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::CSEDateQDate
cse::epoch::CSETimeQTime
cse::CSEDateTimeQDateTime

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.

QDebug Output compatibilities

Some of CSE types can be output with qDebug().

About

Qt Compatibility for CSpaceEngine

License:GNU General Public License v2.0


Languages

Language:C++ 100.0%