C# Класс TestMSBSDF.LobeModel

Наследование: WMath.BFGS.Model
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

Constrain() публичный Метод

public Constrain ( double _Parameters ) : void
_Parameters double
Результат void

Eval() публичный Метод

public Eval ( double _newParameters ) : double
_newParameters double
Результат double

HistogramTexture2Array() публичный статический Метод

Reads back a lobe texture histogram into an array
public static HistogramTexture2Array ( Texture2D _texHistogram_CPU, int _scatteringOrder ) : ].double[
_texHistogram_CPU Texture2D
_scatteringOrder int
Результат ].double[

InitLobeData() публичный Метод

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.
Результат void

InitTargetData() публичный Метод

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
Результат void

LobeModel() публичный Метод

public LobeModel ( ) : System
Результат System

SetConstraint() публичный Метод

Sets the contraints for each parameter
public SetConstraint ( int _parameterIndex, double _min, double _max ) : void
_parameterIndex int
_min double
_max double
Результат void