Widget* TileView::mousePressed( int x, int y, MouseButtons mb ) { x -= borderLeft(); y -= borderTop(); x = tileX( x ); y = tileY( y ); if ( ( x != -1 ) && ( y != -1) ) onTileClicked.emit( *this, x, y, mb ); return Widget::mousePressed( x, y, mb ); }
void CubeRender::render() { cuber::setBoxFaces(); cuber::setRenderRect((int *)&rect() ); cuber::setFrustum((float *)rayFrameVec()); #if 0 cuber::drawPyramid((uint *) colorBuffer(), (float *) nearDepthBuffer(), tileSize(), tileX(), tileY(), m_devicePyramidPlanes->bufferOnDevice(), m_devicePyramidBox->bufferOnDevice() ); #else cuber::drawVoxel((uint *) colorBuffer(), (float *) nearDepthBuffer(), tileSize(), tileX(), tileY(), m_deviceVoxels->bufferOnDevice() ); #endif CudaBase::CheckCudaError(" render image"); }