Adds a volume rendered object to a graph. 更多...
import 语句: | import QtDataVisualization 1.2 |
Since: | QtDataVisualization 1.2 |
实例化: | QCustom3DVolume |
继承: | Custom3DItem |
A volume rendered object is a box with a 3D texture. Three slice planes are supported for the volume, one along each main axis of the volume.
Rendering volume objects is very performance intensive, especially when the volume is largely transparent, as the contents of the volume are ray-traced. The performance scales nearly linearly with the amount of pixels that the volume occupies on the screen, so showing the volume in a smaller view or limiting the zoom level of the graph are easy ways to improve performance. Similarly, the volume texture dimensions have a large impact on performance. If the frame rate is more important than pixel-perfect rendering of the volume contents, consider turning the high definition shader off by setting the
useHighDefShader
特性到
false
.
注意: Filling in the volume data would not typically be efficient or practical from pure QML, so properties directly related to that are not fully supported from QML. Create a hybrid QML/C++ application if you want to use volume objects with a Qt Quick UI.
注意: Volumetric objects are only supported with orthographic projection.
注意: Volumetric objects utilize 3D textures, which are not supported in OpenGL ES2 environments.
另请参阅 AbstractGraph3D::orthoProjection and useHighDefShader .
alphaMultiplier : real |
The alpha value of every texel of the volume texture is multiplied with this value at the render time. This can be used to introduce uniform transparency to the volume. If
preserveOpacity
is
true
, only texels with at least some transparency to begin with are affected, and fully opaque texels are not affected. The value must not be negative. Defaults to
1.0
.
另请参阅 preserveOpacity .
drawSliceFrames : bool |
If this property value is
true
, the frames of slices indicated by slice index properties will be drawn around the volume. If it is
false
, no slice frames will be drawn. Drawing slice frames is independent of drawing slices, so you can show the full volume and still draw the slice frames around it. Defaults to
false
.
另请参阅 sliceIndexX , sliceIndexY , sliceIndexZ ,和 drawSlices .
drawSlices : bool |
If this property value is
true
, the slices indicated by slice index properties will be drawn instead of the full volume. If it is
false
, the full volume will always be drawn. Defaults to
false
.
注意: The slices are always drawn along the item axes, so if the item is rotated, the slices are rotated as well.
另请参阅 sliceIndexX , sliceIndexY ,和 sliceIndexZ .
preserveOpacity : bool |
If this property value is
true
,
alphaMultiplier
is only applied to texels that already have some transparency. If it is
false
, the multiplier is applied to the alpha value of all texels. Defaults to
true
.
另请参阅 alphaMultiplier .
sliceFrameColor : color |
The color of the slice frame. Transparent slice frame color is not supported.
Defaults to black.
另请参阅 drawSliceFrames .
sliceFrameGaps : vector3d |
The size of the air gap left between the volume itself and the frame in each dimension. The gap can be different on different dimensions. The values are fractions of the volume thickness in the same dimension. The values cannot be negative.
默认为
vector3d(0.01, 0.01, 0.01)
.
另请参阅 drawSliceFrames .
sliceFrameThicknesses : vector3d |
The thickness of the slice frames for each dimension. The values are fractions of the volume thickness in the same dimension. The values cannot be negative.
默认为
vector3d(0.01, 0.01, 0.01)
.
另请参阅 drawSliceFrames .
sliceFrameWidths : vector3d |
The widths of the slice frame. The width can be different on different dimensions, so you can for example omit drawing the frames on certain sides of the volume by setting the value for that dimension to zero. The values are fractions of the volume thickness in the same dimension. The values cannot be negative.
默认为
vector3d(0.01, 0.01, 0.01)
.
另请参阅 drawSliceFrames .
sliceIndexX : int |
The x-dimension index into the texture data indicating which vertical slice to show. Setting any dimension to negative indicates no slice or slice frame for that dimension is drawn. If all dimensions are negative, no slices or slice frames are drawn and the volume is drawn normally. Defaults to
-1
.
另请参阅 QCustom3DVolume::textureData , drawSlices ,和 drawSliceFrames .
sliceIndexY : int |
The y-dimension index into the texture data indicating which horizontal slice to show. Setting any dimension to negative indicates no slice or slice frame for that dimension is drawn. If all dimensions are negative, no slices or slice frames are drawn and the volume is drawn normally. Defaults to
-1
.
另请参阅 QCustom3DVolume::textureData , drawSlices ,和 drawSliceFrames .
sliceIndexZ : int |
The z-dimension index into the texture data indicating which vertical slice to show. Setting any dimension to negative indicates no slice or slice frame for that dimension is drawn. If all dimensions are negative, no slices or slice frames are drawn and the volume is drawn normally. Defaults to
-1
.
另请参阅 QCustom3DVolume::textureData , drawSlices ,和 drawSliceFrames .
textureDepth : int |
The depth of the 3D texture defining the volume content in pixels. Defaults to
0
.
注意: Changing this property from QML is not supported, as the texture data cannot be resized accordingly.
textureHeight : int |
The height of the 3D texture defining the volume content in pixels. Defaults to
0
.
注意: Changing this property from QML is not supported, as the texture data cannot be resized accordingly.
textureWidth : int |
The width of the 3D texture defining the volume content in pixels. Defaults to
0
.
注意: Changing this property from QML is not supported, as the texture data cannot be resized accordingly.
useHighDefShader : bool |
If this property value is
true
, a high definition shader is used to render the volume. If it is
false
, a low definition shader is used.
The high definition shader guarantees that every visible texel of the volume texture is sampled when the volume is rendered. The low definition shader renders only a rough approximation of the volume contents, but at a much higher frame rate. The low definition shader does not guarantee every texel of the volume texture is sampled, so there may be flickering if the volume contains distinct thin features.
注意: This value does not affect the level of detail when rendering the slices of the volume.
默认为
true
.