IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QExtrudedTextGeometry Class

The QExtrudedTextGeometry class allows creation of a 3D extruded text in 3D space.

This class was introduced in Qt 5.9.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QExtrudedTextGeometry Class

  • Header: Qt3DExtras/QExtrudedTextGeometry

  • Since: Qt 5.9

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS 3dextras)

    target_link_libraries(mytarget PRIVATE Qt6::3dextras)

  • qmake: QT += 3dextras

  • Inherited By:

  • Instantiated By: qml-qt3d-extras-extrudedtextgeometry.xml

  • Inherits: Qt3DCore::QGeometry

  • Group: QExtrudedTextGeometry is part of geometries

Detailed Description

The QExtrudedTextGeometry class is most commonly used internally by the QText3DMesh but can also be used in custom Qt3DRender::QGeometryRenderer subclasses.

The origin of the geometry is the rear left end of the text's baseline.

Property Documentation

 

extrusionLength : float

Holds the extrusion length of the text.

Access functions:

  • float extrusionLength() const

  • void setDepth(float extrusionLength)

Notifier signal:

  • void depthChanged(float extrusionLength)

font : QFont

Holds the font of the text.

The geometry is normalized by the font's pointSize, so a larger pointSize will result in smoother, rather than larger, text. pixelSize should not be used.

Access functions:

  • font() const

  • void setFont(const &font)

Notifier signal:

  • void fontChanged(const &font)

[read-only] indexAttribute : Qt3DCore::QAttribute* const

Holds the geometry index attribute.

Access functions:

  • *indexAttribute() const

[read-only] normalAttribute : Qt3DCore::QAttribute* const

Holds the geometry normal attribute.

Access functions:

  • *normalAttribute() const

[read-only] positionAttribute : Qt3DCore::QAttribute* const

Holds the geometry position attribute.

Access functions:

  • *positionAttribute() const

text : QString

Holds the text used for the mesh.

Access functions:

  • text() const

  • void setText(const &text)

Notifier signal:

  • void textChanged(const &text)

Member Function Documentation

 

[explicit] QExtrudedTextGeometry::QExtrudedTextGeometry(Qt3DCore::QNode *parent = nullptr)

Constructs a new QExtrudedTextGeometry with parent.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+