C# Class TestMSBSDF.LobeModel

Inheritance: WMath.BFGS.Model
Afficher le fichier Open project: Patapom/GodComplex Class Usage Examples

Méthodes publiques

Méthode Description
Constrain ( double _Parameters ) : void
Eval ( double _newParameters ) : double
HistogramTexture2Array ( Texture2D _texHistogram_CPU, int _scatteringOrder ) : ].double[

Reads back a lobe texture histogram into an array

InitLobeData ( LOBE_TYPE _lobeType, float3 _incomingDirection, double _theta, double _roughness, double _scale, double _flatteningFactor, double _maskingImportance, double _oversizeFactor, bool _fitUsingCenterOfMass ) : void

Initialize the lobe model parameters

InitTargetData ( double _histogramData ) : void

Initializes the array of data we need to fit with the lobe model Computes the Center of Mass of the lobe

LobeModel ( ) : System
SetConstraint ( int _parameterIndex, double _min, double _max ) : void

Sets the contraints for each parameter

Private Methods

Méthode Description
BeckmannG1 ( double _cosTheta_V, double _roughness ) : double
BeckmannNDF ( double _cosTheta_M, double _roughness ) : double
EvalAnisotropicFlattening ( float _Vx, float _Vy, float _Vz, double _scale, double _invScale ) : double
EvalIsotropicFlattening ( float _Vx, float _Vy, float _Vz, double _scale, double _invScale ) : double
GGXG1 ( double _cosTheta_V, double _roughness ) : double
GGXNDF ( double _cosTheta_M, double _roughness ) : double
Masking ( double _cosTheta_V, double _roughness ) : double
NDF ( double _cosTheta_M, double _roughness ) : double
PhongG1 ( double _cosTheta_V, double _roughness ) : double
PhongNDF ( double _cosTheta_M, double _roughness ) : double
Roughness2PhongExponent ( double _roughness ) : double

Method Details

Constrain() public méthode

public Constrain ( double _Parameters ) : void
_Parameters double
Résultat void

Eval() public méthode

public Eval ( double _newParameters ) : double
_newParameters double
Résultat double

HistogramTexture2Array() public static méthode

Reads back a lobe texture histogram into an array
public static HistogramTexture2Array ( Texture2D _texHistogram_CPU, int _scatteringOrder ) : ].double[
_texHistogram_CPU Texture2D
_scatteringOrder int
Résultat ].double[

InitLobeData() public méthode

Initialize the lobe model parameters
public InitLobeData ( LOBE_TYPE _lobeType, float3 _incomingDirection, double _theta, double _roughness, double _scale, double _flatteningFactor, double _maskingImportance, double _oversizeFactor, bool _fitUsingCenterOfMass ) : void
_lobeType LOBE_TYPE Type of lobe to fit
_incomingDirection float3 Incoming light direction, pointing TOWARD the surface (Z-up)
_theta double Initial lobe theta angle
_roughness double Initial lobe roughness
_scale double Initial lobe scale
_flatteningFactor double Initial lobe flattening
_maskingImportance double
_oversizeFactor double Simulation oversize factor. A value of 1 makes the lobe fit exactly, a value higher than one will make the fit lobe smaller than the simulated data, a value lower than one will make the lob larger than the simulated data
_fitUsingCenterOfMass bool If true, the fitting distance is measured against a sphere centered on the Center of Mass rather than the (0,0,0) origin. Precision is usually better when using this option.
Résultat void

InitTargetData() public méthode

Initializes the array of data we need to fit with the lobe model Computes the Center of Mass of the lobe
public InitTargetData ( double _histogramData ) : void
_histogramData double
Résultat void

LobeModel() public méthode

public LobeModel ( ) : System
Résultat System

SetConstraint() public méthode

Sets the contraints for each parameter
public SetConstraint ( int _parameterIndex, double _min, double _max ) : void
_parameterIndex int
_min double
_max double
Résultat void