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

BoundingVolume QML Type

can be used to override an entity's bounding volume.

This type was introduced in Qt 5.7.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

BoundingVolume QML Type

Detailed Description

An entity's bounding volume is used for many operations such as picking or view frustum culling. It is normally computed by traversing the rendered geometry.

BoundingVolume can be used when the extent of the geometry is known to the application so that Qt 3D does not have to compute it.

A bounding volume can be provided either as minimum and maximum extent coordinates, or a separate, usually simpler, geometry that approximates the rendered mesh.

When using minimum and maximum extents, these are considered to be the opposite corners of an axis aligned bounding box, in the geometry's local coordinate system.

BoundingVolume can also be used to query the computed bounding volume of a GeometryView. The implicitMinPoint and implicitMaxPoint properties will be updated if the geometry changes. Note that this is done asynchronously on a background thread so you should check the value of implicitPointsValid before reading them.

You can force the implicit extents to be updated by calling updateImplicitBounds. This will block on the calling thread until the results are available.

GeometryRenderer inherits BoundingVolume and thus supports reading implicit bounds or setting explicit bounds also.

Property Documentation

 

[read-only] implicitMaxPoint : vector3d

* * * Holds maximum extent of the bounding volume computed from the specified view.

[read-only] implicitMinPoint : vector3d

* * * Holds minimum extent of the bounding volume computed from the specified view.

[read-only] implicitPointsValid : bool

* * * True if a view has been assigned and the implicit extent properties are up to date. * *

See Also

maxPoint : vector3d

* * * User specified maximum extent of the bounding volume. When set (along with minimum * extent), this will be used internally to avoid computing the volume from the * geometry.

minPoint : vector3d

* * * User specified minimum extent of the bounding volume. When set (along with maximum * extent), this will be used internally to avoid computing the volume from the * geometry.

view : GeometryView

* * * Holds a pointer to the instance of QGeometryView which will be used, if set, * to compute the bounding volume.

Method Documentation

 

bool updateImplicitBounds()

* * * Updates the implicit bounds of the specified view. Returns * true if the computation succeeded and false otherwise. * *

The calculations are done in the call thread, this * could take significant time for large meshes.

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