Details
-
Task
-
Resolution: Out of scope
-
P1: Critical
-
None
-
None
Description
The "QGL" prefix overlaps heavily with QtOpenGL, and isn't always the best prefix anyway; e.g. there is nothing "GL" about "QGLCamera" - it is pure 3D math. This task is intended to collect up a potential list of renames for the Qt/3D classes, to be done in one hit prior to release.
The general principle is "just use Q" as the prefix, in line with other Qt modules. "QGL" is still in use for classes that are highly GL-specific, or where it is the most obvious prefix (e.g. "QGLWidgetSurface" is the most obvious name for a surface class for "QGLWidget"). Another possible prefix is "Q3D". As a transition strategy, for a small time after this change, header files with the old names will be provided to include the new files; e.g. "qglcamera.h" will #include "qcamera3d.h" and typedef "QGLCamera" to "QCamera3D".
Classes marked "preliminary" may be moved to a separate module and not included in the official class list for the first version of Qt/3D.
The classes in Qt/3D are a mixture of different types, each could have a different naming approach:
Type | Naming pattern | Example | Rationale |
---|---|---|---|
General purpose classes | QFoo | QArray | Like core Qt classes |
3D variants of existing classes | QFoo3D | QTransform3D | To avoid name conflict |
3D-specific classes | QFoo3D | QCube3D | Conforming to the above for ease of learning |
OpenGL-specific classes | QGLFoo | QGLAttributeValue | Like existing opengl classes |
Old name | New name |
---|---|
QArray | OK |
QBox3D | OK |
QColor4ub | OK |
QCustomDataArray | ?? |
QGeometryData | QGeometry? QGeometryBundle? |
QGLAbstractEffect | |
QGLAbstractScene | QAbstractScene3D |
QGLAbstractSurface | |
QGLAttributeDescription | |
QGLAttributeValue | |
QGLBezierPatches | QBezierPatches/QBezierPatchGeometry/QBezierPatchMesh |
QGLBuilder | QGeometryBuilder |
QGLCamera | QCamera3D |
QGLCameraAnimation | QCamera3DAnimation |
QGLColladaFxEffect | preliminary |
QGLColladaFxEffectFactory | preliminary |
QGLColladaFxEffectLoader | preliminary |
QGLCube | QCubeGeometry/QCubeMesh |
QGLCubeFace | Removed |
QGLCubeSphere | Removed |
QGLCylinder | QCylinderGeometry/QCylinderMesh |
QGLFramebufferObjectSurface | |
QGLGraphicsNavigationItem | preliminary |
QGLGraphicsViewportItem | preliminary |
QGLIcoSphere | Removed |
QGLIndexBuffer | |
QGLLightModel | QLightModel |
QGLLightParameters | QLight |
QGLMaskedSurface | |
QGLMaterial | QMaterial |
QGLMaterialCollection | QMaterialCollection |
QGLPainter | |
QGLPickNode | ?? |
QGLPixelBufferSurface | |
QGLRenderOrder | ?? |
QGLRenderOrderComparator | ?? |
QGLRenderSequencer | ?? |
QGLRenderState | ?? |
QGLSceneFormatHandler | QScene3DLoader |
QGLSceneFormatPlugin | QScene3DLoaderPlugin |
QGLSceneNode | QScene3DNode or QSceneNode (too generic?) |
QGLShaderProgramEffect | |
QGLSphere | QSphereGeometry/QSphereMesh, UV only |
QGLSubsurface | |
QGLTeapot | QTeapotGeometry/QTeapotMesh |
QGLTexture2D | |
QGLTextureCube | |
QGLVertexBundle | |
QGLView | |
QGLWidgetSurface | |
QGraphicsBillboardTransform | QBillboardTransform3D |
QGraphicsRotation3D | QRotationTransform3D |
QGraphicsScale3D | QScaleTransform3D |
QGraphicsTransform3D | QTransform3D |
QGraphicsTranslation3D | QTranslationTransform3D |
QMatrix4x4Stack | OK |
QMouse3DEvent | OK |
QMouse3DEventProvider | OK |
QOpenGLFunctions | Can't use QGLFunctions which is in 4.8 but not 4.7 |
QPlane3D | OK |
QRay3D | OK |
QSphere3D | OK |
QTriangle3D | OK |
QVector2DArray | OK |
QVector3DArray | OK |
QVector4DArray | OK |