예제 #1
0
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 );
}
예제 #2
0
파일: CubeRender.cpp 프로젝트: spinos/aphid
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");
}