Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
spherical_linearizer< CONF > Struct Template Reference

#include <spherical_linearizer.h>

Public Member Functions

 BBM_IMPORT_CONFIG (CONF)
 
 spherical_linearizer (const vec2d< Size_t > &samplesIn, const vec2d< Size_t > &samplesOut, const Vec2d &startIn=0, const Vec2d &endIn=Constants::Hemisphere(), const Vec2d &startOut=0, const Vec2d &endOut=Constants::Hemisphere())
 Constructor.
 
 spherical_linearizer (const spherical_linearizer &src)
 Copy Constructor.
 
Size_t size (void) const
 Size of the linearized 'array' of direction pairs.
 
Vec3dPair operator() (Size_t idx, Mask mask=true) const
 The in-out coordinate of the idx-th sample.
 
Size_t operator() (const Vec3d &in, const Vec3d &out, Mask mask=true) const
 Map a coordinate to an linear index.
 

Private Attributes

vec2d< Size_t > _samplesIn
 
vec2d< Size_t > _samplesOut
 
Vec2d _startIn
 
Vec2d _endIn
 
Vec2d _startOut
 
Vec2d _endOut
 
Vec2d _sizeIn
 
Vec2d _sizeOut
 

Constructor & Destructor Documentation

◆ spherical_linearizer() [1/2]

spherical_linearizer ( const vec2d< Size_t > &  samplesIn,
const vec2d< Size_t > &  samplesOut,
const Vec2d &  startIn = 0,
const Vec2d &  endIn = Constants::Hemisphere(),
const Vec2d &  startOut = 0,
const Vec2d &  endOut = Constants::Hemisphere() 
)
inline

Constructor.

Parameters
samplesIn= number vec2d<size_t>(phi, theta) samples for incident directions
samplesOut= number vec2d<size_t>(phi, theta) samples for outgoing directions
startIn= start Vec2d(phi,theta) for incident directions (default 0)
endIn= end Vec2d(phi,theta) for incident directions (default HEMISPHERE)
startOut= start Vec2d(phi,theta) for outgoing directions (default 0)
endOut= end Vec2d(phi,theta) for outgoing directions (default HEMISPHERE)

◆ spherical_linearizer() [2/2]

spherical_linearizer ( const spherical_linearizer< CONF > &  src)
inline

Copy Constructor.

Member Function Documentation

◆ BBM_IMPORT_CONFIG()

BBM_IMPORT_CONFIG ( CONF  )

◆ operator()() [1/2]

Size_t operator() ( const Vec3d &  in,
const Vec3d &  out,
Mask  mask = true 
) const
inline

Map a coordinate to an linear index.

Parameters
in= incident direction
out= outgoing direction
Returns
linearized index

Invalid querries are set to 'size()'.

◆ operator()() [2/2]

Vec3dPair operator() ( Size_t  idx,
Mask  mask = true 
) const
inline

The in-out coordinate of the idx-th sample.

Parameters
idx= index of the sample (in [0, samples()-1]
Returns
a Ve3dPair of the in and out direction of the sample. Will return {0,0} if the index is not valid.

Note: the sample direction is placed at the center of the index's bin, except for the top and bottom, where it is placed at the center of the top and bottom edge respectively.

◆ size()

Size_t size ( void  ) const
inline

Size of the linearized 'array' of direction pairs.

Member Data Documentation

◆ _endIn

Vec2d _endIn
private

◆ _endOut

Vec2d _endOut
private

◆ _samplesIn

vec2d<Size_t> _samplesIn
private

◆ _samplesOut

vec2d<Size_t> _samplesOut
private

◆ _sizeIn

Vec2d _sizeIn
private

◆ _sizeOut

Vec2d _sizeOut
private

◆ _startIn

Vec2d _startIn
private

◆ _startOut

Vec2d _startOut
private

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