[Interest] Qt3D simple geometry example
Sean Harmer
sean.harmer at kdab.com
Tue Apr 4 11:19:18 CEST 2017
Hi,
On Tuesday 04 April 2017 11:55:18 Igor Mironchik wrote:
> Hi,
>
> Thank you.
>
> In QPlainGeometry I found that they use position, texture coordinate,
> normal and tangent to describe vertex data.
>
> So my question is - why they need tangent, and why tangent defined with
> 4 floats?
>
> //tangent
>
> *fptr++=1.0f;
>
> *fptr++=0.0f;
>
> *fptr++=0.0f;
>
> *fptr++=1.0f;
It depends what you want to do with the geometry in your shaders. The tangent
is usually needed as part of normal mapping. If your shaders don't do that,
then you may not need the tangent vectors. It's up to you to decide what
vertex attributes you need to cater for what you want to do in your shaders.
Cheers,
Sean
>
> 04.04.2017 11:05, Oleg Evseev пишет:
> > Hi, Igor
> >
> > Take a look on this examples in qt3d/tests/manual folder:
> >
> > custom-mesh-cpp
> > custom-mesh-qml
> > custom-mesh-update-data-cpp
> > custom-mesh-update-data-qml
> >
> > I think they are exactly what you need.
> >
> > With regards, Oleg.
> >
> > 2017-04-04 11:01 GMT+03:00 Igor Mironchik <igor.mironchik at gmail.com
> >
> > <mailto:igor.mironchik at gmail.com>>:
> > Hello,
> >
> > Did anybody see any very simple example of Qt3D geometry creation.
> > Let it be a simple plain ellipse. Can anybody explain in a few
> > words what should be done to generate such geometry in 3D.
> >
> > Thank you.
> >
> > _______________________________________________
> > Interest mailing list
> > Interest at qt-project.org <mailto:Interest at qt-project.org>
> > http://lists.qt-project.org/mailman/listinfo/interest
> > <http://lists.qt-project.org/mailman/listinfo/interest>
--
Dr Sean Harmer | sean.harmer at kdab.com | Managing Director UK
KDAB (UK) Ltd, a KDAB Group company
Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
Mobile: +44 (0)7545 140604
KDAB - Qt Experts
More information about the Interest
mailing list