void LightsListWidget::activated(){ QListWidgetItem *currentSelection = currentItem(); Light* currentLight = lightsMap[currentSelection]; switch (currentLightTypeSelection){ case AMBIENT: emit sendR((currentLight->ambientR)*100); emit sendG((currentLight->ambientG)*100); emit sendB((currentLight->ambientB)*100); break; case DIFFUSE: emit sendR((currentLight->diffuseR)*100); emit sendG((currentLight->diffuseG)*100); emit sendB((currentLight->diffuseB)*100); break; case SPECULAR: emit sendR((currentLight->specularR)*100); emit sendG((currentLight->specularG)*100); emit sendB((currentLight->specularB)*100); break; } //also display the current position emit sendX(currentLight->lightPositionX); emit sendY(currentLight->lightPositionY); emit sendZ(currentLight->lightPositionZ); //display the current shine }
void Compute::resetArrays() { int indexX = thisIndex.x; int indexY = thisIndex.y; int indexZ = thisIndex.z; float tmp; for(int i=indexZ*subBlockDimXz; i<(indexZ+1)*subBlockDimXz; i++) for(int j=0; j<blockDimY; j++) { tmp = (float)drand48(); while(tmp > MAX_LIMIT || tmp < (-1)*MAX_LIMIT) tmp = (float)drand48(); A[i*blockDimY + j] = tmp; } for(int j=indexX*subBlockDimYx; j<(indexX+1)*subBlockDimYx; j++) for(int k=0; k<blockDimZ; k++) { tmp = (float)drand48(); while(tmp > MAX_LIMIT || tmp < (-1)*MAX_LIMIT) tmp = (float)drand48(); B[j*blockDimZ + k] = tmp; } for(int i=0; i<blockDimX; i++) for(int k=0; k<blockDimZ; k++) { C[i*blockDimZ + k] = 0.0; #if USE_CKDIRECT tmpC[i*blockDimZ + k] = 0.0; #endif } sendA(); sendB(); }
void Compute::beginCopying() { sendA(); sendB(); }