C# Class StandardizedDiffuseAlbedoMaps.CalibratedTexture

This class hosts calibrated texture & swatches infos
Inheritance: IDisposable
Mostrar archivo Open project: Patapom/GodComplex Class Usage Examples

Public Methods

Method Description
BuildCustomSwatches ( ImageUtility _CustomSwatchSamplingLocations ) : void

Builds the custom swatches

CalibratedTexture ( ) : System
Capture ( ImageUtility _Source, CameraCalibrationDatabase _Database, CaptureParms _Parms ) : void

Captures the calibrated texture

ComputeAverageSwatchColor ( ImageUtility _TopLeft, ImageUtility _BottomRight ) : ImageUtility.float3

Computes the average color within a rectangle in UV space

Dispose ( ) : void
SavePack ( System _FileName, TARGET_FORMAT _TargetFormat ) : void

Saves the texture pack (texture + swatches + xml manifest)

Private Methods

Method Description
AppendElement ( XmlNode _ParentNode, string _ElementName ) : XmlElement
BuildSwatch ( int _Width, int _Height, ImageUtility _xyY ) : ImageUtility.Bitmap

Builds a swatch bitmap

ComputeMean ( ImageUtility _Values ) : ImageUtility.float3

Computes the statistical mean of the values

ComputeMode ( ImageUtility _Values ) : ImageUtility.float3

Computes the statistical mode of the values

InsertMinMax ( ImageUtility v, ImageUtility _Min, ImageUtility _Max, int _Length ) : void
SaveImage ( ImageUtility _Texture, System _FileName, ImageUtility _FileType, ImageUtility _Format ) : void

Saves a texture to disk

SetAttribute ( XmlElement _Element, string _Attribute, string _Value ) : CalibratedTexture
SetAttribute ( string _Attribute, string _Value ) : CalibratedTexture

Method Details

BuildCustomSwatches() public method

Builds the custom swatches
public BuildCustomSwatches ( ImageUtility _CustomSwatchSamplingLocations ) : void
_CustomSwatchSamplingLocations ImageUtility In UV space. XY=Top Left corner, ZW=Bottom Right corner
return void

CalibratedTexture() public method

public CalibratedTexture ( ) : System
return System

Capture() public method

Captures the calibrated texture
public Capture ( ImageUtility _Source, CameraCalibrationDatabase _Database, CaptureParms _Parms ) : void
_Source ImageUtility The source image to capture
_Database CameraCalibrationDatabase Database to perform proper calibration
_Parms CaptureParms Parameters for the capture
return void

ComputeAverageSwatchColor() public method

Computes the average color within a rectangle in UV space
public ComputeAverageSwatchColor ( ImageUtility _TopLeft, ImageUtility _BottomRight ) : ImageUtility.float3
_TopLeft ImageUtility The top left corner (in UV space) of the rectangle to sample
_BottomRight ImageUtility The bottom right corner (in UV space) of the rectangle to sample
return ImageUtility.float3

Dispose() public method

public Dispose ( ) : void
return void

SavePack() public method

Saves the texture pack (texture + swatches + xml manifest)
public SavePack ( System _FileName, TARGET_FORMAT _TargetFormat ) : void
_FileName System
_TargetFormat TARGET_FORMAT
return void