Trace::Distribution class reference
[Core module]
Declaration
#include <Goptical/Trace/Distribution>
namespace Goptical {
namespace Trace {
class Distribution;
};
};
This class is a member of the Trace namespace.
Description
This class describes distribution pattern and ray density used for light ray distribution over surfaces during light propagation.
Ray density is expressed as average number of rays along surface radius.
![Different patterns rendered on a disk with default density](dist_patterns.png)
Members
See also the full member list section for this class.
Functions
- Distribution(Pattern pattern = [...], unsigned int radial_density = [...], double scaling = [...])
- Pattern get_pattern() const
- unsigned int get_radial_density() const
- double get_scaling() const
- void set_pattern(Pattern p)
- void set_radial_density(unsigned int count)
- void set_scaling(double scaling)
- void set_uniform_pattern()
Members detail
Distribution(Pattern pattern = DefaultDist, unsigned int radial_density = 5, double scaling = 0.999)
Creates a distribution pattern with specified pattern, radial ray density and scaling.
The scaling ratio parameter may be used to avoid distributing rays too close to the surface edge.
Pattern get_pattern() const
Get distribution pattern
Get current radial density
get current scaling
void set_pattern(Pattern p)
Set distribution pattern
Set average number of ray to distribute on surface radius
Set scaling, Rays are distributed on surface but are kept away from surface edge if scaling is less than 1.0.
Ensure uniform 2d pattern suitable for spot diagram and image analysis is selected. Change to default pattern if not.