QGLTeapot ClassThe QGLTeapot class represents a 3D teapot object. More... #include <QGLTeapot> Inherits: QGLBezierPatches. This class was introduced in Qt 4.8. Public Functions
Detailed DescriptionThe QGLTeapot class represents a 3D teapot object. The classic 3D "Utah Teapot" was originally drawn by Martin Newell in 1975. The vertex data was made publicly available by him and it has been a standard 3D test object ever since. For more information on the history of the "Utah Teapot", see Wikipedia, http://en.wikipedia.org/wiki/Utah_teapot. The following example code uses QGLTeapot to draw a teapot of size 0.5 at the origin: QGLBuilder builder; builder << QGLTeapot(); teapot = builder.finalizedSceneNode(); painter.modelViewMatrix().scale(0.5f); teapot->draw(painter); The QGLTeapot object contains a lot of vertex data once it has been subdivided into triangles. It is recommended that instances of this class be created at startup, added to a QGLBuilder, and then the finalized scene node can be reused over and over. See also QGLBezierPatches. |