git-svn-id: svn://db.shs.com.ru/libs@69 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -104,6 +104,22 @@ void GLObjectBase::setView(QGLView * v) {
|
||||
}
|
||||
|
||||
|
||||
void GLObjectBase::clearChildren(bool deleteAll) {
|
||||
foreach (GLObjectBase * i, children_) {
|
||||
i->setView(0);
|
||||
i->parent_ = 0;
|
||||
if (deleteAll) {
|
||||
i->clearChildren(true);
|
||||
delete i;
|
||||
} else {
|
||||
i->buildTransform();
|
||||
}
|
||||
}
|
||||
children_.clear();
|
||||
if (view_) view_->collectLights();
|
||||
}
|
||||
|
||||
|
||||
QList<GLObjectBase * > GLObjectBase::children(bool all_) {
|
||||
if (!all_) return children_;
|
||||
QList<GLObjectBase * > cl;
|
||||
@@ -187,7 +203,7 @@ void GLObjectBase::localTransform(QMatrix4x4 & m) {
|
||||
|
||||
|
||||
void GLObjectBase::checkPass() {
|
||||
if (material_.reflectivity > 0.f || material_.color_diffuse.alphaF() * (1.f - material_.transparency) < 1.f) pass_ = Transparent;
|
||||
if (material_.color_diffuse.alphaF() * (1.f - material_.transparency) < 1.f) pass_ = Transparent;
|
||||
else pass_ = Solid;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user