#include <Wrapper.h>
Inherits CudaRenderer.
Public Member Functions | |
CudaRenderGrid (unsigned width, unsigned height, UniformGrid *grid, int pbo=-1) | |
Prepare uniform grid for rendering. | |
float | render (Camera &camera, SceneLights &lights, RenderMode mode) |
Raycast the image. | |
Private Attributes | |
float | cellSize |
Size of the one cell. | |
uint3 | dim |
Number of cells in each dimension. | |
UniformGrid * | grid |
Pointer to the acceleration structure. | |
cudaArray * | cudaGrid |
uint4 * | triangles |
cudaArray * | vertices |
cudaArray * | normals |
Material * | materials |
CudaRenderGrid::CudaRenderGrid | ( | unsigned | width, | |
unsigned | height, | |||
UniformGrid * | grid, | |||
int | pbo = -1 | |||
) |
Prepare uniform grid for rendering.
width | Initial width of the image. | |
height | Initial height of the image. | |
grid | The uniform grid used for rendering. The wrapper assumes ownership of the structure and deletes it during destruction. |
float CudaRenderGrid::render | ( | Camera & | camera, | |
SceneLights & | lights, | |||
RenderMode | mode | |||
) | [virtual] |
Raycast the image.
camera | The camera used to render the image. | |
lights | The light in the scene. | |
mode | The render mode(primary rays only,primary+shadow,primary+shadow+reflect). |
Implements CudaRenderer.