[Interest] How to auto-indent all project files at once by a single operation

2021-05-29 Thread Megidd Git
Hi!

I want to apply auto-indentation to all my project files at once by a
single operation.

How to do it by Qt Creator?

Thanks!
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Software architecture style options

2021-03-31 Thread Megidd Git
Hi everyone,

Maybe someone can help:

https://softwareengineering.stackexchange.com/q/424966/176220

I just need some pointers to guide me in the right direction to explore
architecture style options.

Thanks,

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] invert parent Qt3D entity transform (doesn't work for scale3D)

2021-02-24 Thread Megidd Git
Hi!

I have the exact same problem mentioned here:

https://stackoverflow.com/q/60995155/3405291

Just wonder if there is any standard practice to resolve it.

Thanks

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Using undo stack for a command which is running asynchronously and is emitting signals

2020-12-28 Thread Megidd Git
Hi! ☺

Can anybody take a look at this question:

https://stackoverflow.com/q/65475435/3405291

Thanks!

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Rendering a cylinder with QDiffuseSpecularMaterial and QPhongMaterial

2020-12-11 Thread Megidd Git
Hi!

A cylinder 3D mesh has points only on its two ends:

[image: image.png]

I'm using QDiffuseSpecularMaterial and also QPhongMaterial to render the
cylinder. However, both materials are rendering like this:

[image: image.png]

[image: image.png]

[image: image.png]

The complete question is posted here:

https://stackoverflow.com/q/65211533/3405291

Can anybody give me a hint on what I might be missing?

Thanks!


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] QML figure with editable input fields for entering dimensions

2020-11-29 Thread Megidd Git
Hi!

Can anybody help with this question?

https://stackoverflow.com/q/65068666/3405291

Thanks
☺
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Multi-threading design along with an undo/redo stack

2020-11-23 Thread Megidd Git
Can anybody take a look at this question:

https://stackoverflow.com/q/64964751/3405291

Thanks
☺
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt3D point light intesity

2020-04-11 Thread Megidd Git
Cool, thanks! 

On Sat, Apr 11, 2020 at 9:00 PM Esch Lorenz TU Ilmenau <
lorenz.e...@tu-ilmenau.de> wrote:

> Hi,
>
>
>
> QPointLight inherits from QAbstractLight, which offers setIntensitiy().
> See https://doc.qt.io/qt-5/qt3drender-qabstractlight.html#intensity-prop.
> Hope this helps.
>
>
>
> Cheers,
>
>
>
> Lorenz
>
>
>
> *Von:* Interest  *Im Auftrag von *Megidd
> Git
> *Gesendet:* Samstag, 11. April 2020 11:30
> *An:* interest@qt-project.org
> *Betreff:* [Interest] Qt3D point light intesity
>
>
>
> Hi!
>
>
>
> I'm using point light <https://doc.qt.io/qt-5/qt3drender-qpointlight.html> in
> a 3D scene with entities of Phong
> <https://doc.qt.io/qt-5/qt3dextras-qmorphphongmaterial.html> material. I
> just want to be able to increase/decrease point light *intensity*. Point
> light has three properties:
>
>
>
> - constantAttenuation : float
>
> - linearAttenuation : float
>
> - quadraticAttenuation : float
>
>
>
> Documentation mentions that the exact meaning and use of those properties
> is up to the material implementation. Now I wonder how can I simply
> decrease/increase light intensity, considering that I'm using Phong
> <https://doc.qt.io/qt-5/qt3dextras-qmorphphongmaterial.html> material.
>
>
>
> Thanks
>
> 
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Qt3D point light intesity

2020-04-11 Thread Megidd Git
Hi!

I'm using point light  in
a 3D scene with entities of Phong
 material. I
just want to be able to increase/decrease point light *intensity*. Point
light has three properties:

- constantAttenuation : float
- linearAttenuation : float
- quadraticAttenuation : float

Documentation mentions that the exact meaning and use of those properties
is up to the material implementation. Now I wonder how can I simply
decrease/increase light intensity, considering that I'm using Phong
 material.

Thanks

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Add extra rotation to a quaternion

2020-04-05 Thread Megidd Git
Hi!

I have a QQuaternion  like:

QQuaternion(scalar:0.707107, vector:(0, 0, 0.707107))

I want to add this extra rotation to my quaternion:

Rotation around point QVector3D(34.5, -40, 7.16294) in XY plane by 180°

I don't know how to convert my extra rotation to quaternion and add it to
my previous quaternion. Can anybody help?

Thanks!
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] setVertexCount API of QGeometryRenderer

2020-03-30 Thread Megidd Git
Hi!

Can anyone take a look at this? It's an observation with Qt3D mesh API
which is not quite clear.

https://stackoverflow.com/q/60913389/3405291

Thanks,

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Component with path `*.qml` could not be created

2020-03-11 Thread Megidd Git
While using Qt Design Studio 1.4.0 community release, I receive such
warnings:

Component with path `*.qml` could not be created

The warning/error is shown when I use custom QML types which have their own
QML files. Looks like there have been similar issues
.
Does anybody know why?
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Accessing vertex data of primitive shapes (cuboid, sphere, …)

2020-03-09 Thread Megidd Git
You might want to do this:

   Qt3DRender::QGeometryRenderer *mesh = ...

   Qt3DRender::QGeometry *meshGeometry = mesh->geometry();

for (Qt3DRender::QAttribute *attribute : meshGeometry->attributes()) {

Qt3DRender::QBuffer *buf = attribute->buffer();

if (buf) {

if (buf->data().isEmpty())

buf->setData(buf->dataGenerator()->operator()());

buf->setSyncData(true);

buf->setAccessType(Qt3DRender::QBuffer::AccessType::ReadWrite);

}

}


On Mon, Mar 9, 2020 at 12:54 PM Federico Ferri 
wrote:

> I’m trying to access vertex data of QGeometry objects for computing the
> bounding box of the object.
> This works fine for QMesh, but for QCuboidMesh, QSphereMesh, etc… vertex
> data seems invalid.
> Is there some method to call to make vertex data actual?
>
> This is my code:
>
> QVector entityBoundingBox(Qt3DCore::QEntity *entity)
> {
> for(const auto  : 
> entity->componentsOfType())
> {
> auto geom = comp->geometry();
> if(geom)
> return geometryBoundingBox(geom);
> }
> return {};
> }
>
> QVector geometryBoundingBox(Qt3DRender::QGeometry *geom)
> {
> QVector ret;
> auto attrs = geom->attributes();
> for(const auto  : attrs)
> {
> if(attr->name() != "vertexPosition") continue;
> int n = attr->count();
> auto buf = attr->buffer();
> const QByteArray  = buf->data();
> float vmin[3], vmax[3];
> for(int i = 0; i < n; i++)
> {
> int vertexOffset = i * attr->byteStride();
> int offset = vertexOffset + attr->byteOffset();
> const char *rawData = &(data.constData()[offset]);
> auto value = reinterpret_cast(rawData);
> qDebug() << "geometryBoundingBox: scanning vertex" << value[0] << 
> value[1] << value[2];
> for(int j = 0; j < 3; j++)
> {
> vmin[j] = i ? qMin(vmin[j], value[j]) : value[j];
> vmax[j] = i ? qMax(vmax[j], value[j]) : value[j];
> }
> }
> ret.resize(6);
> ret[0] = vmin[0]; ret[1] = vmin[1]; ret[2] = vmin[2];
> ret[3] = vmax[0]; ret[4] = vmax[1]; ret[5] = vmax[2];
> return ret;
> }
> return ret;
> }
>
>
> when working on the cuboid or sphere meshes I see vertex data such as:
>
> geometryBoundingBox: scanning vertex 1.2992e-08 5.50632e+11 1.29257e+19
>
> geometryBoundingBox: scanning vertex 0 0 nan
>
> geometryBoundingBox: scanning vertex 9.40053e-33 1.4013e-45 9.40053e-33
>
> geometryBoundingBox: scanning vertex 0 0 nan
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Filter model items in tree view

2020-03-03 Thread Megidd Git
Hi

There is a problem with filtering my QAbstractItemModel-derived model with
QSortFilterProxyModel. The problem is described here:

https://stackoverflow.com/q/60507762/3405291

Can anybody give any hints?

Thanks!

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest