什么是 QPickTriangleEvent class 的 `uvw` 属性
What is `uvw` property of QPickTriangleEvent class
QPickTriangleEvent class 有一个 uvw 属性。它是什么? uvw
是三角形的法向量吗?
我记录 QPickTriangleEvent 属性:
Qt3DRender::QPickTriangleEvent *eventTri = static_cast<Qt3DRender::QPickTriangleEvent *>(event);
qDebug() << "Triangle Index: " << eventTri->triangleIndex();
qDebug() << "Triangle Vertex 1: " << eventTri->vertex1Index();
qDebug() << "Triangle Vertex 2: " << eventTri->vertex2Index();
qDebug() << "Triangle Vertex 3: " << eventTri->vertex3Index();
qDebug() << "Triangle UVW: " << eventTri->uvw();
输出:
Triangle Index: 79540
Triangle Vertex 1: 238620
Triangle Vertex 2: 238621
Triangle Vertex 3: 238622
Triangle UVW: QVector3D(0.0390438, 0.151772, 0.809184)
即使检查了输出,我也无法弄清楚 uvw
。是三角形的法向量吗?
我正在检查这些源代码以找出 uvw
是什么:
在源代码triangleboundingvolume.cpp中有注释:
// RealTime Collision Detection page 192
bool intersectsSegmentTriangle(const RayCasting::QRay3D &ray, ...
第 193 页,共 the book 条评论
... also returns the barycentric coordinates (u,v,w) of the intersection point s, ...
和第 194 页
... Segment intersects tri at distance t in position s (s = uA + vB + w*C) ...
QPickTriangleEvent class 有一个 uvw 属性。它是什么? uvw
是三角形的法向量吗?
我记录 QPickTriangleEvent 属性:
Qt3DRender::QPickTriangleEvent *eventTri = static_cast<Qt3DRender::QPickTriangleEvent *>(event);
qDebug() << "Triangle Index: " << eventTri->triangleIndex();
qDebug() << "Triangle Vertex 1: " << eventTri->vertex1Index();
qDebug() << "Triangle Vertex 2: " << eventTri->vertex2Index();
qDebug() << "Triangle Vertex 3: " << eventTri->vertex3Index();
qDebug() << "Triangle UVW: " << eventTri->uvw();
输出:
Triangle Index: 79540
Triangle Vertex 1: 238620
Triangle Vertex 2: 238621
Triangle Vertex 3: 238622
Triangle UVW: QVector3D(0.0390438, 0.151772, 0.809184)
即使检查了输出,我也无法弄清楚 uvw
。是三角形的法向量吗?
我正在检查这些源代码以找出 uvw
是什么:
在源代码triangleboundingvolume.cpp中有注释:
// RealTime Collision Detection page 192
bool intersectsSegmentTriangle(const RayCasting::QRay3D &ray, ...
第 193 页,共 the book 条评论
... also returns the barycentric coordinates (u,v,w) of the intersection point s, ...
和第 194 页
... Segment intersects tri at distance t in position s (s = uA + vB + w*C) ...