int QGraphicsScale::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QGraphicsTransform::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 5)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 5;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< QVector3D*>(_v) = origin(); break;
        case 1: *reinterpret_cast< qreal*>(_v) = xScale(); break;
        case 2: *reinterpret_cast< qreal*>(_v) = yScale(); break;
        case 3: *reinterpret_cast< qreal*>(_v) = zScale(); break;
        }
        _id -= 4;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setOrigin(*reinterpret_cast< QVector3D*>(_v)); break;
        case 1: setXScale(*reinterpret_cast< qreal*>(_v)); break;
        case 2: setYScale(*reinterpret_cast< qreal*>(_v)); break;
        case 3: setZScale(*reinterpret_cast< qreal*>(_v)); break;
        }
        _id -= 4;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 4;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 4;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 4;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 4;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 4;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 4;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
Example #2
0
void Camera::prepareCamera()
{
	gluLookAt(x1, y1, z1, x2, y2, z2, 0, 0, u);
	glScalef(1.0, 1.0, GLfloat(m_zScale));
	
	GLfloat position[] = { 0, 0, 5000, 1.0 };
	glPushMatrix ();
		glRotated ((GLdouble) spin, 1.0, 0.0, 0.0);	
		glTranslated (x(), y(), z()/zScale());
		glLightfv (GL_LIGHT0, GL_POSITION, position);
/*		GLfloat x = position[0];
		GLfloat y = position[1];
		GLfloat z = position[2];
		glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
		glBegin(GL_QUADS);
		glColor3f(0.2f, 0.8f, 1.f);
		glVertex3f(x, y, z);
		glVertex3f(x+10000, y, z);
		glVertex3f(x+10000, y+10000, z+10000);
		glVertex3f(x, y+1000, z+1000);
		glEnd();*/
	glPopMatrix();
}