C# 클래스 SphericalHarmonics.SHFunctions

The functions gathered here allow to work with Spherical Harmonics and Zonal Harmonics =============================================================================== The convention for transformation between spherical and cartesian coordinates is : ( sinθ cosϕ, sinθ sinϕ, cosθ ) → (x, y, z) _ Azimuth ϕ is zero on +X and increases CCW (i.e. PI/2 at +Y, PI at -X and -PI/2 at -Y) _ Elevation θ is zero on +Z and PI on -Z Z θ=0 | | | ϕ=-PI/2 -Y - - - -o------+Y ϕ=PI/2 /. / . +X . ϕ=0 . -Z θ=PI So cartesian to polar coordinates is computed this way: θ = acos( Z ); ϕ = atan2( Y, X );
파일 보기 프로젝트 열기: Patapom/GodComplex

보호된 프로퍼티들

프로퍼티 타입 설명
ALF double
EPS double
FACTORIAL double[]
ITMAX int
SQRT2 double
STPMX double
TOLX double
TOLY double

공개 메소드들

메소드 설명
BuildRotationMatrix ( float3x3 _Rotation, double _Matrix, int _Order ) : void

Builds the matrix to apply the SH coefficients to make them rotate by the specified matrix

CartesianToSpherical ( float3 _Direction, double &, double & ) : void

Converts a cartesian UNIT vector into spherical coordinates (θ,ϕ)

ComputeClebschGordan ( int j1, int j2, int m1, int m2, int j, int m ) : double
ComputeRotatedZHCoefficients ( double _ZHCoefficients, float3 _TargetAxis, double _RotatedSHCoefficients ) : void

Computes the SH coefficients of originaly Y-aligned Zonal Harmonics coefficients rotated to match the provided axis

Be careful the returned coefficients are SH coefficients, hence the _RotatedSHCoefficients vector should be N² if rotating an order N Zonal Harmonics vector

ComputeSHWindowedCos ( int l, int m, double , double , int _Order ) : double
ComputeSHWindowedSinc ( int l, int m, double , double , int _Order ) : double
ComputeSigmaFactorCos ( int l, double h ) : double
ComputeSigmaFactorCos ( int l, int _Order ) : double

Sigma factor using a cardinal sine for windowing From "Real-time Soft Shadows in Dynamic Scenes using Spherical Harmonic Exponentiation" by Ren et al. (2006) Therefore, you should no longer use ComputeSH( l, m ) when reconstructing SH but ComputeSigmaFactorCos( l ) * ComputeSH( l, m )

ComputeSigmaFactorSinc ( int l, int _Order ) : double

Sigma factor using a cardinal sine for windowing From "A Quick Rendering Method Using Basis Functions for Interactive Lighting Design" by Dobashi et al. (1995) Therefore, you should no longer use ComputeSH( l, m ) when reconstructing SH but ComputeSigmaFactorSinc( l ) * ComputeSH( l, m )

ComputeZH ( int l, double ) : double
ComputeZH ( int l, float3 _Direction ) : double
Convolve ( float3 _Vector0, float3 _Vector1, int _Order ) : SharpMath.float3[]

Computes the convolution of 2 3-vectors of SH coefficients of the specified order using Clebsch-Gordan coefficients

This method is quite time-consuming as the convolution is computed using 5 loops but, as an optimisation, we can notice that most Clebsh-Gordan are 0 and a vector of non-null coefficients could be precomputed as only the vectors' coefficients change

EncodeIntoSH ( double _Coefficients, int _SamplesCountTheta, int _SamplesCountPhi, int _RandomSeed, int _Order, EvaluateFunctionSH _Delegate ) : void

Encodes a function evaluated by the provided delegate into a series of ZH coefficients

EncodeIntoSH ( float3 _Coefficients, int _SamplesCountTheta, int _SamplesCountPhi, int _RandomSeed, int _Order, EvaluateFunctionSHVector3 _Delegate ) : void

Encodes a function evaluated by the provided delegate into a series of ZH coefficients

EncodeIntoZH ( double _Coefficients, int _SamplesCount, int _RandomSeed, EvaluateFunctionZH _Delegate ) : void

Attempts to encode a function evaluated by the provided delegate into a series of ZH coefficients

EvaluateSH ( double _Coefficients, double , double , int _Order ) : double

Evaluates the amplitude encoded by the SH coefficients in the provided direction

EvaluateSH ( double _Coefficients, float3 _Direction, int _Order ) : double

Evaluates the amplitude encoded by the SH coefficients in the provided direction

EvaluateZH ( double _Coefficients, double ) : double

Evaluates the amplitude encoded by the Y-aligned ZH coefficients in the provided direction

EvaluateZH ( double _Coefficients, float3 _Direction ) : double

Evaluates the amplitude encoded by the Y-aligned ZH coefficients in the provided direction

FilterGaussian ( float _SH, int w ) : void
FilterGaussian ( float3 _SH, int w ) : void
FilterHanning ( float _SH, int w ) : void
FilterHanning ( float3 _SH, int w ) : void
FilterLanczos ( float _SH, int w ) : void
FilterLanczos ( float3 _SH, int w ) : void
InitializeSHCoefficients ( int _Order, double , double , double _Coefficients ) : void

Initializes the provided vector with the SH coefficients corresponding to the specified direction

InitializeSHCoefficients ( int _Order, double , double , float3 _Coefficients ) : void

Initializes the provided vector with the SH coefficients corresponding to the specified direction

InitializeSHCoefficients ( int _Order, float3 _Direction, double _Coefficients ) : void

Initializes the provided vector with the SH coefficients corresponding to the specified direction

InitializeSHCoefficients ( int _Order, float3 _Direction, float3 _Coefficients ) : void

Initializes the provided vector with the SH coefficients corresponding to the specified direction

K ( int l, int m ) : double
MapSHIntoZH ( double _SHCoefficients, int _Order, float2 _ZHAxes, double _ZHCoefficients, int _HemisphereResolution, int _FunctionSamplingResolution, double _BFGSConvergenceTolerance, double &_RMS, ZHMappingFeedback _Delegate ) : void

Performs mapping of a set of SH coefficients into N sets of ZH coefficients WARNING: Takes hell of a time to compute !

MirrorY ( double _Vector, double _MirroredVector, int _Order ) : void

Applies a simple mirroring on the Y axis

MirrorY ( float3 _Vector, float3 _MirroredVector, int _Order ) : void

Applies a simple mirroring on the Y axis

P ( int l, int m, double x ) : double
P0 ( int l, double x ) : double
Product3 ( double a, double b ) : double[]

Computes the product of 2 SH vectors of order 3 (code from John Snyder "Code Generation and Factoring for Fast Evaluation of Low-order Spherical Harmonic Products and Squares")

ProductClebschGordan ( double _Vector0, double _Vector1, int _Order, ProductDelegate _Delegate ) : double[]

Computes the product and re-projection in SH of 2 vectors of SH coefficients of the specified order using Clebsch-Gordan coefficients

This method is quite time-consuming as the convolution is computed using 5 loops but, as an optimisation, we can notice that most Clebsh-Gordan are 0 and a vector of non-null coefficients could be precomputed as only the SH vectors' coefficients change

Rotate ( double _Vector, double _RotationMatrix, double _RotatedVector, int _Order ) : void

Applies rotation to the specified SH vector using the specified rotation matrix yielded by the above "BuildRotationMatrix()" method

Rotate ( float3 _Vector, double _RotationMatrix, float3 _RotatedVector, int _Order ) : void

Applies rotation to the specified 3-vector using the specified rotation matrix returned by the "BuildRotationMatrix()" method

RotateY ( double _Vector, double , double _RotatedVector, int _Order ) : void

Applies a simple fast rotation about the Y axis

RotateY ( float3 _Vector, double , float3 _RotatedVector, int _Order ) : void

Applies a simple fast rotation about the Y axis

SphericalToCartesian ( double , double ) : float3

Converts spherical coordinates (θ,ϕ) into a cartesian UNIT vector

SphericalToCartesian ( double , double , float3 _Direction ) : void

Converts spherical coordinates (θ,ϕ) into a cartesian UNIT vector

Ylm ( int l, int m, double , double ) : double
Ylm ( int l, int m, float3 _Direction ) : double

보호된 메소드들

메소드 설명
ComputeP ( int _a, int _b, int _i, int _l, double _Matrix ) : double

Factored code used to compute U,V,W coefficients needed for rotation matrix inference

ComputeRho ( int j1, int j2, int j ) : double
ComputeSigma ( int j1, int j2, int j, int m1, int m2, int m ) : double
ComputeSummedDifferences ( SHSamplesCollection _SamplesCollection, double _Normalizer, double _GoalSHEvaluation, double _SHEstimate, int _Order ) : double

Computes the square difference between a current SH estimate and a goal SH function given a set of samples

ComputeTau ( int j1, int j2, int j, int m1, int m2 ) : double
Factorial ( int _Value ) : double

Computes the factorial of the given integer value

ZHMappingGlobalFunctionEval ( double _Coefficients, object _Params ) : double
ZHMappingGlobalFunctionGradientEval ( double _Coefficients, double _Gradients, object _Params ) : void
ZHMappingLocalFunctionEval ( double _Coefficients, object _Params ) : double
ZHMappingLocalFunctionGradientEval ( double _Coefficients, double _Gradients, object _Params ) : void
dfpmin ( double _Coefficients, double _ConvergenceTolerance, int &_PerformedIterationsCount, double &_Minimum, BFGSFunctionEval _FunctionEval, BFGSFunctionGradientEval _FunctionGradientEval, object _Params ) : void

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

비공개 메소드들

메소드 설명
Filter ( float _SH, int l, float a ) : void
Filter ( float3 _SH, int l, float a ) : void
Ylm ( float3 _direction, double _SH ) : void

Computes the 9 Ylm coefficients for order 2 SH evaluated in the requested direction

메소드 상세

BuildRotationMatrix() 공개 정적인 메소드

Builds the matrix to apply the SH coefficients to make them rotate by the specified matrix
public static BuildRotationMatrix ( float3x3 _Rotation, double _Matrix, int _Order ) : void
_Rotation SharpMath.float3x3 The 3x3 rotation matrix to infer the SH rotation matrix from
_Matrix double The resulting _Order² x _Order² rotation matrix
_Order int The order of the SH vectors that will be rotated using the matrix
리턴 void

CartesianToSpherical() 공개 정적인 메소드

Converts a cartesian UNIT vector into spherical coordinates (θ,ϕ)
public static CartesianToSpherical ( float3 _Direction, double &, double & ) : void
_Direction SharpMath.float3 The cartesian unit vector to convert
double The polar elevation
double The azimuth
리턴 void

ComputeClebschGordan() 공개 정적인 메소드

public static ComputeClebschGordan ( int j1, int j2, int m1, int m2, int j, int m ) : double
j1 int
j2 int
m1 int
m2 int
j int
m int
리턴 double

ComputeP() 보호된 정적인 메소드

Factored code used to compute U,V,W coefficients needed for rotation matrix inference
protected static ComputeP ( int _a, int _b, int _i, int _l, double _Matrix ) : double
_a int
_b int
_i int
_l int
_Matrix double The source rotation matrix
리턴 double

ComputeRho() 보호된 정적인 메소드

protected static ComputeRho ( int j1, int j2, int j ) : double
j1 int
j2 int
j int
리턴 double

ComputeRotatedZHCoefficients() 공개 정적인 메소드

Computes the SH coefficients of originaly Y-aligned Zonal Harmonics coefficients rotated to match the provided axis
Be careful the returned coefficients are SH coefficients, hence the _RotatedSHCoefficients vector should be N² if rotating an order N Zonal Harmonics vector
public static ComputeRotatedZHCoefficients ( double _ZHCoefficients, float3 _TargetAxis, double _RotatedSHCoefficients ) : void
_ZHCoefficients double The ZH coefficients to rotate
_TargetAxis SharpMath.float3 The target axis to match (the original axis being positive Y)
_RotatedSHCoefficients double The rotated SH coefficients
리턴 void

ComputeSHWindowedCos() 공개 정적인 메소드

public static ComputeSHWindowedCos ( int l, int m, double , double , int _Order ) : double
l int
m int
double
double
_Order int
리턴 double

ComputeSHWindowedSinc() 공개 정적인 메소드

public static ComputeSHWindowedSinc ( int l, int m, double , double , int _Order ) : double
l int
m int
double
double
_Order int
리턴 double

ComputeSigma() 보호된 정적인 메소드

protected static ComputeSigma ( int j1, int j2, int j, int m1, int m2, int m ) : double
j1 int
j2 int
j int
m1 int
m2 int
m int
리턴 double

ComputeSigmaFactorCos() 공개 정적인 메소드

public static ComputeSigmaFactorCos ( int l, double h ) : double
l int
h double
리턴 double

ComputeSigmaFactorCos() 공개 정적인 메소드

Sigma factor using a cardinal sine for windowing From "Real-time Soft Shadows in Dynamic Scenes using Spherical Harmonic Exponentiation" by Ren et al. (2006) Therefore, you should no longer use ComputeSH( l, m ) when reconstructing SH but ComputeSigmaFactorCos( l ) * ComputeSH( l, m )
public static ComputeSigmaFactorCos ( int l, int _Order ) : double
l int Current band
_Order int Max used SH order
리턴 double

ComputeSigmaFactorSinc() 공개 정적인 메소드

Sigma factor using a cardinal sine for windowing From "A Quick Rendering Method Using Basis Functions for Interactive Lighting Design" by Dobashi et al. (1995) Therefore, you should no longer use ComputeSH( l, m ) when reconstructing SH but ComputeSigmaFactorSinc( l ) * ComputeSH( l, m )
public static ComputeSigmaFactorSinc ( int l, int _Order ) : double
l int Current band
_Order int Max used SH order
리턴 double

ComputeSummedDifferences() 보호된 정적인 메소드

Computes the square difference between a current SH estimate and a goal SH function given a set of samples
protected static ComputeSummedDifferences ( SHSamplesCollection _SamplesCollection, double _Normalizer, double _GoalSHEvaluation, double _SHEstimate, int _Order ) : double
_SamplesCollection SHSamplesCollection The collection of samples to use for the computation
_Normalizer double The normalizer for the final result
_GoalSHEvaluation double The goal SH function's evaluations for each sample
_SHEstimate double The estimate SH function's coefficients
_Order int The SH order
리턴 double

ComputeTau() 보호된 정적인 메소드

protected static ComputeTau ( int j1, int j2, int j, int m1, int m2 ) : double
j1 int
j2 int
j int
m1 int
m2 int
리턴 double

ComputeZH() 공개 정적인 메소드

public static ComputeZH ( int l, double ) : double
l int
double
리턴 double

ComputeZH() 공개 정적인 메소드

public static ComputeZH ( int l, float3 _Direction ) : double
l int
_Direction SharpMath.float3
리턴 double

Convolve() 공개 정적인 메소드

Computes the convolution of 2 3-vectors of SH coefficients of the specified order using Clebsch-Gordan coefficients
This method is quite time-consuming as the convolution is computed using 5 loops but, as an optimisation, we can notice that most Clebsh-Gordan are 0 and a vector of non-null coefficients could be precomputed as only the vectors' coefficients change
public static Convolve ( float3 _Vector0, float3 _Vector1, int _Order ) : SharpMath.float3[]
_Vector0 SharpMath.float3 First 3-vector
_Vector1 SharpMath.float3 Second 3-vector
_Order int The order of the vectors (i.e. vectors must have a length of Order²)
리턴 SharpMath.float3[]

EncodeIntoSH() 공개 정적인 메소드

Encodes a function evaluated by the provided delegate into a series of ZH coefficients
public static EncodeIntoSH ( double _Coefficients, int _SamplesCountTheta, int _SamplesCountPhi, int _RandomSeed, int _Order, EvaluateFunctionSH _Delegate ) : void
_Coefficients double The coefficients supposed to best fit the provided function (the length of the vector must be _Order²)
_SamplesCountTheta int
_SamplesCountPhi int
_RandomSeed int The random seed to initialize the RNG with when drawing random sample position
_Order int The order of the SH vector to encode
_Delegate EvaluateFunctionSH The delegate that will be called to evaluate the function to encode
리턴 void

EncodeIntoSH() 공개 정적인 메소드

Encodes a function evaluated by the provided delegate into a series of ZH coefficients
public static EncodeIntoSH ( float3 _Coefficients, int _SamplesCountTheta, int _SamplesCountPhi, int _RandomSeed, int _Order, EvaluateFunctionSHVector3 _Delegate ) : void
_Coefficients SharpMath.float3 The coefficients supposed to best fit the provided function (the length of the vector must be _Order²)
_SamplesCountTheta int
_SamplesCountPhi int
_RandomSeed int The random seed to initialize the RNG with when drawing random sample position
_Order int The order of the SH vector to encode
_Delegate EvaluateFunctionSHVector3 The delegate that will be called to evaluate the function to encode
리턴 void

EncodeIntoZH() 공개 정적인 메소드

Attempts to encode a function evaluated by the provided delegate into a series of ZH coefficients
public static EncodeIntoZH ( double _Coefficients, int _SamplesCount, int _RandomSeed, EvaluateFunctionZH _Delegate ) : void
_Coefficients double The coefficients supposed to best fit the provided function (the length of the vector will also provide the ZH/SH order)
_SamplesCount int The amount of samples to use to fit the function
_RandomSeed int The random seed to initialize the RNG with when drawing random sample position
_Delegate EvaluateFunctionZH The delegate that will be called to evaluate the function to encode
리턴 void

EvaluateSH() 공개 정적인 메소드

Evaluates the amplitude encoded by the SH coefficients in the provided direction
public static EvaluateSH ( double _Coefficients, double , double , int _Order ) : double
_Coefficients double The SH coefficients encoding an amplitude in various directions
double The elevation of the direction of the SH sampling
double The azimuth of the direction of the SH sampling
_Order int The order of the SH vector
리턴 double

EvaluateSH() 공개 정적인 메소드

Evaluates the amplitude encoded by the SH coefficients in the provided direction
public static EvaluateSH ( double _Coefficients, float3 _Direction, int _Order ) : double
_Coefficients double The SH coefficients encoding an amplitude in various directions
_Direction SharpMath.float3 The direction where to evalute the SH
_Order int The order of the SH vector
리턴 double

EvaluateZH() 공개 정적인 메소드

Evaluates the amplitude encoded by the Y-aligned ZH coefficients in the provided direction
public static EvaluateZH ( double _Coefficients, double ) : double
_Coefficients double The SH coefficients encoding an amplitude in various directions
double The elevation of the direction of the ZH sampling
리턴 double

EvaluateZH() 공개 정적인 메소드

Evaluates the amplitude encoded by the Y-aligned ZH coefficients in the provided direction
public static EvaluateZH ( double _Coefficients, float3 _Direction ) : double
_Coefficients double The SH coefficients encoding an amplitude in various directions
_Direction SharpMath.float3 The direction where to evalute the ZH
리턴 double

Factorial() 보호된 정적인 메소드

Computes the factorial of the given integer value
protected static Factorial ( int _Value ) : double
_Value int The value to compute the factorial of
리턴 double

FilterGaussian() 공개 정적인 메소드

public static FilterGaussian ( float _SH, int w ) : void
_SH float
w int
리턴 void

FilterGaussian() 공개 정적인 메소드

public static FilterGaussian ( float3 _SH, int w ) : void
_SH SharpMath.float3
w int
리턴 void

FilterHanning() 공개 정적인 메소드

public static FilterHanning ( float _SH, int w ) : void
_SH float
w int
리턴 void

FilterHanning() 공개 정적인 메소드

public static FilterHanning ( float3 _SH, int w ) : void
_SH SharpMath.float3
w int
리턴 void

FilterLanczos() 공개 정적인 메소드

public static FilterLanczos ( float _SH, int w ) : void
_SH float
w int
리턴 void

FilterLanczos() 공개 정적인 메소드

public static FilterLanczos ( float3 _SH, int w ) : void
_SH SharpMath.float3
w int
리턴 void

InitializeSHCoefficients() 공개 정적인 메소드

Initializes the provided vector with the SH coefficients corresponding to the specified direction
public static InitializeSHCoefficients ( int _Order, double , double , double _Coefficients ) : void
_Order int The order of the SH vector
double The elevation of the direction of the SH sampling
double The azimuth of the direction of the SH sampling
_Coefficients double The array of coefficients to fill up
리턴 void

InitializeSHCoefficients() 공개 정적인 메소드

Initializes the provided vector with the SH coefficients corresponding to the specified direction
public static InitializeSHCoefficients ( int _Order, double , double , float3 _Coefficients ) : void
_Order int The order of the SH vector
double The elevation of the direction of the SH sampling
double The azimuth of the direction of the SH sampling
_Coefficients SharpMath.float3 The array of coefficients to fill up
리턴 void

InitializeSHCoefficients() 공개 정적인 메소드

Initializes the provided vector with the SH coefficients corresponding to the specified direction
public static InitializeSHCoefficients ( int _Order, float3 _Direction, double _Coefficients ) : void
_Order int The order of the SH vector
_Direction SharpMath.float3 The direction of the SH sampling
_Coefficients double The array of coefficients to fill up
리턴 void

InitializeSHCoefficients() 공개 정적인 메소드

Initializes the provided vector with the SH coefficients corresponding to the specified direction
public static InitializeSHCoefficients ( int _Order, float3 _Direction, float3 _Coefficients ) : void
_Order int The order of the SH vector
_Direction SharpMath.float3 The direction of the SH sampling
_Coefficients SharpMath.float3 The array of coefficients to fill up
리턴 void

K() 공개 정적인 메소드

public static K ( int l, int m ) : double
l int
m int
리턴 double

MapSHIntoZH() 공개 정적인 메소드

Performs mapping of a set of SH coefficients into N sets of ZH coefficients WARNING: Takes hell of a time to compute !
public static MapSHIntoZH ( double _SHCoefficients, int _Order, float2 _ZHAxes, double _ZHCoefficients, int _HemisphereResolution, int _FunctionSamplingResolution, double _BFGSConvergenceTolerance, double &_RMS, ZHMappingFeedback _Delegate ) : void
_SHCoefficients double The SH coefficients to map into ZH
_Order int The order of the SH coefficients vector
_ZHAxes float2 The double array of resulting ZH axes (i.e. [θ,ϕ] couples)
_ZHCoefficients double The double array of resulting ZH coefficients (the dimension of the outter array gives the amount of requested ZH lobes while the dimension of the inner arrays should be of size "_Order")
_HemisphereResolution int The resolution of the hemisphere used to perform initial guess of directions (e.g. using a resolution of 100 will test for 20 * (4*20) possible lobe orientations)
_FunctionSamplingResolution int The resolution of the sphere used to perform function sampling and measuring the error (e.g. using a resolution of 100 will estimate the function with 100 * (2*100) samples)
_BFGSConvergenceTolerance double The convergence tolerance for the BFGS algorithm (the lower the tolerance, the longer it will compute)
_RMS double The resulting array of RMS errors for each ZH lobe
_Delegate ZHMappingFeedback An optional delegate to pass the method to get feedback about the mapping as it can be a lengthy process (!!)
리턴 void

MirrorY() 공개 정적인 메소드

Applies a simple mirroring on the Y axis
public static MirrorY ( double _Vector, double _MirroredVector, int _Order ) : void
_Vector double The vector to mirror
_MirroredVector double The mirrored vector
_Order int The order of the vectors (i.e. vectors must have a length of Order²)
리턴 void

MirrorY() 공개 정적인 메소드

Applies a simple mirroring on the Y axis
public static MirrorY ( float3 _Vector, float3 _MirroredVector, int _Order ) : void
_Vector SharpMath.float3 The vector to mirror
_MirroredVector SharpMath.float3 The mirrored vector
_Order int The order of the vectors (i.e. vectors must have a length of Order²)
리턴 void

P() 공개 정적인 메소드

public static P ( int l, int m, double x ) : double
l int
m int
x double
리턴 double

P0() 공개 정적인 메소드

public static P0 ( int l, double x ) : double
l int
x double
리턴 double

Product3() 공개 정적인 메소드

Computes the product of 2 SH vectors of order 3 (code from John Snyder "Code Generation and Factoring for Fast Evaluation of Low-order Spherical Harmonic Products and Squares")
public static Product3 ( double a, double b ) : double[]
a double
b double
리턴 double[]

ProductClebschGordan() 공개 정적인 메소드

Computes the product and re-projection in SH of 2 vectors of SH coefficients of the specified order using Clebsch-Gordan coefficients
This method is quite time-consuming as the convolution is computed using 5 loops but, as an optimisation, we can notice that most Clebsh-Gordan are 0 and a vector of non-null coefficients could be precomputed as only the SH vectors' coefficients change
public static ProductClebschGordan ( double _Vector0, double _Vector1, int _Order, ProductDelegate _Delegate ) : double[]
_Vector0 double First vector
_Vector1 double Second vector
_Order int The order of the vectors (i.e. vectors must have a length of Order²)
_Delegate ProductDelegate
리턴 double[]

Rotate() 공개 정적인 메소드

Applies rotation to the specified SH vector using the specified rotation matrix yielded by the above "BuildRotationMatrix()" method
public static Rotate ( double _Vector, double _RotationMatrix, double _RotatedVector, int _Order ) : void
_Vector double The vector to rotate
_RotationMatrix double The SH rotation matrix
_RotatedVector double The rotated vector
_Order int The order of the vectors (i.e. vectors must have a length of Order²)
리턴 void

Rotate() 공개 정적인 메소드

Applies rotation to the specified 3-vector using the specified rotation matrix returned by the "BuildRotationMatrix()" method
public static Rotate ( float3 _Vector, double _RotationMatrix, float3 _RotatedVector, int _Order ) : void
_Vector SharpMath.float3 The 3-vector to rotate
_RotationMatrix double The SH rotation matrix
_RotatedVector SharpMath.float3 The rotated vector
_Order int The order of the vectors (i.e. vectors must have a length of Order²)
리턴 void

RotateY() 공개 정적인 메소드

Applies a simple fast rotation about the Y axis
public static RotateY ( double _Vector, double , double _RotatedVector, int _Order ) : void
_Vector double The vector to rotate
double The rotation angle
_RotatedVector double The rotated vector
_Order int The order of the vectors (i.e. vectors must have a length of Order²)
리턴 void

RotateY() 공개 정적인 메소드

Applies a simple fast rotation about the Y axis
public static RotateY ( float3 _Vector, double , float3 _RotatedVector, int _Order ) : void
_Vector SharpMath.float3 The vector to rotate
double The rotation angle
_RotatedVector SharpMath.float3 The rotated vector
_Order int The order of the vectors (i.e. vectors must have a length of Order²)
리턴 void

SphericalToCartesian() 공개 정적인 메소드

Converts spherical coordinates (θ,ϕ) into a cartesian UNIT vector
public static SphericalToCartesian ( double , double ) : float3
double The polar elevation
double The azimuth
리턴 SharpMath.float3

SphericalToCartesian() 공개 정적인 메소드

Converts spherical coordinates (θ,ϕ) into a cartesian UNIT vector
public static SphericalToCartesian ( double , double , float3 _Direction ) : void
double The polar elevation
double The azimuth
_Direction SharpMath.float3 The unit vector in cartesian coordinates
리턴 void

Ylm() 공개 정적인 메소드

public static Ylm ( int l, int m, double , double ) : double
l int
m int
double
double
리턴 double

Ylm() 공개 정적인 메소드

public static Ylm ( int l, int m, float3 _Direction ) : double
l int
m int
_Direction SharpMath.float3
리턴 double

ZHMappingGlobalFunctionEval() 보호된 정적인 메소드

protected static ZHMappingGlobalFunctionEval ( double _Coefficients, object _Params ) : double
_Coefficients double
_Params object
리턴 double

ZHMappingGlobalFunctionGradientEval() 보호된 정적인 메소드

protected static ZHMappingGlobalFunctionGradientEval ( double _Coefficients, double _Gradients, object _Params ) : void
_Coefficients double
_Gradients double
_Params object
리턴 void

ZHMappingLocalFunctionEval() 보호된 정적인 메소드

protected static ZHMappingLocalFunctionEval ( double _Coefficients, object _Params ) : double
_Coefficients double
_Params object
리턴 double

ZHMappingLocalFunctionGradientEval() 보호된 정적인 메소드

protected static ZHMappingLocalFunctionGradientEval ( double _Coefficients, double _Gradients, object _Params ) : void
_Coefficients double
_Gradients double
_Params object
리턴 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, double &_Minimum, BFGSFunctionEval _FunctionEval, BFGSFunctionGradientEval _FunctionGradientEval, object _Params ) : void
_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
_Minimum double The found 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
리턴 void

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

FACTORIAL 보호되어 있는 정적으로 프로퍼티

protected static double[] FACTORIAL
리턴 double[]

ITMAX 보호되어 있는 정적으로 프로퍼티

protected static int ITMAX
리턴 int

SQRT2 보호되어 있는 정적으로 프로퍼티

protected static double SQRT2
리턴 double

STPMX 보호되어 있는 정적으로 프로퍼티

protected static double STPMX
리턴 double

TOLX 보호되어 있는 정적으로 프로퍼티

protected static double TOLX
리턴 double

TOLY 보호되어 있는 정적으로 프로퍼티

protected static double TOLY
리턴 double