[:en]Collision Detection Between a Circle and a Line Segment[:]

[:en]Collision between Segment AB and circle C (radius r).  Let’s remember a little of vector algebra and pythagorean theorem. The height of the right-angle triangle ACD is what we need to compare with radius. [latex] \vec{AD} \text{ is the projection Continua a leggere [:en]Collision Detection Between a Circle and a Line Segment[:]

PowerShell script to deploy Qt Standalone Windows App

Use this script with QtCreator (Option, External Tools): Executable: powershell Arguments: deployWindowsApp.ps1 %{CurrentProject:Name} %{CurrentProject:NativePath} %{CurrentProject:BuildPath} %{CurrentProject:QT_INSTALL_BINS} c:\Developer\Deploy

ThreeJS Line Demo on QML Canvas3D

It is a simple porting of ThreeJS lines demo. ThreeJS is a Javascript library for manipulating WebGL inside web browsers. It takes a little effort converting web code to Qml Canvas3D. Open QtCreator, create new project and select “Qt Canvas Continua a leggere ThreeJS Line Demo on QML Canvas3D

Utilizzare gli header precompilati con le Qt (PCH)

Oltre a richiedere a MAKE l’esecuzione parrallela dei Jobs si potrebbe anche pensare, al fine di ridurre i tempi del ciclo di sviluppo, di utilizzare i preziosi header precompilati. Prima di tutto impostiamo qmake per utilizzare gli header precompilati inserendo Continua a leggere Utilizzare gli header precompilati con le Qt (PCH)

“Error: GL/gl.h: No such file or directory” compilando esempi Qt

se non compila gli esempi OpenGL delle Qt prova ad installare: $ sudo apt-get install mesa-common-dev freeglut3 freeglut3-dev …. dovrebbero bastare altrimenti: $ sudo apt-get install glut3 glut3-dev libglut3 libglut3-dev piattaforma: Ubuntu 12.04 x64 ITA

Qt samples error: ‘gluPerspective’ was not declared in this scope

error: ‘gluPerspective’ was not declared in this scope compilando l’esempio QT 4.8 la funzione è obsoleta nelle GLUT la si può rimpiazzare con: void gluPerspective(double fovy,double aspect, double zNear, double zFar) {  // Start in projection mode.  glMatrixMode(GL_PROJECTION);  glLoadIdentity();  double Continua a leggere Qt samples error: ‘gluPerspective’ was not declared in this scope