Simplygon C++ API  8.3.35800.0
SimplygonSDK::IMaterialCaster Class Referenceabstract

#include <SimplygonSDK.h>

Inheritance diagram for SimplygonSDK::IMaterialCaster:
SimplygonSDK::IProcessingObject SimplygonSDK::IObject SimplygonSDK::IAmbientOcclusionCaster SimplygonSDK::IColorCaster SimplygonSDK::IDisplacementCaster SimplygonSDK::INormalCaster SimplygonSDK::IOpacityCaster

Public Member Functions

virtual SGDEPRECATED void CastMaterials ()=0
 
virtual CountedPointer< IMaterialCasterSettingsGetCasterSettings ()=0
 
virtual const char * GetClass ()
 
virtual rid GetDestMaterialId ()=0
 
virtual unsigned int GetDilation ()=0
 
virtual unsigned int GetDitherType ()=0
 
virtual unsigned int GetFillMode ()=0
 
virtual CountedPointer< IMappingImageGetMappingImage ()=0
 
virtual unsigned int GetOutputChannelBitDepth ()=0
 
virtual unsigned int GetOutputChannels ()=0
 
virtual rstring GetOutputFilePath ()=0
 
virtual CountedPointer< IImageDataGetOutputImage ()=0
 
virtual CountedPointer< IMaterialTableGetSourceMaterials ()=0
 
virtual CountedPointer< ITextureTableGetSourceTextures ()=0
 
virtual bool GetUseMultisampling ()=0
 
virtual bool IsA (const char *type) const
 
virtual void SetDestMaterialId (rid value)=0
 
virtual void SetDilation (unsigned int Dilation)=0
 
virtual void SetDitherType (unsigned int DitherType)=0
 
virtual void SetFillMode (unsigned int FillMode)=0
 
virtual void SetMappingImage (IMappingImage *value)=0
 
virtual void SetOutputChannelBitDepth (unsigned int OutputChannelBitDepth)=0
 
virtual void SetOutputChannels (unsigned int OutputChannels)=0
 
virtual void SetOutputFilePath (const char *value)=0
 
virtual void SetOutputImage (IImageData *value)=0
 
virtual void SetSourceMaterials (IMaterialTable *value)=0
 
virtual void SetSourceTextures (ITextureTable *value)=0
 
virtual void SetUseMultisampling (bool UseMultisampling)=0
 
- Public Member Functions inherited from SimplygonSDK::IProcessingObject
virtual void Clear ()=0
 
virtual real GetPercentDone ()=0
 
virtual void RunProcessing ()=0
 
- Public Member Functions inherited from SimplygonSDK::IObject
virtual rid AddObserver (robserver *Observer, rid EventId)=0
 
virtual void AddRef ()=0
 
virtual rstring GetName ()=0
 
virtual void * GetUserComponentArea (rid userid)=0
 
virtual void PrintInfo ()=0
 
virtual void Release ()=0
 
virtual void RemoveObserver (rid ObserverId)=0
 
virtual void SetName (const char *Name)=0
 

Static Public Member Functions

static bool IsClassA (const char *type)
 
static IMaterialCasterSafeCast (IObject *ptr)
 
- Static Public Member Functions inherited from SimplygonSDK::IProcessingObject
static bool IsClassA (const char *type)
 
static IProcessingObjectSafeCast (IObject *ptr)
 
- Static Public Member Functions inherited from SimplygonSDK::IObject
static bool IsClassA (const char *type)
 
static IObjectSafeCast (IObject *ptr)
 

Detailed Description

IMaterialCaster is the base interface for material casting interfaces. The interface exports methods for defining input geometries & mapping image, materials, output image paths & formats

Definition at line 9072 of file SimplygonSDK.h.

Member Function Documentation

◆ CastMaterials()

virtual SGDEPRECATED void SimplygonSDK::IMaterialCaster::CastMaterials ( )
pure virtual
Deprecated:
Method is marked as deprecated and will be removed in future version. Use RunProcessing() instead. Runs the material casting from SourceGeometry to Geometry.

◆ GetCasterSettings()

virtual CountedPointer<IMaterialCasterSettings> SimplygonSDK::IMaterialCaster::GetCasterSettings ( )
pure virtual

Get the settings object

◆ GetClass()

virtual const char* SimplygonSDK::IMaterialCaster::GetClass ( )
virtual

GetClass returns the name of the class of the object.

Returns
the name of the actual class of the object, as a const char string

Reimplemented from SimplygonSDK::IProcessingObject.

Reimplemented in SimplygonSDK::IAmbientOcclusionCaster, SimplygonSDK::IDisplacementCaster, SimplygonSDK::INormalCaster, SimplygonSDK::IOpacityCaster, and SimplygonSDK::IColorCaster.

◆ GetDestMaterialId()

virtual rid SimplygonSDK::IMaterialCaster::GetDestMaterialId ( )
pure virtual

Get the DestMaterialId object. If set, only the parts of the destination map that. To disable, set to -1.

Returns
the current value of DestMaterialId

◆ GetDilation()

virtual unsigned int SimplygonSDK::IMaterialCaster::GetDilation ( )
pure virtual

Get the Dilation value. Where applicable, such as colors and normals, the caster will fill empty pixels surrounding filled pixels with values mixed from the filled ones. This setting sets how many pixels to fill outside the original filled pixels.

Returns
the current value of Dilation

◆ GetDitherType()

virtual unsigned int SimplygonSDK::IMaterialCaster::GetDitherType ( )
pure virtual

The type of dithering to use when creating the output object. Default is SG_DITHERPATTERNS_NO_DITHER.

◆ GetFillMode()

virtual unsigned int SimplygonSDK::IMaterialCaster::GetFillMode ( )
pure virtual

Get the fill mode

Returns
the current fill mode

◆ GetMappingImage()

virtual CountedPointer<IMappingImage> SimplygonSDK::IMaterialCaster::GetMappingImage ( )
pure virtual

Get the MappingImage object. The MappingImage object contains the mapping between the Geometry and SourceGeometry objects.

Returns
the current MappingImage

◆ GetOutputChannelBitDepth()

virtual unsigned int SimplygonSDK::IMaterialCaster::GetOutputChannelBitDepth ( )
pure virtual

Get the OutputBitDepth parameter. This can be either 8 or 16. Please note that this is the bit depth per-channel, so a bit depth of 8 and a OutputChannels value of 3 will result in 8*3 = 24-bit RGB values.

Returns
the current value of OutputBitDepth

◆ GetOutputChannels()

virtual unsigned int SimplygonSDK::IMaterialCaster::GetOutputChannels ( )
pure virtual

Get the OutputChannels parameter. This can be set to either:

  • 1 (Luminance)
  • 3 (RGB)
  • 4 (RGBA)
Returns
the current value of OutputChannels

◆ GetOutputFilePath()

virtual rstring SimplygonSDK::IMaterialCaster::GetOutputFilePath ( )
pure virtual

Get the OutputFilePath file path, where the output image will be placed. Note that the extension specified will specify the file format. Please note that only PNG (extension .png) will be able to support all possible bit dephts (such as RGB 16-bit per channel). Either OutputImage or OutputFilePath must be set. If OutputImage is set, then OutputFilePath is ignored.

Returns
the current OutputFilePath

◆ GetOutputImage()

virtual CountedPointer<IImageData> SimplygonSDK::IMaterialCaster::GetOutputImage ( )
pure virtual

Get the OutputImage object that will receive the image. The current contents of the image will be removed, and the image will be written to the Colors field of the ReImageData object. Either OutputImage or OutputFilePath must be set. If OutputImage is set, then OutputFilePath is ignored.

Returns
the current OutputImage

◆ GetSourceMaterials()

virtual CountedPointer<IMaterialTable> SimplygonSDK::IMaterialCaster::GetSourceMaterials ( )
pure virtual

Get the SourceMaterials object. The SourceMaterials object contains all materials of the the source geometry. The source geometry must have a "MaterialIds" field that indices the material table.

Returns
the current SourceMaterials material table

◆ GetSourceTextures()

virtual CountedPointer<ITextureTable> SimplygonSDK::IMaterialCaster::GetSourceTextures ( )
pure virtual

Get the SourceTextures object. The SourceTextures object contains all textures of the the source geometry.

Returns
the current SourceTextures material table

◆ GetUseMultisampling()

virtual bool SimplygonSDK::IMaterialCaster::GetUseMultisampling ( )
pure virtual

Get the multisampling flag

Returns
the current multisampling flag

◆ IsA()

virtual bool SimplygonSDK::IMaterialCaster::IsA ( const char *  type) const
virtual

The IsA function returns true if the object is a or is a descendant of the class named as the type parameter

Parameters
typeis the name of the class to check if the object is, or is a descendant of
Returns
true if the object is of the specified class, false if not

Reimplemented from SimplygonSDK::IProcessingObject.

Reimplemented in SimplygonSDK::IAmbientOcclusionCaster, SimplygonSDK::IDisplacementCaster, SimplygonSDK::INormalCaster, SimplygonSDK::IOpacityCaster, and SimplygonSDK::IColorCaster.

◆ IsClassA()

static bool SimplygonSDK::IMaterialCaster::IsClassA ( const char *  type)
inlinestatic

The IsClassA function returns true if IMaterialCaster is a or is a descendant of the class named as the type parameter

Parameters
typeis the name of the class to check if the class is, or is a descendant of
Returns
true if the class is of the specified class, false if not

Definition at line 9093 of file SimplygonSDK.h.

◆ SafeCast()

static IMaterialCaster* SimplygonSDK::IMaterialCaster::SafeCast ( IObject ptr)
inlinestatic

SafeCast makes sure the pointer is of a class that can be cast into a IMaterialCaster pointer, and if this is possible, returns the cast pointer.

Parameters
ptris the pointer to be cast into a IMaterialCaster pointer
Returns
a pointer to the IMaterialCaster object, if the cast can be made, and a NULL pointer otherwise

Definition at line 9106 of file SimplygonSDK.h.

◆ SetDestMaterialId()

virtual void SimplygonSDK::IMaterialCaster::SetDestMaterialId ( rid  value)
pure virtual

Set the DestMaterialId object. If set, only the parts of the destination map that. To disable, set to -1.

Parameters
valueis the value to which DestMaterialId will be set

◆ SetDilation()

virtual void SimplygonSDK::IMaterialCaster::SetDilation ( unsigned int  Dilation)
pure virtual

Set the Dilation value. Where applicable, such as colors and normals, the caster will fill empty pixels surrounding filled pixels with values mixed from the filled ones. This setting sets how many pixels to fill outside the original filled pixels.

Parameters
Dilationis the new value of Dilation

◆ SetDitherType()

virtual void SimplygonSDK::IMaterialCaster::SetDitherType ( unsigned int  DitherType)
pure virtual

The type of dithering to use when creating the output object. Use the DitherPattern enum to choose. Default is SG_DITHERPATTERNS_NO_DITHER.

  • 0 (SG_DITHERPATTERNS_NO_DITHER)
  • 1 (SG_DITHERPATTERNS_FLOYDSTEINBERG)
  • 2 (SG_DITHERPATTERNS_JARVISJUDICENINKE)
  • 3 (SG_DITHERPATTERNS_SIERRA)
Parameters
DitherTypeis the value of the DitherType to use

◆ SetFillMode()

virtual void SimplygonSDK::IMaterialCaster::SetFillMode ( unsigned int  FillMode)
pure virtual

Set the fill mode

  • 0:SG_ATLASFILLMODE_INTERPOLATE
  • 1:SG_ATLASFILLMODE_NEARESTNEIGHBOR
  • 2:SG_ATLASFILLMODE_NONE
Parameters
FillModeis the value of the FillMode to use

◆ SetMappingImage()

virtual void SimplygonSDK::IMaterialCaster::SetMappingImage ( IMappingImage value)
pure virtual

Set the MappingImage object. The MappingImage object contains the mapping between the Geometry and SourceGeometry objects.

Parameters
valueis the mapping image to which MappingImage will be set

◆ SetOutputChannelBitDepth()

virtual void SimplygonSDK::IMaterialCaster::SetOutputChannelBitDepth ( unsigned int  OutputChannelBitDepth)
pure virtual

Set the OutputBitDepth parameter. This can be either 8 or 16. Please note that this is the bit depth per-channel, so a bit depth of 8 and a OutputChannels value of 3 will result in 8*3 = 24-bit RGB values.

Parameters
OutputChannelBitDepthis the bit depth of the OutputChannel (8 or 16)

◆ SetOutputChannels()

virtual void SimplygonSDK::IMaterialCaster::SetOutputChannels ( unsigned int  OutputChannels)
pure virtual

Set the OutputChannels parameter. This can be set to either:

  • 1 (Luminance)
  • 3 (RGB)
  • 4 (RGBA)
Parameters
OutputChannelsis the number of OutputChannels the texture will contain.

◆ SetOutputFilePath()

virtual void SimplygonSDK::IMaterialCaster::SetOutputFilePath ( const char *  value)
pure virtual

Set the OutputFilePath file path, where the output image will be placed. Note that the extension specified will specify the file format. Please note that only PNG (extension .png) will be able to support all possible bit dephts (such as RGB 16-bit per channel). Either OutputImage or OutputFilePath must be set. If OutputImage is set, then OutputFilePath is ignored.

Parameters
valueis the string to which OutputFilePath will be set

◆ SetOutputImage()

virtual void SimplygonSDK::IMaterialCaster::SetOutputImage ( IImageData value)
pure virtual

Set the OutputImage object that will receive the image. The current contents of the image will be removed, and the image will be written to the Colors field of the ReImageData object. Either OutputImage or OutputFilePath must be set. If OutputImage is set, then OutputFilePath is ignored.

Parameters
valueis the image data to which OutputImage will be set

◆ SetSourceMaterials()

virtual void SimplygonSDK::IMaterialCaster::SetSourceMaterials ( IMaterialTable value)
pure virtual

Set the SourceMaterials object. The SourceMaterials object contains all materials of the the source geometry. The source geometry must have a "MaterialIds" field that indices the material table.

Parameters
valueis the material table to which SourceMaterials will be set

◆ SetSourceTextures()

virtual void SimplygonSDK::IMaterialCaster::SetSourceTextures ( ITextureTable value)
pure virtual

Set the SourceTextures object. The SourceTextures object contains all textures of the the source geometry.

Parameters
valueis the texture table to which SourceTextures will be set

◆ SetUseMultisampling()

virtual void SimplygonSDK::IMaterialCaster::SetUseMultisampling ( bool  UseMultisampling)
pure virtual

Set the UseMultisampling

Parameters
UseMultisamplingthe desired value of the flag

The documentation for this class was generated from the following file: