disk intersection shape, crash bugfix

metadata
Wenzel Jakob 2011-09-14 14:28:26 -04:00
parent 31fc314882
commit 38b0f38a1d
4 changed files with 5 additions and 4 deletions

View File

@ -102,8 +102,7 @@ void LogWidget::show() {
} else {
/* Center the dialog */
QDesktopWidget *desktop = QApplication::desktop();
QRect geo = desktop->screenGeometry(
static_cast<QWidget *>(parent())->geometry().center());
QRect geo = desktop->screenGeometry();
QPoint windowPos(
geo.left() + (geo.width() - width()) / 2,
geo.top() + (geo.height() - height())/2

View File

@ -214,8 +214,7 @@ void ServerWidget::show() {
} else {
/* Center the dialog */
QDesktopWidget *desktop = QApplication::desktop();
QRect geo = desktop->screenGeometry(
static_cast<QWidget *>(parent())->geometry().center());
QRect geo = desktop->screenGeometry();
QPoint windowPos(
geo.left() + (geo.width() - width()) / 2,
geo.top() + (geo.height() - height())/2

View File

@ -5,6 +5,7 @@ plugins += env.SharedLibrary('ply', ['ply/ply.cpp', 'ply/ply_parser.cpp'],
CPPPATH = env['CPPPATH'] + ['ply'])
plugins += env.SharedLibrary('serialized', ['serialized.cpp'])
plugins += env.SharedLibrary('rectangle', ['rectangle.cpp'])
plugins += env.SharedLibrary('disk', ['disk.cpp'])
plugins += env.SharedLibrary('sphere', ['sphere.cpp'])
plugins += env.SharedLibrary('cylinder', ['cylinder.cpp'])
plugins += env.SharedLibrary('hair', ['hair.cpp'])

View File

@ -94,6 +94,8 @@ public:
}
void configure() {
Shape::configure();
m_dpdu = m_objectToWorld(Vector(1, 0, 0));
m_dpdv = m_objectToWorld(Vector(0, 1, 0));
Normal normal = normalize(m_objectToWorld(Normal(0, 0, 1)));