void AbstractContent::setPerspective(const QPointF & angles) { if (angles != m_perspectiveAngles) { m_perspectiveAngles = angles; applyTransforms(); emit perspectiveChanged(); } }
gxCamera::gxCamera(): object3d(OBJECT3D_CAMERA_STRUCT) { setFOV(45.0f); setNear(10.0f); setFar(10000.0f); setType(PERSPECTIVE_PROJECTION); updateLocalPositionf(0, 0, 300); perspectiveChanged(); }
void SQEngine::setPuzzleId(const SQPuzzle::Id &puzzleId) { if (_puzzleEngine) { SQStack::instance()->setPerspectiveProvider(NULL); _puzzleEngine->deleteLater(); _puzzleEngine = NULL; } _puzzleEngine = new SQPuzzleEngine(SQPuzzle::load(puzzleId), this); connect(_puzzleEngine, SIGNAL(perspectedSwitchEnded()), SIGNAL(perspectiveChanged())); SQStack::instance()->setPerspectiveProvider(_puzzleEngine); _puzzleEngine->activate(); _puzzleEngine->updateModelView(); }
void SQEngine::initializeGL() { initializeGLFunctions(); qglClearColor(Qt::black); initShaders(); initTextures(); glEnable(GL_DEPTH_TEST); glEnable(GL_CULL_FACE); // glEnable(GL_BLEND); // glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // glDepthMask(false); SQStack::instance()->init(&_shaderProgram, _puzzleEngine); SQPrimitives::instance()->init(&_shaderProgram); emit perspectiveChanged(); // using QBasicTimer because its faster that QTimer _renderTimer.start(1000.0f / FRAMES_PER_SECOND, this); }
void gxCamera::setType(EPROJECTION_TYPE type) { m_eProjectionType=type; perspectiveChanged(); }
void gxCamera::setFar(float f) { m_fFar=f; perspectiveChanged(); }
void gxCamera::setNear(float n) { m_fNear=n; perspectiveChanged(); }
void gxCamera::setFOV(float fov) { m_FOV=fov; perspectiveChanged(); }