BillboardItem3DThe BillboardItem3D will always face toward the viewer. More... Inherits Item3D BillboardItem3D instantiates the C++ class BillboardItem3D This type was introduced in Qt 4.8. Detailed DescriptionSometimes it is desirable to have objects which always face toward the camera. For example, a quad with text on it may always face the camera so as to be readable at all times. While this can be achieved with a QGraphicsLookAtTransform on a normal Item3D, the BillboardItem3D class provides a more efficient "cheat" which takes advantage of the underlying 3D mathematics. To use a BillboardItem3D declare it exactly like a regular Item3D. When the item is drawn a QGraphicsBillboardTransform will be applied to the item after all other transforms have been performed. For example: Viewport {
BillboardItem3D {
mesh: Mesh { source: "model.obj" }
effect: Effect {
blending: true
texture: "texture.png"
}
}
}
For a practical illustration of its use see the forest example. |