NTrace
GPU ray tracing framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FW::CudaKDTree Class Reference

Cuda friendly KDTree representation. More...

#include <CudaKDTree.hpp>

Inherits FW::CudaAS.

Public Member Functions

BVHLayout getLayout (void) const
 Returns layout of buffers. More...
 
 CudaKDTree (const KDTree &kdtree)
 Constructor. [in] kdtree KDTree to convert. More...
 
 CudaKDTree (CudaKDTree &other)
 Copy constructor. [in] kdtree KDTree to copy. More...
 
 CudaKDTree (InputStream &in)
 Constructs CudaKDTree from an input stream. [in] in Source input stream. More...
 
 ~CudaKDTree (void)
 Destructor. More...
 
BuffergetNodeBuffer (void)
 Returns node buffer. More...
 
BuffergetTriIndexBuffer (void)
 Returns triangle index buffer. More...
 
BuffergetTriWoopBuffer (void)
 Returns buffer of woopified triangles. More...
 
void serialize (OutputStream &out)
 Writes CudaKDTree to a given output stream. More...
 
const AABBgetBBox (void) const
 Returns bounding box of the CudaKDTree's source scene. More...
 
- Public Member Functions inherited from FW::CudaAS
virtual ~CudaAS (void)
 Destructor. More...
 

Detailed Description

Cuda friendly KDTree representation.

Converts KDTree data to buffers optimal for traversal and storage.

Definition at line 20 of file CudaKDTree.hpp.

Constructor & Destructor Documentation

CudaKDTree::CudaKDTree ( const KDTree kdtree)
explicit

Constructor. [in] kdtree KDTree to convert.

Definition at line 8 of file CudaKDTree.cpp.

FW::CudaKDTree::CudaKDTree ( CudaKDTree other)
inline

Copy constructor. [in] kdtree KDTree to copy.

Definition at line 35 of file CudaKDTree.hpp.

CudaKDTree::CudaKDTree ( InputStream in)
explicit

Constructs CudaKDTree from an input stream. [in] in Source input stream.

Definition at line 16 of file CudaKDTree.cpp.

CudaKDTree::~CudaKDTree ( void  )

Destructor.

Definition at line 25 of file CudaKDTree.cpp.

Member Function Documentation

const AABB& FW::CudaKDTree::getBBox ( void  ) const
inline

Returns bounding box of the CudaKDTree's source scene.

Returns
Bounding box of the CudaKDTree's source scene.

Definition at line 77 of file CudaKDTree.hpp.

BVHLayout FW::CudaKDTree::getLayout ( void  ) const
inlinevirtual

Returns layout of buffers.

Returns
Layout of buffers.

Implements FW::CudaAS.

Definition at line 23 of file CudaKDTree.hpp.

Buffer& FW::CudaKDTree::getNodeBuffer ( void  )
inlinevirtual

Returns node buffer.

Returns
Buffer containing nodes.

Implements FW::CudaAS.

Definition at line 52 of file CudaKDTree.hpp.

Buffer& FW::CudaKDTree::getTriIndexBuffer ( void  )
inlinevirtual

Returns triangle index buffer.

Returns
Buffer containing indexes which point to the scene's triangle buffer.

Implements FW::CudaAS.

Definition at line 58 of file CudaKDTree.hpp.

Buffer& FW::CudaKDTree::getTriWoopBuffer ( void  )
inlinevirtual

Returns buffer of woopified triangles.

Returns
Buffer containing wooopified triangles. These triangles are in the same order as they are in the scene's triangle buffer.

Implements FW::CudaAS.

Definition at line 65 of file CudaKDTree.hpp.

void CudaKDTree::serialize ( OutputStream out)
virtual

Writes CudaKDTree to a given output stream.

Parameters
[in]outOutput stream to write CudaKDTree to.

Implements FW::CudaAS.

Definition at line 31 of file CudaKDTree.cpp.


The documentation for this class was generated from the following files: