SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SLAccelStruct Class Referenceabstract

SLAccelStruct is an abstract base class for acceleration structures. More...

#include <SLAccelStruct.h>

Inheritance diagram for SLAccelStruct:
[legend]

Public Member Functions

 SLAccelStruct (SLMesh *m)
 
virtual ~SLAccelStruct ()
 
virtual void build (SLVec3f minV, SLVec3f maxV)=0
 
virtual void updateStats (SLNodeStats &stats)=0
 
virtual void draw (SLSceneView *sv)=0
 
virtual SLbool intersect (SLRay *ray, SLNode *node)=0
 
virtual void disposeBuffers ()=0
 

Protected Attributes

SLMesh_m
 Pointer to the mesh. More...
 
SLVec3f _minV
 min. point of AABB More...
 
SLVec3f _maxV
 max. point of AABB More...
 
SLuint _voxelCnt
 NO. of voxels in accelerator. More...
 
SLuint _voxelCntEmpty
 NO. of empty voxels. More...
 
SLuint _voxelMaxTria
 max. no. of triangles pre voxel More...
 
SLfloat _voxelAvgTria
 avg. no. of triangles per voxel More...
 

Detailed Description

SLAccelStruct is an abstract base class for acceleration structures.

The SLAccelStruct class serves as common class for the SLUniformGrid, SLCompactGrid and the SLKDTree class. All derived acceleration structures must be able to build, draw, intersect with a ray and update statistics. All structures work on meshes.

Definition at line 21 of file SLAccelStruct.h.

Constructor & Destructor Documentation

◆ SLAccelStruct()

SLAccelStruct::SLAccelStruct ( SLMesh m)
inline

Definition at line 24 of file SLAccelStruct.h.

24 { _m = m; }
SLMesh * _m
Pointer to the mesh.
Definition: SLAccelStruct.h:34

◆ ~SLAccelStruct()

virtual SLAccelStruct::~SLAccelStruct ( )
inlinevirtual

Definition at line 25 of file SLAccelStruct.h.

25 { ; }

Member Function Documentation

◆ build()

virtual void SLAccelStruct::build ( SLVec3f  minV,
SLVec3f  maxV 
)
pure virtual

Implemented in SLCompactGrid.

◆ disposeBuffers()

virtual void SLAccelStruct::disposeBuffers ( )
pure virtual

Implemented in SLCompactGrid.

◆ draw()

virtual void SLAccelStruct::draw ( SLSceneView sv)
pure virtual

Implemented in SLCompactGrid.

◆ intersect()

virtual SLbool SLAccelStruct::intersect ( SLRay ray,
SLNode node 
)
pure virtual

Implemented in SLCompactGrid.

◆ updateStats()

virtual void SLAccelStruct::updateStats ( SLNodeStats stats)
pure virtual

Implemented in SLCompactGrid.

Member Data Documentation

◆ _m

SLMesh* SLAccelStruct::_m
protected

Pointer to the mesh.

Definition at line 34 of file SLAccelStruct.h.

◆ _maxV

SLVec3f SLAccelStruct::_maxV
protected

max. point of AABB

Definition at line 36 of file SLAccelStruct.h.

◆ _minV

SLVec3f SLAccelStruct::_minV
protected

min. point of AABB

Definition at line 35 of file SLAccelStruct.h.

◆ _voxelAvgTria

SLfloat SLAccelStruct::_voxelAvgTria
protected

avg. no. of triangles per voxel

Definition at line 41 of file SLAccelStruct.h.

◆ _voxelCnt

SLuint SLAccelStruct::_voxelCnt
protected

NO. of voxels in accelerator.

Definition at line 38 of file SLAccelStruct.h.

◆ _voxelCntEmpty

SLuint SLAccelStruct::_voxelCntEmpty
protected

NO. of empty voxels.

Definition at line 39 of file SLAccelStruct.h.

◆ _voxelMaxTria

SLuint SLAccelStruct::_voxelMaxTria
protected

max. no. of triangles pre voxel

Definition at line 40 of file SLAccelStruct.h.


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