Skip to content

class AggregationProcessor

AggregationProcessor combines all specified geometries in the scene into one geometry. All materials are combined and receive a new shared texture atlas.

Properties

PropertyDescription
NameThe name of the AggregationProcessor object. (Inherited from Object)
SceneThe scene that will be aggregated. Please note that internal references might be modified by the processor. The caller should refresh any reference that is cached outside the scene after running the processor.

Methods

MethodDescription
AddObserverAdds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
ClearClear all internal states of the object. This will NOT clear the parameters set in the object. (Inherited from ProcessingObject)
GetAggregationSettingsThe settings for the combining process.
GetAttributeTessellationSettingsThe settings for handling attribute tessellation of the output geometry.
GetClassGet the name of the AggregationProcessor class. (Inherited from Object)
GetGeometryCullingSettingsThe settings for handling geometry culling.
GetMappingImageThe MappingImage object that is generated if MappingImageSettings::GenerateMappingImage is set. This returns mapping image index 0, use GetMappingImageForImageIndex to retrieve for a specific index. A new object is generated for each call to RunProcessing().
GetMappingImageForImageIndexThe MappingImage object that is generated if MappingImageSettings::GenerateMappingImage is set. Called with an id, it will fetch that specific mapping image if using multi-material output. A new object is generated for each call to RunProcessing().
GetMappingImageSettingsThe settings for the image mapping process.
GetPercentDoneReturns the current progress of the processing as a value between 0 and 100. (Inherited from ProcessingObject)
GetVertexWeightSettingsThe settings for handling visibility weights.
GetVisibilitySettingsThe settings for handling visibility weights. Visibility settings contains the parameters for how to compute the visibility of a scene and how to use it.
IsAReturns true if AggregationProcessor is a or is a descendant of the class named as the type parameter. (Inherited from Object)
IsNullReturns true if the AggregationProcessor object is invalid. (Inherited from Object)
IsSameObjectAsReturns true if the AggregationProcessor object is valid. (Inherited from Object)
NonNullReturns true if the AggregationProcessor object is valid. (Inherited from Object)
PrintInfoPrints the content/info of the AggregationProcessor object to the log. (Inherited from Object)
RemoveObserverRemoves a previously added observer object. (Inherited from Object)
RunProcessingRuns the processing the object is designed for. If the process succeeds, the return value is NoError. If the process fails, and the error is recoverable, an error code is returned. (Inherited from ProcessingObject)
ToJSONGet settings as JSON for debugging purposes. (Inherited from ProcessingObject)

Static methods

MethodDescription
IsClassAReturns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)
SafeCastSafeCast makes sure the input object is of a class that can be cast into spAggregationProcessor, and if this is the case, returns the object cast into spAggregationProcessor. (Inherited from Object)

Properties details

Name

The name of the AggregationProcessor object. (Inherited from Object)

Syntax

cpp
// Setter
void SetName( const char * name ) const;

// Getter
spString GetName() const;

SetName parameters

TypeNameMinMaxDescription
const char *nameNew name of the object.

GetName return value

Type: spString

Scene

The scene that will be aggregated. Please note that internal references might be modified by the processor. The caller should refresh any reference that is cached outside the scene after running the processor.

Syntax

cpp
// Setter
void SetScene( const spScene & value ) const;

// Getter
spScene GetScene() const;

SetScene parameters

TypeNameMinMaxDescription
ScenevalueThe scene to process.

GetScene return value

Type: Scene

Methods details

AddObserver

Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)

Syntax

cpp
rid AddObserver( const spObserver & observer ) const;

Parameters

TypeNameMinMaxDescription
ObserverobserverObserver is the object that will receive events.

Return value

Type: rid

Clear

Clear all internal states of the object. This will NOT clear the parameters set in the object.

Syntax

cpp
void Clear() const;

Parameters

Clear takes no parameters.

GetAggregationSettings

The settings for the combining process.

Syntax

cpp
spAggregationSettings GetAggregationSettings() const;

Parameters

GetAggregationSettings takes no parameters.

Return value

Type: AggregationSettings

GetAttributeTessellationSettings

The settings for handling attribute tessellation of the output geometry.

Syntax

cpp
spAttributeTessellationSettings GetAttributeTessellationSettings() const;

Parameters

GetAttributeTessellationSettings takes no parameters.

Return value

Type: AttributeTessellationSettings

GetClass

Get the name of the AggregationProcessor class. (Inherited from Object)

Syntax

cpp
spString GetClass() const;

Parameters

GetClass takes no parameters.

Return value

Type: spString

GetGeometryCullingSettings

The settings for handling geometry culling.

Syntax

cpp
spGeometryCullingSettings GetGeometryCullingSettings() const;

Parameters

GetGeometryCullingSettings takes no parameters.

Return value

Type: GeometryCullingSettings

GetMappingImage

The MappingImage object that is generated if MappingImageSettings::GenerateMappingImage is set. This returns mapping image index 0, use GetMappingImageForImageIndex to retrieve for a specific index. A new object is generated for each call to RunProcessing().

Syntax

cpp
spMappingImage GetMappingImage() const;

Parameters

GetMappingImage takes no parameters.

Return value

Type: MappingImage

GetMappingImageForImageIndex

The MappingImage object that is generated if MappingImageSettings::GenerateMappingImage is set. Called with an id, it will fetch that specific mapping image if using multi-material output. A new object is generated for each call to RunProcessing().

Syntax

cpp
spMappingImage GetMappingImageForImageIndex( rid outputMaterialId ) const;

Parameters

TypeNameMinMaxDescription
ridoutputMaterialIdThe value for the outputMaterialId.

Return value

Type: MappingImage

GetMappingImageSettings

The settings for the image mapping process.

Syntax

cpp
spMappingImageSettings GetMappingImageSettings() const;

Parameters

GetMappingImageSettings takes no parameters.

Return value

Type: MappingImageSettings

GetPercentDone

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

Syntax

cpp
real GetPercentDone() const;

Parameters

GetPercentDone takes no parameters.

Return value

Type: real

GetVertexWeightSettings

The settings for handling visibility weights.

Syntax

cpp
spVertexWeightSettings GetVertexWeightSettings() const;

Parameters

GetVertexWeightSettings takes no parameters.

Return value

Type: VertexWeightSettings

GetVisibilitySettings

The settings for handling visibility weights. Visibility settings contains the parameters for how to compute the visibility of a scene and how to use it.

Syntax

cpp
spVisibilitySettings GetVisibilitySettings() const;

Parameters

GetVisibilitySettings takes no parameters.

Return value

Type: VisibilitySettings

IsA

Returns true if AggregationProcessor is a or is a descendant of the class named as the type parameter. (Inherited from Object)

Syntax

cpp
bool IsA( const char * type ) const;

Parameters

TypeNameMinMaxDescription
const char *typeName of the class to check if AggregationProcessor is, or is a descendant of.

Return value

Type: bool

IsNull

Returns true if the AggregationProcessor object is invalid. (Inherited from Object)

Syntax

cpp
bool IsNull() const;

Parameters

IsNull takes no parameters.

Return value

Type: bool

IsSameObjectAs

Returns true if the AggregationProcessor object is valid. (Inherited from Object)

Syntax

cpp
bool IsSameObjectAs( const spObject & object ) const;

Parameters

TypeNameMinMaxDescription
ObjectobjectObject to compare with.

Return value

Type: bool

NonNull

Returns true if the AggregationProcessor object is valid. (Inherited from Object)

Syntax

cpp
bool NonNull() const;

Parameters

NonNull takes no parameters.

Return value

Type: bool

PrintInfo

Prints the content/info of the AggregationProcessor object to the log. (Inherited from Object)

Syntax

cpp
void PrintInfo() const;

Parameters

PrintInfo takes no parameters.

RemoveObserver

Removes a previously added observer object. (Inherited from Object)

Syntax

cpp
void RemoveObserver( rid observerId ) const;

Parameters

TypeNameMinMaxDescription
ridobserverIdObserverId is the id returned by AddObserver when the observer was added.

RunProcessing

Runs the processing the object is designed for. If the process succeeds, the return value is NoError. If the process fails, and the error is recoverable, an error code is returned.

Syntax

cpp
Simplygon::EErrorCodes RunProcessing() const;

Parameters

RunProcessing takes no parameters.

Return value

Type: EErrorCodes

KeyValueComment
NoError0No error, the initialization or process has finished, and with no errors
NoLicense-1no license was found (or licence expired)
NotInitialized-2the SDK is not initialized, or no process object has been loaded/created
AlreadyInitialized-3the SDK is already initialized
DLLOrDependenciesNotFound-4the specified file was not found. This might also mean that a .dll cannot be loaded because there is a missing dependency, such as the runtime environment.
InvalidInputParam-5an invalid parameter was passed to the method
FailedTesting-6the reduction failed post-testing
DLLAndHeaderFileIsNotMatching-7the Simplygon DLL and header file interface versions do not match
DLLFailedToLoad-8the Simplygon DLL failed loading, probably because of a missing dependency
LicenseNotForThisApplication-9the license is not made for this application of Simplygon
LicenseNotForThisPlatform-10the license is not made for this platform of Simplygon
LicenseNotForThisVersion-11the license is not made for this version of Simplygon
FailedToCreatePipelineSerializer-12failed to create pipeline serializer
FailedToRunPipeline-13failed to run pipeline
UnhandledException-14an unhandled exception was encountered
FileError-15a file read/write failed.
InvalidPath-16a path is invalid or a file/directory is missing.
DependencyMissing-17a needed dependency is missing. see log for info on what is missing.
UnexpectedError-18an unexpected error happened.
FailedToUploadFreeLicenseAsset-50failed to upload free license asset
ExceptionalError-1000An exceptional and fatal error occurred, and has been reported to the error handler. The library is placed in an exceptional state, and you should unload and reload the Simplygon library to avoid memory leaks.
FailedToResolveLicenseServerHostName-10001cannot reach the licensing server, cant look up server, check DNS
FailedToConnectToLicenseServer-10002cannot contact the licensing server, check firewall/proxy server
FailedToConnectToLicenseServerAndSendData-10003Failed to connect to the license server. Please check that your internet connection is working and outgoing connections to license.simplygon.com port 443 are not blocked by a firewall or proxy.
FailedToConnectToLicenseServerAndReceiveData-10004cannot receive data from the licensing server, check firewall/proxy server
DataFromLicenseServerIsCorrupt-10005data from licensing server is corrupted, try again, check connection
LicenseHasExpired-10006the license has expired
LicenseIsInvalid-10007the license data is corrupted, please reinstall the license key
LicenseNotForThisProduct-10008the license is not for this product, please contact licensing, and replace license key
NoNetworkCardFound-10009no network card was found on the machine
LicenseDecodeFailed-10010could not decode license, it is corrupted
LicenseLockNotMatchingMachine-10011the license is locked to another machine
ConnectionToLicenseServerLost-10012Connection to license server lost
LicenseHashDataCorrupt-10013could not decode license, it is corrupted
LicenseExpired-10014the license is invalid, please contact licensing
LicenseNotLockedForThisMachine-10020the license is locked to another machine
YourLicenseRequiresLatestWindows10-10024your license requires latest Windows 10 version
LicenseServerReturnedBadRequest-10400Bad license request. Please reach out to SimplygonSupport[at]microsoft.com for support
ProcessingCap-10403You have reached the maximum number of processings for your license. Please try again in 24 hours or reach out to SimplygonSales@microsoft.com for support..
UnknownLicenseKey-10404You are using an unknown license key. Please verify so you typed in the license key correctly and try again
LicenseIsNotActive-10410You are using an inactive license key. Please reach out to SimplygonSales[at]microsoft.com for support
MaxNodesReachForThisLicense-10409You have reached the maximum number of nodes for your license. After 48 hours of not using Simplygon on a machine the license will be released and can be installed on another machine
YourLicenseRequiresLatestSimplygon-10426The license key you are using requires you to update to the latest version before you can use Simplygon
LicenseServerReturnServerError-10501Bad license request. Please reach out to SimplygonSupport[at]microsoft.com for support
ProcessingValidationError-20001The process was aborted, because of a validation error. Either the process settings or the input data was invalid, or a combination thereof. Use GetErrorMessages in the main Simplygon object to retrieve error messages, and see the log for details. Note that the library is not left in an exceptional state, and it is safe to continue processing other scenes.

ToJSON

Get settings as JSON for debugging purposes.

Syntax

cpp
spString ToJSON() const;

Parameters

ToJSON takes no parameters.

Return value

Type: spString

Static methods details

IsClassA

Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)

Syntax

cpp
static bool IsClassA( const char * type ) const;

Parameters

TypeNameMinMaxDescription
const char *typeName 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 spAggregationProcessor, and if this is the case, returns the object cast into spAggregationProcessor. (Inherited from Object)

Syntax

cpp
static spAggregationProcessor SafeCast( const spObject & object ) const;

Parameters

TypeNameMinMaxDescription
ObjectobjectObject to cast.

Return value

Type: AggregationProcessor