[Interest] Drawing Frustum on Scene3D
Mike Krus
mike.krus at kdab.com
Sat Mar 6 23:24:33 CET 2021
Hi
in Qt 3D you can use a QGeometryRenderer with primitiveType set to Lines (or LineLoop, LineStrip depending on how you structure your data). Checkout https://code.qt.io/cgit/qt/qt3d.git/tree/tests/manual/raycasting-qml/LineEntity.qml
Mike
> On 5 Mar 2021, at 14:16, Alex john <blackbriar153 at gmail.com> wrote:
>
> But in quick3D that would be done with a class derived from
> QQuick3DGeometry with primitives set to lines
> "setPrimitiveType(QQuick3DGeometry::PrimitiveType::Lines)"
> to construct a cube. Then register that class to qml and use it in
> your View3D. Hope it helps.
>
> Any alternative to QQuick3DGeometry as I'm using 5.10?
>
> On Fri, Mar 5, 2021 at 5:00 PM joao morgado <joaodeusmorgado at yahoo.com> wrote:
>>
>> Hi
>>
>> That frustum is just a group of lines in cube shape, you see it as a frustum because the camera is in perspective mode.
>> I never used Qt3D so cannot help with scene3d.
>> But in quick3D that would be done with a class derived from QQuick3DGeometry with primitives set to lines "setPrimitiveType(QQuick3DGeometry::PrimitiveType::Lines)"
>> to construct a cube. Then register that class to qml and use it in your View3D. Hope it helps.
>>
>> João
>> Em sexta-feira, 5 de março de 2021 09:46:15 GMT, Alex john <blackbriar153 at gmail.com> escreveu:
>>
>>
>> Hello Qt
>>
>> I like to render a frustum as here https://imgur.com/a/BzmCQ2D on
>> Scene3d. Can you let me know how it can be done? If I have to get the
>> custom QML ,do I have to get it from the C++ and then push it to the
>> QML context? Any pointers to basic code is appreciated.
>>
>> Thanks.
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> https://lists.qt-project.org/listinfo/interest
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
—
Mike Krus | mike.krus at kdab.com | Senior Software Engineer & Teamlead
KDAB (UK) Ltd., a KDAB Group company
Tel: UK Office +44 1625 809908 Mobile +44 7833 491941
KDAB - The Qt Experts, C++, OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4193 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210306/59fd5955/attachment.bin>
More information about the Interest
mailing list