# class RemeshingLegacyPipeline

RemeshingLegacyPipeline provides a pipeline for a single remeshing legacy processor to be applied on the input scene.

# Methods

Method Description
AddCascadedPipeline Add a cascaded child pipeline. The child pipeline will execute on the scene output from this pipeline.
AddMaterialCaster Add a material caster. Material casting requires the mapping image generation to be enabled (SetGenerateMappingImage in MappingImageSettings returned by GetMappingImageSettings). If called with a material index set to non-zero, the mapping image for the corresponding output material will be used. See GetOutputMaterialCount/SetOutputMaterialCount in MappingImageSettings.
AddMaterialCasterByType Add a material caster by type name. Type name should undecorated base name of caster, for example "Color", "AmbientOcclusion", "Normal" etc. Material casting requires the mapping image generation to be enabled (SetGenerateMappingImage in MappingImageSettings returned by GetMappingImageSettings). If called with a material index set to non-zero, the mapping image for the corresponding output material will be used. See GetOutputMaterialCount/SetOutputMaterialCount in MappingImageSettings.
GetActiveSelectionSets Get the names of all currently active selection sets used by this pipeline, based on the current settings
GetBoneSettings The bone settings object containing the bone settings for this pipeline.
GetBoolParameter Get a named parameter boolean value including parameter path.
GetCascadedPipelineByIndex The cascaded child pipeline object for the given index.
GetCascadedPipelineCount Get number of cascaded child pipelines.
GetClass Get the name of the RemeshingLegacyPipeline class.
GetDoubleParameter Get a named parameter floating point value including parameter path.
GetEnumParameter Get a named parameter enum value as int including parameter path.
GetIntParameter Get a named parameter integer value including parameter path.
GetMappingImage The mapping image from the performed remeshing. Should only be called after the pipeline has been run. The return value will be null if the pipeline does not use material casting and mapping images.
GetMappingImageSettings The mapping image settings object containing the mapping image settings for this pipeline. The return value will be null if the pipeline does not use material casting and mapping images.
GetMaterialCasterByIndex Get the material caster in the pipeline for the given index, which must be less than the material caster count.
GetMaterialCasterCount Get the number of material casters for the pipeline.
GetMaterialCasters The material casters for the pipeline.
GetParameterType Get a named parameter data type including parameter path.
GetPercentDone Returns the current progress of the pipeline as a value between 0 and 100.
GetPipelineSettings The settings for the pipeline.
GetProcessedScene The resulting scene from the last execution of this pipeline.
GetRemeshingLegacySettings The remeshing settings object containing the remeshing settings for this pipeline.
GetStringParameter Get a named parameter string value including parameter path.
GetUIntParameter Get a named parameter unsigned integer value including parameter path.
GetVisibilitySettings The visibility settings object containing the visibility settings for this pipeline.
IsA Returns true if RemeshingLegacyPipeline is a or is a descendant of the class named as the type parameter.
IsNull Returns true if the RemeshingLegacyPipeline object is invalid.
RemoveCascadedPipeline Remove a cascaded child pipeline.
RunScene Run the pipeline on the given scene, which will be modifed and contain the result of the pipeline when the function returns. Please note that internal refrences might be modified by the pipeline. The caller should refresh any reference that is cached outside the scene after running the pipeline.
RunSceneFromFile Run the pipeline on the scene loaded from the given input scene file, and optionally write the resulting scene to the given output scene file. If the scene is not written to file it can be accessed with the GetProcessedScene method. When using cascaded pipelines with RunSceneFromFile and the output file format does not support cascaded scenes (OBJ, FBX, glTF), only the scene from the first top level pipeline is exported to the output file.
SetBoolParameter Set a named parameter boolean value including parameter path.
SetDoubleParameter Set a named parameter floating point value including parameter path.
SetEnumParameter Set a named parameter enum value including parameter path.
SetIntParameter Set a named parameter integer value including parameter path.
SetParameterFromString Set a named parameter value including parameter path. The string will be parsed with best effort according to the parameter data type.
SetStringParameter Set a named parameter string value including parameter path.
SetUIntParameter Set a named parameter unsigned integer value including parameter path.

# 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 spRemeshingLegacyPipeline, and if this is the case, returns the object cast into spRemeshingLegacyPipeline.

# Methods details

# AddCascadedPipeline

Add a cascaded child pipeline. The child pipeline will execute on the scene output from this pipeline.

# Syntax

void AddCascadedPipeline( spPipeline pipeline );

# Parameters

Type Name Min Max Description
Pipeline pipeline The pipeline to add as a cascaded child pipeline.

# AddMaterialCaster

Add a material caster. Material casting requires the mapping image generation to be enabled (SetGenerateMappingImage in MappingImageSettings returned by GetMappingImageSettings). If called with a material index set to non-zero, the mapping image for the corresponding output material will be used. See GetOutputMaterialCount/SetOutputMaterialCount in MappingImageSettings.

# Syntax

void AddMaterialCaster( spMaterialCaster MaterialCaster , unsigned int MaterialIndex );

# Parameters

Type Name Min Max Description
MaterialCaster MaterialCaster The material caster to add.
unsigned int MaterialIndex The material index the caster will be associated with, 0 for first material.

# AddMaterialCasterByType

Add a material caster by type name. Type name should undecorated base name of caster, for example "Color", "AmbientOcclusion", "Normal" etc. Material casting requires the mapping image generation to be enabled (SetGenerateMappingImage in MappingImageSettings returned by GetMappingImageSettings). If called with a material index set to non-zero, the mapping image for the corresponding output material will be used. See GetOutputMaterialCount/SetOutputMaterialCount in MappingImageSettings.

# Syntax

spMaterialCaster AddMaterialCasterByType( const char * CasterType , unsigned int MaterialIndex );

# Parameters

Type Name Min Max Description
const char * CasterType Caster type name, like "Color", "AmbientOcclusion", "Normal" or similar.
unsigned int MaterialIndex The material index the caster will be associated with, 0 for first material.

# Return value

Type: MaterialCaster

# GetActiveSelectionSets

Get the names of all currently active selection sets used by this pipeline, based on the current settings

# Syntax

void GetActiveSelectionSets( spStringArray sets );

# Parameters

Type Name Min Max Description
StringArray sets The array recieving unique names of all selection sets being used by this pipeline.

# GetBoneSettings

The bone settings object containing the bone settings for this pipeline.

# Syntax

spBoneSettings GetBoneSettings();

# Parameters

GetBoneSettings takes no parameters.

# Return value

Type: BoneSettings

# GetBoolParameter

Get a named parameter boolean value including parameter path.

# Syntax

bool GetBoolParameter( const char * name );

# Parameters

Type Name Min Max Description
const char * name Parameter path separated with forward slash, like "/RemeshingProcessor/Reduction/MergeGeometries".

# Return value

Type: bool

# GetCascadedPipelineByIndex

The cascaded child pipeline object for the given index.

# Syntax

spPipeline GetCascadedPipelineByIndex( unsigned int index );

# Parameters

Type Name Min Max Description
unsigned int index The index of the cascaded child pipeline.

# Return value

Type: Pipeline

# GetCascadedPipelineCount

Get number of cascaded child pipelines.

# Syntax

unsigned int GetCascadedPipelineCount();

# Parameters

GetCascadedPipelineCount takes no parameters.

# Return value

Type: unsigned int

# GetClass

Get the name of the RemeshingLegacyPipeline class.

# Syntax

spString GetClass();

# Parameters

GetClass takes no parameters.

# Return value

Type: spString

# GetDoubleParameter

Get a named parameter floating point value including parameter path.

# Syntax

double GetDoubleParameter( const char * name );

# Parameters

Type Name Min Max Description
const char * name Parameter path separated with forward slash, like "/RemeshingProcessor/Reduction/MergeGeometries".

# Return value

Type: double

# GetEnumParameter

Get a named parameter enum value as int including parameter path.

# Syntax

int GetEnumParameter( const char * name );

# Parameters

Type Name Min Max Description
const char * name Parameter path separated with forward slash, like "/RemeshingProcessor/Reduction/MergeGeometries".

# Return value

Type: int

# GetIntParameter

Get a named parameter integer value including parameter path.

# Syntax

int GetIntParameter( const char * name );

# Parameters

Type Name Min Max Description
const char * name Parameter path separated with forward slash, like "/RemeshingProcessor/Reduction/MergeGeometries".

# Return value

Type: int

# GetMappingImage

The mapping image from the performed remeshing. Should only be called after the pipeline has been run. The return value will be null if the pipeline does not use material casting and mapping images.

# Syntax

spMappingImage GetMappingImage( unsigned int materialIndex );

# Parameters

Type Name Min Max Description
unsigned int materialIndex The index of the output material to get the mapping image for.

# Return value

Type: MappingImage

# GetMappingImageSettings

The mapping image settings object containing the mapping image settings for this pipeline. The return value will be null if the pipeline does not use material casting and mapping images.

# Syntax

spMappingImageSettings GetMappingImageSettings();

# Parameters

GetMappingImageSettings takes no parameters.

# Return value

Type: MappingImageSettings

# GetMaterialCasterByIndex

Get the material caster in the pipeline for the given index, which must be less than the material caster count.

# Syntax

spMaterialCaster GetMaterialCasterByIndex( unsigned int index );

# Parameters

Type Name Min Max Description
unsigned int index 0 MaterialCasterCount Material caster index, must be less than the material caster count.

# Return value

Type: MaterialCaster

# GetMaterialCasterCount

Get the number of material casters for the pipeline.

# Syntax

unsigned int GetMaterialCasterCount();

# Parameters

GetMaterialCasterCount takes no parameters.

# Return value

Type: unsigned int

# GetMaterialCasters

The material casters for the pipeline.

# Syntax

spObjectCollection GetMaterialCasters();

# Parameters

GetMaterialCasters takes no parameters.

# Return value

Type: ObjectCollection

# GetParameterType

Get a named parameter data type including parameter path.

# Syntax

Simplygon::ESettingValueType GetParameterType( const char * name );

# Parameters

Type Name Min Max Description
const char * name Parameter path separated with forward slash, like "/RemeshingProcessor/Reduction/MergeGeometries".

# Return value

Type: ESettingValueType

Key Value Comment
Invalid 0 Invalid settings value type.
Bool 1 Bool settings type.
Int 2 Int settings type.
Uint 3 Unsigned int settings type.
Double 4 Double floating point settings type.
String 5 String settings type.
EPipelineRunMode 6 EPipelineRunMode settings type.
EChartAggregatorMode 8 EChartAggregatorMode settings type.
ETexcoordGeneratorType 9 ETexcoordGeneratorType settings type.
EOcclusionMode 10 EOcclusionMode settings type.
EStopCondition 11 EStopCondition settings type.
EDataCreationPreferences 12 EDataCreationPreferences settings type.
EReductionHeuristics 13 EReductionHeuristics settings type.
EWeightsFromColorMode 14 EWeightsFromColorMode settings type.
ESurfaceTransferMode 15 ESurfaceTransferMode settings type.
ERemeshingMode 16 ERemeshingMode settings type.
ETangentSpaceMethod 17 ETangentSpaceMethod settings type.
EGeometryDataFieldType 18 EGeometryDataFieldType settings type.
EAtlasFillMode 19 EAtlasFillMode settings type.
EDitherPatterns 20 EDitherPatterns settings type.
EComputeVisibilityMode 21 EComputeVisibilityMode settings type.
ESurfaceAreaScale 22 ESurfaceAreaScale settings type.
EImpostorType 23 EImpostorType settings type.
ESymmetryAxis 24 ESymmetryAxis settings type.
EPixelFormat 25 EPixelFormat settings type.
EColorComponent 26 EColorComponent settings type.
EHoleFilling 27 EHoleFilling settings type.
EImageInputFormat 28 EImageInputFormat settings type.
EImageOutputFormat 29 EImageOutputFormat settings type.
EDDSCompressionType 30 EDDSCompressionType settings type.
EBillboardMode 31 EBillboardMode settings type.
EOpacityType 32 EOpacityType settings type.

# GetPercentDone

Returns the current progress of the pipeline as a value between 0 and 100.

# Syntax

real GetPercentDone();

# Parameters

GetPercentDone takes no parameters.

# Return value

Type: real

# GetPipelineSettings

The settings for the pipeline.

# Syntax

spPipelineSettings GetPipelineSettings();

# Parameters

GetPipelineSettings takes no parameters.

# Return value

Type: PipelineSettings

# GetProcessedScene

The resulting scene from the last execution of this pipeline.

# Syntax

spScene GetProcessedScene();

# Parameters

GetProcessedScene takes no parameters.

# Return value

Type: Scene

# GetRemeshingLegacySettings

The remeshing settings object containing the remeshing settings for this pipeline.

# Syntax

spRemeshingLegacySettings GetRemeshingLegacySettings();

# Parameters

GetRemeshingLegacySettings takes no parameters.

# Return value

Type: RemeshingLegacySettings

# GetStringParameter

Get a named parameter string value including parameter path.

# Syntax

spString GetStringParameter( const char * name );

# Parameters

Type Name Min Max Description
const char * name Parameter path separated with forward slash, like "/RemeshingProcessor/Reduction/MergeGeometries".

# Return value

Type: spString

# GetUIntParameter

Get a named parameter unsigned integer value including parameter path.

# Syntax

unsigned int GetUIntParameter( const char * name );

# Parameters

Type Name Min Max Description
const char * name Parameter path separated with forward slash, like "/RemeshingProcessor/Reduction/MergeGeometries".

# Return value

Type: unsigned int

# GetVisibilitySettings

The visibility settings object containing the visibility settings for this pipeline.

# Syntax

spVisibilitySettings GetVisibilitySettings();

# Parameters

GetVisibilitySettings takes no parameters.

# Return value

Type: VisibilitySettings

# IsA

Returns true if RemeshingLegacyPipeline 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 RemeshingLegacyPipeline is, or is a descendant of.

# Return value

Type: bool

# IsNull

Returns true if the RemeshingLegacyPipeline object is invalid.

# Syntax

bool IsNull();

# Parameters

IsNull takes no parameters.

# Return value

Type: bool

# RemoveCascadedPipeline

Remove a cascaded child pipeline.

# Syntax

void RemoveCascadedPipeline( spPipeline pipeline );

# Parameters

Type Name Min Max Description
Pipeline pipeline The pipeline to remove from list of cascaded child pipelines.

# RunScene

Run the pipeline on the given scene, which will be modifed and contain the result of the pipeline when the function returns. Please note that internal refrences might be modified by the pipeline. The caller should refresh any reference that is cached outside the scene after running the pipeline.

# Syntax

void RunScene( spScene scene , Simplygon::EPipelineRunMode run_mode );

# Parameters

Type Name Min Max Description
Scene scene The scene to run the pipeline on.
EPipelineRunMode run_mode Pipeline run mode controlling if pipeline run in this or separate/distributed process. Valid values are the SG_PIPELINE_RUN* constants (from PipelineRunMode enum).

# RunSceneFromFile

Run the pipeline on the scene loaded from the given input scene file, and optionally write the resulting scene to the given output scene file. If the scene is not written to file it can be accessed with the GetProcessedScene method. When using cascaded pipelines with RunSceneFromFile and the output file format does not support cascaded scenes (OBJ, FBX, glTF), only the scene from the first top level pipeline is exported to the output file.

# Syntax

void RunSceneFromFile( const char * input_scene , const char * output_scene , Simplygon::EPipelineRunMode run_mode );

# Parameters

Type Name Min Max Description
const char * input_scene The file path of the input scene file.
const char * output_scene The file path of the output scene file (can be null)
EPipelineRunMode run_mode Pipeline run mode controlling if pipeline run in this or separate/distributed process. Valid values are the SG_PIPELINE_RUN* constants (from PipelineRunMode enum).

# SetBoolParameter

Set a named parameter boolean value including parameter path.

# Syntax

bool SetBoolParameter( const char * name , bool value );

# Parameters

Type Name Min Max Description
const char * name Parameter path separated with forward slash, like "/RemeshingProcessor/Reduction/MergeGeometries".
bool value New value for parameter.

# Return value

Type: bool

# SetDoubleParameter

Set a named parameter floating point value including parameter path.

# Syntax

bool SetDoubleParameter( const char * name , double value );

# Parameters

Type Name Min Max Description
const char * name Parameter path separated with forward slash, like "/RemeshingProcessor/Reduction/MergeGeometries".
double value New value for parameter.

# Return value

Type: bool

# SetEnumParameter

Set a named parameter enum value including parameter path.

# Syntax

bool SetEnumParameter( const char * name , int value , Simplygon::ESettingValueType valueEnumType );

# Parameters

Type Name Min Max Description
const char * name Parameter path separated with forward slash, like "/RemeshingProcessor/Reduction/MergeGeometries".
int value New value for parameter.
ESettingValueType valueEnumType Value type of enum for parameter value.

# Return value

Type: bool

# SetIntParameter

Set a named parameter integer value including parameter path.

# Syntax

bool SetIntParameter( const char * name , int value );

# Parameters

Type Name Min Max Description
const char * name Parameter path separated with forward slash, like "/RemeshingProcessor/Reduction/MergeGeometries".
int value New value for parameter.

# Return value

Type: bool

# SetParameterFromString

Set a named parameter value including parameter path. The string will be parsed with best effort according to the parameter data type.

# Syntax

bool SetParameterFromString( const char * name , const char * value );

# Parameters

Type Name Min Max Description
const char * name Parameter path separated with forward slash, like "/RemeshingProcessor/Reduction/MergeGeometries".
const char * value New value for parameter.

# Return value

Type: bool

# SetStringParameter

Set a named parameter string value including parameter path.

# Syntax

bool SetStringParameter( const char * name , const char * value );

# Parameters

Type Name Min Max Description
const char * name Parameter path separated with forward slash, like "/RemeshingProcessor/Reduction/MergeGeometries".
const char * value New value for parameter.

# Return value

Type: bool

# SetUIntParameter

Set a named parameter unsigned integer value including parameter path.

# Syntax

bool SetUIntParameter( const char * name , unsigned int value );

# Parameters

Type Name Min Max Description
const char * name Parameter path separated with forward slash, like "/RemeshingProcessor/Reduction/MergeGeometries".
unsigned int value New value for parameter.

# Return value

Type: bool

# 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 spRemeshingLegacyPipeline, and if this is the case, returns the object cast into spRemeshingLegacyPipeline.

# Syntax

static spRemeshingLegacyPipeline SafeCast( spObject object );

# Parameters

Type Name Min Max Description
Object object Object to cast.

# Return value

Type: RemeshingLegacyPipeline