# class Parameterizer

Computes texture coordinates for arbitrary geometry.

# Properties

Property Description
AutomaticTextureSizeMultiplier Set/Get a texture dimension length multiplier for the automatic texture size.
FeatureFlagsMask The FeatureFlagsMask. Any edge that has one of the flags present as a feature edge, will have the edge forced as a parameterization feature.
ForcePower2Texture If automatic_texture_size is enabled, then force the texture sizes to be a power of 2.
GutterSpace The minimum number of pixels between charts for mapping image index 0. Use SetGutterSpaceForImageIndex to set for another mapping image index.
InputMaterialCount The number of input materials used in the original geometry for mapping to multiple output materials. This needs to be set before you can set any specific in-out material mapping. 0 signifies that no in-out material mapping is used, ie. the process will produce one resulting mapping image.
LargeChartsImportance Only used when computing new UVs. The importance value for trying to have as large and few charts as possible. The closer the value is to 1, the slower it is. Having 0 means no extra focus will be put on reducing the number of charts. Having value 1 means maximum focus will be put on reducing the number of charts and thereby increasing the size of the charts.
MaxStretch The maximum allowed texture stretch. Range 0->1.
OutputMaterialCount The number of output mapping images that are to be generated. Setup the mapping between input and output materials with SetInputOutputMaterialMapping.
TextureHeight The height of the texture to use for mapping image index 0. Use SetTextureHeightForImageIndex to set for another mapping image index.
TextureWidth The width of the texture to use for mapping image index 0. Use SetTextureWidthForImageIndex to set for another mapping image index.
UseAutomaticTextureSize The automatic_texture_size flag. If true, then texture sizes will be computed for the reduced mesh depending on its pixel size on screen.
UseVertexWeights If UseVertexWeights is enabled, the weights help determine the UV charts and their UV area.
UseVisibilityWeights If UseVisibilityWeights is enabled, the weights help determine the UV charts and their UV area.

# Methods

Method Description
GetClass Get the name of the Parameterizer class.
GetGutterSpaceForImageIndex The minimum number of pixels between charts.
GetInputOutputMaterialMapping The previously set material mapping for mat_id.
GetTextureHeightForImageIndex The height of the texture to use.
GetTextureWidthForImageIndex The width of the texture to use.
IsA Returns true if Parameterizer is a or is a descendant of the class named as the type parameter.
IsNull Returns true if the Parameterizer object is invalid.
Parameterize Executes the parameterization of the geometry.
SetGutterSpaceForImageIndex The minimum number of pixels between charts.
SetInputOutputMaterialMapping The material mapping for InMaterialId, meaning what material of the generated LOD InMaterialId will be baked into. Both InputMaterialCount and OutputMaterialCount need to be set for this mapping to work, and all original materials need to be mapped to an existing output id.
SetTextureHeightForImageIndex The height of the texture to use.
SetTextureWidthForImageIndex The width of the texture to use.

# Static methods

Method Description
IsClassA Returns true if the class is a or is a descendant of the class named as the type parameter.
SafeCast SafeCast makes sure the input object is of a class that can be cast into spParameterizer, and if this is the case, returns the object cast into spParameterizer.

# Properties details

# AutomaticTextureSizeMultiplier

Set/Get a texture dimension length multiplier for the automatic texture size.

# Syntax

// Setter
void SetAutomaticTextureSizeMultiplier( real value );

// Getter
real GetAutomaticTextureSizeMultiplier();

# SetAutomaticTextureSizeMultiplier parameters

Type Name Min Max Description
real value The desired multiplier.

# GetAutomaticTextureSizeMultiplier return value

Type: real

# FeatureFlagsMask

The FeatureFlagsMask. Any edge that has one of the flags present as a feature edge, will have the edge forced as a parameterization feature.

# Syntax

// Setter
void SetFeatureFlagsMask( unsigned int value );

// Getter
unsigned int GetFeatureFlagsMask();

# SetFeatureFlagsMask parameters

Type Name Min Max Description
unsigned int value The mask to which FeatureFlagsMask will be set.

# GetFeatureFlagsMask return value

Type: unsigned int

# ForcePower2Texture

If automatic_texture_size is enabled, then force the texture sizes to be a power of 2.

# Syntax

// Setter
void SetForcePower2Texture( bool value );

// Getter
bool GetForcePower2Texture();

# SetForcePower2Texture parameters

Type Name Min Max Description
bool value The desired flag.

# GetForcePower2Texture return value

Type: bool

# GutterSpace

The minimum number of pixels between charts for mapping image index 0. Use SetGutterSpaceForImageIndex to set for another mapping image index.

# Syntax

// Setter
void SetGutterSpace( unsigned int value );

// Getter
unsigned int GetGutterSpace();

# SetGutterSpace parameters

Type Name Min Max Description
unsigned int value The desired value to which GutterSpace will be set.

# GetGutterSpace return value

Type: unsigned int

# InputMaterialCount

The number of input materials used in the original geometry for mapping to multiple output materials. This needs to be set before you can set any specific in-out material mapping. 0 signifies that no in-out material mapping is used, ie. the process will produce one resulting mapping image.

# Syntax

// Setter
void SetInputMaterialCount( unsigned int value );

// Getter
unsigned int GetInputMaterialCount();

# SetInputMaterialCount parameters

Type Name Min Max Description
unsigned int value The number of outputs.

# GetInputMaterialCount return value

Type: unsigned int

# LargeChartsImportance

Only used when computing new UVs. The importance value for trying to have as large and few charts as possible. The closer the value is to 1, the slower it is. Having 0 means no extra focus will be put on reducing the number of charts. Having value 1 means maximum focus will be put on reducing the number of charts and thereby increasing the size of the charts.

# Syntax

// Setter
void SetLargeChartsImportance( real value );

// Getter
real GetLargeChartsImportance();

# SetLargeChartsImportance parameters

Type Name Min Max Description
real value 0 1 The desired large charts importance value.

# GetLargeChartsImportance return value

Type: real

# MaxStretch

The maximum allowed texture stretch. Range 0->1.

# Syntax

// Setter
void SetMaxStretch( real value );

// Getter
real GetMaxStretch();

# SetMaxStretch parameters

Type Name Min Max Description
real value 0 1 The desired value to which MaxStretch will be set.

# GetMaxStretch return value

Type: real

# OutputMaterialCount

The number of output mapping images that are to be generated. Setup the mapping between input and output materials with SetInputOutputMaterialMapping.

# Syntax

// Setter
void SetOutputMaterialCount( unsigned int value );

// Getter
unsigned int GetOutputMaterialCount();

# SetOutputMaterialCount parameters

Type Name Min Max Description
unsigned int value 1 SG_MAXIMUM_PARAMETERIZER_OUTPUT_MATERIAL_COUNT The number of outputs.

# GetOutputMaterialCount return value

Type: unsigned int

# TextureHeight

The height of the texture to use for mapping image index 0. Use SetTextureHeightForImageIndex to set for another mapping image index.

# Syntax

// Setter
void SetTextureHeight( unsigned int value );

// Getter
unsigned int GetTextureHeight();

# SetTextureHeight parameters

Type Name Min Max Description
unsigned int value The new output texture height.

# GetTextureHeight return value

Type: unsigned int

# TextureWidth

The width of the texture to use for mapping image index 0. Use SetTextureWidthForImageIndex to set for another mapping image index.

# Syntax

// Setter
void SetTextureWidth( unsigned int value );

// Getter
unsigned int GetTextureWidth();

# SetTextureWidth parameters

Type Name Min Max Description
unsigned int value The texture width.

# GetTextureWidth return value

Type: unsigned int

# UseAutomaticTextureSize

The automatic_texture_size flag. If true, then texture sizes will be computed for the reduced mesh depending on its pixel size on screen.

# Syntax

// Setter
void SetUseAutomaticTextureSize( bool value );

// Getter
bool GetUseAutomaticTextureSize();

# SetUseAutomaticTextureSize parameters

Type Name Min Max Description
bool value The desired flag.

# GetUseAutomaticTextureSize return value

Type: bool

# UseVertexWeights

If UseVertexWeights is enabled, the weights help determine the UV charts and their UV area.

# Syntax

// Setter
void SetUseVertexWeights( bool value );

// Getter
bool GetUseVertexWeights();

# SetUseVertexWeights parameters

Type Name Min Max Description
bool value The desired flag.

# GetUseVertexWeights return value

Type: bool

# UseVisibilityWeights

If UseVisibilityWeights is enabled, the weights help determine the UV charts and their UV area.

# Syntax

// Setter
void SetUseVisibilityWeights( bool value );

// Getter
bool GetUseVisibilityWeights();

# SetUseVisibilityWeights parameters

Type Name Min Max Description
bool value The desired flag.

# GetUseVisibilityWeights return value

Type: bool

# Methods details

# GetClass

Get the name of the Parameterizer class.

# Syntax

spString GetClass();

# Parameters

GetClass takes no parameters.

# Return value

Type: spString

# GetGutterSpaceForImageIndex

The minimum number of pixels between charts.

# Syntax

unsigned int GetGutterSpaceForImageIndex( unsigned int id );

# Parameters

Type Name Min Max Description
unsigned int id The output material id.

# Return value

Type: unsigned int

# GetInputOutputMaterialMapping

The previously set material mapping for mat_id.

# Syntax

int GetInputOutputMaterialMapping( unsigned int InMaterialId );

# Parameters

Type Name Min Max Description
unsigned int InMaterialId Is input material id.

# Return value

Type: int

# GetTextureHeightForImageIndex

The height of the texture to use.

# Syntax

unsigned int GetTextureHeightForImageIndex( unsigned int id );

# Parameters

Type Name Min Max Description
unsigned int id The output material id.

# Return value

Type: unsigned int

# GetTextureWidthForImageIndex

The width of the texture to use.

# Syntax

unsigned int GetTextureWidthForImageIndex( unsigned int id );

# Parameters

Type Name Min Max Description
unsigned int id The material id of the output material.

# Return value

Type: unsigned int

# IsA

Returns true if Parameterizer is a or is a descendant of the class named as the type parameter.

# Syntax

bool IsA( const char * type );

# Parameters

Type Name Min Max Description
const char * type Name of the class to check if Parameterizer is, or is a descendant of.

# Return value

Type: bool

# IsNull

Returns true if the Parameterizer object is invalid.

# Syntax

bool IsNull();

# Parameters

IsNull takes no parameters.

# Return value

Type: bool

# Parameterize

Executes the parameterization of the geometry.

# Syntax

bool Parameterize( spGeometryData geom , spRealArray arr );

# Parameters

Type Name Min Max Description
GeometryData geom The geometry which is to be parameterized.
RealArray arr Will contain the completed parameterization.

# Return value

Type: bool

# SetGutterSpaceForImageIndex

The minimum number of pixels between charts.

# Syntax

void SetGutterSpaceForImageIndex( unsigned int id , unsigned int value );

# Parameters

Type Name Min Max Description
unsigned int id The output material id.
unsigned int value The desired value to which GutterSpace will be set.

# SetInputOutputMaterialMapping

The material mapping for InMaterialId, meaning what material of the generated LOD InMaterialId will be baked into. Both InputMaterialCount and OutputMaterialCount need to be set for this mapping to work, and all original materials need to be mapped to an existing output id.

# Syntax

void SetInputOutputMaterialMapping( unsigned int InMaterialId , int OutMaterialId );

# Parameters

Type Name Min Max Description
unsigned int InMaterialId Is input material id.
int OutMaterialId The output material id.

# SetTextureHeightForImageIndex

The height of the texture to use.

# Syntax

void SetTextureHeightForImageIndex( unsigned int id , unsigned int value );

# Parameters

Type Name Min Max Description
unsigned int id The output material id.
unsigned int value The new output texture height.

# SetTextureWidthForImageIndex

The width of the texture to use.

# Syntax

void SetTextureWidthForImageIndex( unsigned int id , unsigned int value );

# Parameters

Type Name Min Max Description
unsigned int id The output material index.
unsigned int value The new output texture width.

# Static methods details

# IsClassA

Returns true if the class is a or is a descendant of the class named as the type parameter.

# Syntax

static bool IsClassA( const char * type );

# Parameters

Type Name Min Max Description
const char * type Name of the class to check if the class is, or is a descendant of.

# Return value

Type: bool

# SafeCast

SafeCast makes sure the input object is of a class that can be cast into spParameterizer, and if this is the case, returns the object cast into spParameterizer.

# Syntax

static spParameterizer SafeCast( spObject object );

# Parameters

Type Name Min Max Description
Object object Object to cast.

# Return value

Type: Parameterizer