[: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)

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

Compilazione parallela (parametro job di make)

Ma se volessi sfruttare più core per la compilazione? “make -j4″ dove ‘4’ rappresenta il numero di lavori  (job) lanciati contemporaneamente; lavori in quanto si parla non solo di compilazione ma anche linking. Nel caso di un Intel Core I7 Continua a leggere Compilazione parallela (parametro job di make)