Home | History | Annotate | Download | only in functional

Lines Matching refs:cellSize

263 					RandomizedRenderGrid	(const IVec2& targetSize, const IVec2& cellSize, int maxCellCount, deUint32 seed);
272 static IVec2 getRandomOffset (deUint32 seed, IVec2 targetSize, IVec2 cellSize, IVec2 grid, int cellCount);
282 RandomizedRenderGrid::RandomizedRenderGrid (const IVec2& targetSize, const IVec2& cellSize, int maxCellCount, deUint32 seed)
284 , m_cellSize (cellSize)
285 , m_grid (targetSize / cellSize)
288 , m_cellCount (deMin32(maxCellCount, ((targetSize.y() % cellSize.y()) == 0) && m_grid.y() > 1 ? m_grid.x() * (m_grid.y() - 1) : m_grid.x() * m_grid.y()))
289 , m_baseRandomOffset (getRandomOffset(seed, targetSize, cellSize, m_grid, m_cellCount))
293 IVec2 RandomizedRenderGrid::getRandomOffset (deUint32 seed, IVec2 targetSize, IVec2 cellSize, IVec2 grid, int cellCount)
297 IVec2 extraSpace = targetSize - (cellSize * grid);
302 extraSpace.y() += (grid.y() - deDivRoundUp32(cellCount, grid.x())) * cellSize.y();
304 DE_ASSERT(targetSize.x() > cellSize.x() && targetSize.y() > cellSize.y());
307 DE_ASSERT(extraSpace.x() + grid.x() * cellSize.x() == targetSize.x());