git-svn-id: svn://db.shs.com.ru/libs@319 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user