SLProject 4.0.000
SLRaySamples2D Class Reference

Class for 2D disk sample points. More...

#include <SLRaySamples2D.h>

Public Member Functions

 SLRaySamples2D ()
 
 ~SLRaySamples2D ()
 
void samples (SLuint x, SLuint y, SLbool evenlyDistributed=true)
 Resets the sample point array by the sqrt of the no. of samples. More...
 
void point (SLuint x, SLuint y, SLVec2f point)
 
SLuint samplesX ()
 
SLuint samplesY ()
 
SLuint samples ()
 
SLVec2f point (SLuint x, SLuint y)
 
SLuint sizeInBytes ()
 

Private Member Functions

void distribConcentric (SLbool evenlyDistributed)
 
SLVec2f mapSquareToDisc (SLfloat x, SLfloat y)
 

Private Attributes

SLuint _samplesX
 No. of samples in x direction. More...
 
SLuint _samplesY
 No. of samples in y direction. More...
 
SLuint _samples
 No. of samples = samplesX x samplesY. More...
 
SLVVec2f _points
 samplepoints for distributed tracing More...
 

Detailed Description

Class for 2D disk sample points.

Constructor & Destructor Documentation

◆ SLRaySamples2D()

SLRaySamples2D::SLRaySamples2D ( )
inline

◆ ~SLRaySamples2D()

SLRaySamples2D::~SLRaySamples2D ( )
inline

Member Function Documentation

◆ distribConcentric()

void SLRaySamples2D::distribConcentric ( SLbool  evenlyDistributed)
private

Makes concentric 2D-samples points within a circle of certain radius. With the parameter evenlyDistributed=false will the samplepoints be denser towards the center.

◆ mapSquareToDisc()

SLVec2f SLRaySamples2D::mapSquareToDisc ( SLfloat  x,
SLfloat  y 
)
private

Concentric mapping of a x,y-position Code taken from Peter Shirley out of "Realistic Ray Tracing"

◆ point() [1/2]

SLVec2f SLRaySamples2D::point ( SLuint  x,
SLuint  y 
)
inline

◆ point() [2/2]

void SLRaySamples2D::point ( SLuint  x,
SLuint  y,
SLVec2f  point 
)
inline

◆ samples() [1/2]

SLuint SLRaySamples2D::samples ( )
inline

◆ samples() [2/2]

void SLRaySamples2D::samples ( SLuint  x,
SLuint  y,
SLbool  evenlyDistributed = true 
)

Resets the sample point array by the sqrt of the no. of samples.

◆ samplesX()

SLuint SLRaySamples2D::samplesX ( )
inline

◆ samplesY()

SLuint SLRaySamples2D::samplesY ( )
inline

◆ sizeInBytes()

SLuint SLRaySamples2D::sizeInBytes ( )
inline

Member Data Documentation

◆ _points

SLVVec2f SLRaySamples2D::_points
private

samplepoints for distributed tracing

◆ _samples

SLuint SLRaySamples2D::_samples
private

No. of samples = samplesX x samplesY.

◆ _samplesX

SLuint SLRaySamples2D::_samplesX
private

No. of samples in x direction.

◆ _samplesY

SLuint SLRaySamples2D::_samplesY
private

No. of samples in y direction.


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