C# Класс BRDFLafortuneFitting.Program

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
ALF double
EPS double
ITMAX int
STPMX double
TOLX double
TOLY double

Защищенные методы

Метод Описание
BRDFMappingGlobalFunctionEval ( double _Coefficients, object _Params ) : double
BRDFMappingGlobalFunctionGradientEval ( double _Coefficients, double _Gradients, object _Params ) : void
BRDFMappingLocalFunctionEval ( double _Coefficients, object _Params ) : double
BRDFMappingLocalFunctionGradientEval ( double _Coefficients, double _Gradients, object _Params ) : void
ENSUREVALID ( double _Coefficients ) : void
LoadBRDF ( FileInfo _BRDFFile ) : double[][]

Loads a MERL BRDF file

SaveAllSlices ( ) : void
dfpmin ( double _Coefficients, double _ConvergenceTolerance, int &_PerformedIterationsCount, BFGSFunctionEval _FunctionEval, BFGSFunctionGradientEval _FunctionGradientEval, object _Params ) : double

Performs BFGS function minimzation on a quadratic form function evaluated by the provided delegate

lnsrch ( int n, double xold, double fold, double g, double p, double x, double &f, double stpmax, int &check, BFGSFunctionEval _FunctionEval, object _Params ) : void

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

Метод Описание
ComputeSummedDifferences ( BRDFSample _Samples, double _Normalizer, double _GoalBDRF, CosineLobe _LobeEstimates ) : double

Computes the square difference between a current cosine lobe estimate and a goal BRDF given a set of samples

FitBRDF ( double _BRDF, CosineLobe _Lobes, CosineLobe _InitialGuesses, double _BFGSConvergenceTolerance, double _RMS, BRDFMappingFeedback _Delegate ) : double

Performs mapping of a BRDF into N sets of cosine lobes coefficients WARNING: Takes hell of a time to compute !

IsValid ( double _BRDFValue ) : bool
LookupBRDF ( double _BRDF, double _ThetaIn, double _PhiIn, double _ThetaOut, double _PhiOut ) : double

Given a pair of incoming/outgoing angles, look up the BRDF.

Main ( string args ) : void
PhiDiff_index ( double _PhiDiff ) : int
ShowProgress ( double _Progress ) : void
ThetaDiff_index ( double _ThetaDiff ) : int
ThetaHalf_index ( double _ThetaHalf ) : int
half_diff_coords_to_std_coords ( double _ThetaHalf, double _PhiHalf, double _ThetaDiff, double _PhiDiff, System.Vector3 &_In, System.Vector3 &_Out ) : void
half_diff_coords_to_std_coords ( double _ThetaHalf, double _PhiHalf, double _ThetaDiff, double _PhiDiff, double &_ThetaIn, double &_PhiIn, double &_ThetaOut, double &_PhiOut ) : void
std_coords_to_half_diff_coords ( double _ThetaIn, double _PhiIn, double _ThetaOut, double _PhiOut, double &_ThetaHalf, double &_PhiHalf, double &_ThetaDiff, double &_PhiDiff ) : void

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

BRDFMappingGlobalFunctionEval() защищенный статический Метод

protected static BRDFMappingGlobalFunctionEval ( double _Coefficients, object _Params ) : double
_Coefficients double
_Params object
Результат double

BRDFMappingGlobalFunctionGradientEval() защищенный статический Метод

protected static BRDFMappingGlobalFunctionGradientEval ( double _Coefficients, double _Gradients, object _Params ) : void
_Coefficients double
_Gradients double
_Params object
Результат void

BRDFMappingLocalFunctionEval() защищенный статический Метод

protected static BRDFMappingLocalFunctionEval ( double _Coefficients, object _Params ) : double
_Coefficients double
_Params object
Результат double

BRDFMappingLocalFunctionGradientEval() защищенный статический Метод

protected static BRDFMappingLocalFunctionGradientEval ( double _Coefficients, double _Gradients, object _Params ) : void
_Coefficients double
_Gradients double
_Params object
Результат void

ENSUREVALID() защищенный статический Метод

protected static ENSUREVALID ( double _Coefficients ) : void
_Coefficients double
Результат void

LoadBRDF() защищенный статический Метод

Loads a MERL BRDF file
protected static LoadBRDF ( FileInfo _BRDFFile ) : double[][]
_BRDFFile System.IO.FileInfo
Результат double[][]

SaveAllSlices() защищенный статический Метод

protected static SaveAllSlices ( ) : void
Результат void

dfpmin() защищенный статический Метод

Performs BFGS function minimzation on a quadratic form function evaluated by the provided delegate
protected static dfpmin ( double _Coefficients, double _ConvergenceTolerance, int &_PerformedIterationsCount, BFGSFunctionEval _FunctionEval, BFGSFunctionGradientEval _FunctionGradientEval, object _Params ) : double
_Coefficients double The array of initial coefficients (indexed from 1!!) that will also contain the resulting coefficients when the routine has converged
_ConvergenceTolerance double The tolerance error to accept as the minimum of the function
_PerformedIterationsCount int The amount of iterations performed to reach the minimum
_FunctionEval BFGSFunctionEval The delegate used to evaluate the function to minimize
_FunctionGradientEval BFGSFunctionGradientEval The delegate used to evaluate the gradient of the function to minimize
_Params object Some user params passed to the evaluation functions
Результат double

lnsrch() защищенный статический Метод

protected static lnsrch ( int n, double xold, double fold, double g, double p, double x, double &f, double stpmax, int &check, BFGSFunctionEval _FunctionEval, object _Params ) : void
n int
xold double
fold double
g double
p double
x double
f double
stpmax double
check int
_FunctionEval BFGSFunctionEval
_Params object
Результат void

Описание свойств

ALF защищенное статическое свойство

protected static double ALF
Результат double

EPS защищенное статическое свойство

protected static double EPS
Результат double

ITMAX защищенное статическое свойство

protected static int ITMAX
Результат int

STPMX защищенное статическое свойство

protected static double STPMX
Результат double

TOLX защищенное статическое свойство

protected static double TOLX
Результат double

TOLY защищенное статическое свойство

protected static double TOLY
Результат double