QGLDome ClassThe QGLDome class represents the geometry of a simple hemisphere in 3D space. More... #include <QGLDome> This class was introduced in Qt 4.8. Public Functions
Detailed DescriptionThe QGLDome class represents the geometry of a simple hemisphere in 3D space. The following example creates a dome of 2 units in diameter and draws it at (10, 25, 0) in a QGLPainter: QGLBuilder builder; builder << QGLDome(2); QGLSceneNode *node = builder.finalizedSceneNode(); painter.translate(10, 25, 0); node->draw(&painter); The QGLDome class specifies positions, normals and 2D texture co-ordinates for all of the vertices that make up the sphere. The texture co-ordinates are fixed at construction time. This is because constructing the sphere can involve generating additional vertices which need to interpolate the texture co-ordinates of their neighboring vertices. The default mode of QGLDome is half of a "UV sphere", which divides the object up into longitudinal and latitudinal sections. The longitudinal slices meet at the pole, which in a single unit dome is defined to be at (0, 0, +0.5) and (0, 0, -0.5). This choice is the simplest to texture map as the texture will only distort along the x-axis of the 2D texture. However the density of vertices is significantly higher at the poles than it is elsewhere on the sphere and is a poor choice if a uniform density of pixels from the texture map is required. See also QGLBuilder. Member Function Documentation
|