191 mutable Buffer m_IDToSlot;
192 mutable Buffer m_slotToID;
194 bool m_needClosestHit;
S32 getSize() const
Gets size of the buffer (number of rays).
RayBuffer(S32 n=0, bool closestHit=true)
Constructor.
void setResult(S32 slot, const RayResult &r)
Assigns ray result to a slot.
S32 getIDForSlot(S32 slot) const
Gets an id for a given ray slot.
Buffer & getIDToSlotBuffer()
Gets buffer mapping ids to slots.
S32 getSlotForID(S32 id) const
Gets a ray slot for a given id.
RayResult & getMutableResultForID(S32 id)
Gets a mutable ray result with a given id.
const Ray & getRayForSlot(S32 slot) const
Gets a ray assigned to a given slot.
const U8 * getPtr(S64 ofs=0)
Buffer & getRayBuffer()
Gets ray buffer.
bool getNeedClosestHit() const
Returns whether the closest hit is needed.
Buffer & getSlotToIDBuffer()
Gets buffer slots to ids.
Buffer & getResultBuffer()
Gets ray result buffer.
Ray buffer class. Stores rays.
U8 * getMutablePtr(S64 ofs=0)
void randomSort(U32 randomSeed=0)
Shuffles rays in the buffer.
const Ray & getRayForID(S32 id) const
Gets a ray with a given id.
const RayResult & getResultForID(S32 id) const
Gets a ray result with a given id.
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction int int grid_height CUevent unsigned int Flags CUevent hEvent CUevent hEvent CUstream unsigned int Flags CUstream hStream GLuint bufferobj unsigned int CUdevice dev CUdeviceptr unsigned int CUmodule const char name CUdeviceptr unsigned int bytesize CUdeviceptr dptr void unsigned int bytesize void CUdeviceptr unsigned int ByteCount CUarray unsigned int CUdeviceptr unsigned int ByteCount CUarray unsigned int const void unsigned int ByteCount CUarray unsigned int CUarray unsigned int unsigned int ByteCount void CUarray unsigned int unsigned int CUstream hStream const CUDA_MEMCPY2D pCopy CUdeviceptr const void unsigned int CUstream hStream const CUDA_MEMCPY2D CUstream hStream CUdeviceptr unsigned char unsigned int N CUdeviceptr unsigned int unsigned int N CUdeviceptr unsigned int unsigned short unsigned int unsigned int Height CUarray const CUDA_ARRAY_DESCRIPTOR pAllocateArray CUarray const CUDA_ARRAY3D_DESCRIPTOR pAllocateArray unsigned int CUtexref CUdeviceptr unsigned int bytes CUcontext unsigned int CUdevice device GLenum texture GLenum GLuint buffer GLenum GLuint renderbuffer GLenum GLsizeiptr const GLvoid GLenum usage GLuint shader GLenum type GLsizei n
const RayResult & getResultForSlot(S32 slot) const
Gets a ray result assigned to a given slot.
void setRay(S32 slot, const Ray &ray)
Assigns ray to a slot. Id is same as slot.
void resize(S32 n)
Resizes the buffer.
void setNeedClosestHit(bool c)
Sets whether the closet hit is needed.
RayResult & getMutableResultForSlot(S32 slot)
Gets a mutable ray assigned to a given slot.
void mortonSort()
Performs morton sort.