Custom3DItem QML Type

The Custom3DItem type is for creating custom items to be added to a graph. More...

Import Statement: import QtDataVisualization 1.2
Since: QtDataVisualization 1.1
Instantiates: QCustom3DItem
Inherited By:

Custom3DLabel and Custom3DVolume



Detailed Description

This type is for creating custom items to be added to a graph. The item has a custom mesh, position, scaling, rotation, and an optional texture.

Property Documentation

meshFile : string

Holds item mesh file name. Item in the file must be in Wavefront obj format and include vertices, normals, and UVs. It also needs to be in triangles.

position : vector3d

Holds the item position as a vector3d. Defaults to vector3d(0.0, 0.0, 0.0).

Item position is either in data coordinates or in absolute coordinates, depending on the positionAbsolute property. When using absolute coordinates, values between -1.0...1.0 are within axis ranges.

Note: Items positioned outside any axis range are not rendered if positionAbsolute is false, unless the item is a Custom3DVolume that would be partially visible and scalingAbsolute is also false. In that case, the visible portion of the volume will be rendered.

See also positionAbsolute and scalingAbsolute.

positionAbsolute : bool

This property dictates if item position is to be handled in data coordinates or in absolute coordinates. Defaults to false. Items with absolute coordinates will always be rendered, whereas items with data coordinates are only rendered if they are within axis ranges.

See also position.

rotation : quaternion

Holds the item rotation as a quaternion. Defaults to quaternion(0.0, 0.0, 0.0, 0.0).

scaling : vector3d

Holds the item scaling as a vector3d. Defaults to vector3d(0.1, 0.1, 0.1).

Item scaling is either in data values or in absolute values, depending on the scalingAbsolute property. The default vector interpreted as absolute values sets the item to 10% of the height of the graph, provided the item mesh is normalized and the graph aspect ratios haven't been changed from the defaults.

See also scalingAbsolute.

scalingAbsolute : bool

This property dictates if item scaling is to be handled in data values or in absolute values. Defaults to true. Items with absolute scaling will be rendered at the same size, regardless of axis ranges. Items with data scaling will change their apparent size according to the axis ranges. If positionAbsolute value is true, this property is ignored and scaling is interpreted as an absolute value. If the item has rotation, the data scaling is calculated on the unrotated item. Similarly, for Custom3DVolume items, the range clipping is calculated on the unrotated item.

Note: : Only absolute scaling is supported for Custom3DLabel items or for custom items used in polar graphs.

Note: : The custom item's mesh must be normalized to range [-1 ,1], or the data scaling will not be accurate.

This QML property was introduced in QtDataVisualization 1.2.

See also scaling and positionAbsolute.

shadowCasting : bool

Sets shadow casting for the item to enabled. Defaults to true. If set false, the item does not cast shadows regardless of ShadowQuality.

textureFile : string

Holds the texture file name for the item. If left unset, a solid gray texture will be used.

Note: To conserve memory the QImage loaded from the file is cleared after a texture is created.

visible : bool

Sets the item visible. Defaults to true.

Method Documentation

void setRotationAxisAndAngle(vector3d axis, real angle)

A convenience function to construct rotation quaternion from axis and angle.

See also rotation.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.