git-svn-id: svn://db.shs.com.ru/libs@319 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2017-11-17 11:54:18 +00:00
parent e03e8e24c0
commit cdba136c66
9 changed files with 76 additions and 15 deletions

View File

@@ -138,6 +138,16 @@ void GLObjectBase::addChildren(QList<GLObjectBase * > & list, GLObjectBase * whe
void GLObjectBase::calculateBoundingBox() {
bound = vbo.boundingBox();
QVector<QVector3D> c = bound.corners(), tc;
//QMatrix4x4 mat = itransform_.inverted();
//qDebug() << itransform_ << mat_ << mat;
foreach (QVector3D p, c)
tc << (itransform_ * QVector4D(p, 1)).toVector3D();
bound = Box3D(tc);
foreach (GLObjectBase * i, children_) {
i->calculateBoundingBox();
bound |= i->boundingBox();
}
}