C# Класс BRDFSlices.DisplayForm

Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
m_BRDF BRDFSlices.Vector3[
m_Intersections ].double[
m_Pen Pen
m_Slice Bitmap

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

Метод Описание
DisplayForm ( Vector3 _BRDF ) : System
LoadBRDF ( FileInfo _BRDFFile ) : BRDFSlices.Vector3[

Loads a MERL BRDF file

LookupBRDF ( Vector3 _BRDF, double _ThetaIn, double _PhiIn, double _ThetaOut, double _PhiOut, Vector3 &_Result ) : void

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

LookupBRDFTrilinear ( Vector3 _BRDF, double _ThetaHalf, double _ThetaDiff, double _PhiDiff, Vector3 &_Result ) : void
PhiDiff_index ( double _PhiDiff, double &_Interpolant ) : int
ThetaDiff_index ( double _ThetaDiff, double &_Interpolant ) : int
ThetaHalf_index ( double _ThetaHalf, double &_Interpolant ) : int
half_diff_coords_to_std_coords ( double _ThetaHalf, double _PhiHalf, double _ThetaDiff, double _PhiDiff, Vector3 &_In, 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

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

Метод Описание
BuildScaleTable ( ) : void
ComputeScaleFactor ( double _ThetaH, double _ThetaD, double _PhiD ) : double
Dispose ( bool disposing ) : void

Clean up any resources being used.

LoadBRDFBisou ( FileInfo _BRDFFile ) : double[][]

Loads a MERL BRDF file

LoadScaleTable ( ) : void
Redraw ( ) : void
SaveAllSlices ( ) : void
SaveAllSlices_BUGGED ( ) : void
SolveNewton ( double a, double b, int &_IterationsCount ) : double

Numerically computes the intersection of a straight line with a strange curve we know the equation of... We're using the http://en.wikipedia.org/wiki/Newton's_method The computation is occurring in [ThetaH,ThetaD] space: ^ ThetaD | PI/2 +----------/-----+ ThetaH PI/2 We're looking for intersection point o given 2 values: the slope of the straight line and PhiD that guides the curvature of the strange curve C(y) The position of a point P on the line is given by P(x)=[x,slope.x] (we know the slope) we find o so that o = P(x) = C(y) So we can write: x = atan( tan(PI/2 - y) / cos(PhiD)) y = slope.x Replacing: x = atan( tan(PI/2 - slope.x) / cos(PhiD) ) Tanning: tan(x) = tan(PI/2 - slope.x) / cos(PhiD) Or: tan(x).tan(slope.x) = 1 / cos(PhiD) We know "slope" and "PhiD", we need solve to find x which is the ThetaH at which the intersection occurs...

WarpSlice ( int _ThetaHIndex, int _ThetaDIndex, double _Warp, Vector3 &_Result ) : void
WarpSlice_Compress ( int _ThetaHIndex, int _ThetaDIndex, double _Warp, Vector3 &_Result ) : void

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

Метод Описание
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

buttonRebuild_Click ( object sender, EventArgs e ) : void
checkBoxDifferences_CheckedChanged ( object sender, EventArgs e ) : void
checkBoxShowIsolines_CheckedChanged ( object sender, EventArgs e ) : void
checkBoxUseWarping_CheckedChanged ( object sender, EventArgs e ) : void
floatTrackbarControlExposure_ValueChanged ( Nuaj _Sender, float _fFormerValue ) : void
floatTrackbarControlGamma_ValueChanged ( Nuaj _Sender, float _fFormerValue ) : void
floatTrackbarControlScaleFactor_ValueChanged ( Nuaj _Sender, float _fFormerValue ) : void
floatTrackbarControlWarpFactor_ValueChanged ( Nuaj _Sender, float _fFormerValue ) : void
integerTrackbarControlPhiD_ValueChanged ( Nuaj _Sender, int _FormerValue ) : void

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

BuildScaleTable() защищенный Метод

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

ComputeScaleFactor() защищенный Метод

protected ComputeScaleFactor ( double _ThetaH, double _ThetaD, double _PhiD ) : double
_ThetaH double
_ThetaD double
_PhiD double
Результат double

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

public DisplayForm ( Vector3 _BRDF ) : System
_BRDF Vector3
Результат System

Dispose() защищенный Метод

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
Результат void

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

Loads a MERL BRDF file
public static LoadBRDF ( FileInfo _BRDFFile ) : BRDFSlices.Vector3[
_BRDFFile FileInfo
Результат BRDFSlices.Vector3[

LoadBRDFBisou() защищенный Метод

Loads a MERL BRDF file
protected LoadBRDFBisou ( FileInfo _BRDFFile ) : double[][]
_BRDFFile FileInfo
Результат double[][]

LoadScaleTable() защищенный Метод

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

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

Given a pair of incoming/outgoing angles, look up the BRDF.
public static LookupBRDF ( Vector3 _BRDF, double _ThetaIn, double _PhiIn, double _ThetaOut, double _PhiOut, Vector3 &_Result ) : void
_BRDF Vector3
_ThetaIn double
_PhiIn double
_ThetaOut double
_PhiOut double
_Result Vector3
Результат void

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

public static LookupBRDFTrilinear ( Vector3 _BRDF, double _ThetaHalf, double _ThetaDiff, double _PhiDiff, Vector3 &_Result ) : void
_BRDF Vector3
_ThetaHalf double
_ThetaDiff double
_PhiDiff double
_Result Vector3
Результат void

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

public static PhiDiff_index ( double _PhiDiff, double &_Interpolant ) : int
_PhiDiff double
_Interpolant double
Результат int

Redraw() защищенный Метод

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

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

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

SaveAllSlices_BUGGED() защищенный Метод

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

SolveNewton() защищенный Метод

Numerically computes the intersection of a straight line with a strange curve we know the equation of... We're using the http://en.wikipedia.org/wiki/Newton's_method The computation is occurring in [ThetaH,ThetaD] space: ^ ThetaD | PI/2 +----------/-----+ ThetaH PI/2 We're looking for intersection point o given 2 values: the slope of the straight line and PhiD that guides the curvature of the strange curve C(y) The position of a point P on the line is given by P(x)=[x,slope.x] (we know the slope) we find o so that o = P(x) = C(y) So we can write: x = atan( tan(PI/2 - y) / cos(PhiD)) y = slope.x Replacing: x = atan( tan(PI/2 - slope.x) / cos(PhiD) ) Tanning: tan(x) = tan(PI/2 - slope.x) / cos(PhiD) Or: tan(x).tan(slope.x) = 1 / cos(PhiD) We know "slope" and "PhiD", we need solve to find x which is the ThetaH at which the intersection occurs...
protected SolveNewton ( double a, double b, int &_IterationsCount ) : double
a double
b double
_IterationsCount int
Результат double

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

public static ThetaDiff_index ( double _ThetaDiff, double &_Interpolant ) : int
_ThetaDiff double
_Interpolant double
Результат int

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

public static ThetaHalf_index ( double _ThetaHalf, double &_Interpolant ) : int
_ThetaHalf double
_Interpolant double
Результат int

WarpSlice() защищенный Метод

protected WarpSlice ( int _ThetaHIndex, int _ThetaDIndex, double _Warp, Vector3 &_Result ) : void
_ThetaHIndex int
_ThetaDIndex int
_Warp double
_Result Vector3
Результат void

WarpSlice_Compress() защищенный Метод

protected WarpSlice_Compress ( int _ThetaHIndex, int _ThetaDIndex, double _Warp, Vector3 &_Result ) : void
_ThetaHIndex int
_ThetaDIndex int
_Warp double
_Result Vector3
Результат void

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

public static half_diff_coords_to_std_coords ( double _ThetaHalf, double _PhiHalf, double _ThetaDiff, double _PhiDiff, Vector3 &_In, Vector3 &_Out ) : void
_ThetaHalf double
_PhiHalf double
_ThetaDiff double
_PhiDiff double
_In Vector3
_Out Vector3
Результат void

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

public static half_diff_coords_to_std_coords ( double _ThetaHalf, double _PhiHalf, double _ThetaDiff, double _PhiDiff, double &_ThetaIn, double &_PhiIn, double &_ThetaOut, double &_PhiOut ) : void
_ThetaHalf double
_PhiHalf double
_ThetaDiff double
_PhiDiff double
_ThetaIn double
_PhiIn double
_ThetaOut double
_PhiOut double
Результат void

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

public static std_coords_to_half_diff_coords ( double _ThetaIn, double _PhiIn, double _ThetaOut, double _PhiOut, double &_ThetaHalf, double &_PhiHalf, double &_ThetaDiff, double &_PhiDiff ) : void
_ThetaIn double
_PhiIn double
_ThetaOut double
_PhiOut double
_ThetaHalf double
_PhiHalf double
_ThetaDiff double
_PhiDiff double
Результат void

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

m_BRDF защищенное свойство

protected Vector3[,BRDFSlices m_BRDF
Результат BRDFSlices.Vector3[

m_Intersections защищенное свойство

protected double[,] m_Intersections
Результат ].double[

m_Pen защищенное свойство

protected Pen m_Pen
Результат Pen

m_Slice защищенное свойство

protected Bitmap m_Slice
Результат Bitmap