# class SurfaceMapper

ISurfaceMapper creates a mapping image between two user-defined geometries. The mapper basically looks for the source geometry in the inverse normal direction from the outwardly offset destination geometry, and maps pixels accordingly. This means that you can modify the normals of the destination geometry to adjust the search direction to your liking. The geometries can either be set as IGeometryDatas or as the root nodes of scenes. If both are set, the scene is used. If only a single source or a destination is set, or if the source and destination are the same scene or geometry, the surface mapper will map the mesh onto itself.

# Properties

Property Description
DestinationGeometry The destination geometry data.
DestinationScene The scene used for the surface transfer destination.
RecalculateSearchDirection If set, the search direction from the destination mesh to the source mesh will be determined by an internal normal calculation with the specified hard edge angle. If false, the search direction will be determined by the existing normals of the destination geometry.
SearchDirectionHardEdgeAngle The hard edge angle in degrees. If RecalculateSearchDirection is on, the search direction from the destination mesh to the source mesh will be determined by an internal normal calculation with the specified hard edge angle. If false, the search direction will be determined by the existing normals of the destination geometry.
SearchDistance The search distance. If the source geometry is found within this distance from the destination geometry, it will be mapped. If negative, it will be set to a sane default internally, based on the mesh size.
SearchOffset The search offset. This is how far out from the destination geometry the search for the source geometry will begin, propagating inwardly for the length of SearchDistance. If negative, it will be set to a sane default internally, based on the mesh size.
SourceGeometry The source geometry data.
SourceScene The scene used for the surface transfer source.

# Methods

Method Description
GetClass Get the name of the SurfaceMapper class.
GetMappingImage The mapping image.
GetMappingImageSettings The mapping image settings. Currently, the only applicable settings for this mapper is texcoordlevel, texcoordname, size, and supersampling settings.
IsA Returns true if SurfaceMapper is a or is a descendant of the class named as the type parameter.
IsNull Returns true if the SurfaceMapper object is invalid.
RunSurfaceMapping Runs the surface mapping.

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

# Properties details

# DestinationGeometry

The destination geometry data.

# Syntax

// Setter
void SetDestinationGeometry( spGeometryData value );

// Getter
spGeometryData GetDestinationGeometry();

# SetDestinationGeometry parameters

Type Name Min Max Description
GeometryData value Is the destination geometry.

# GetDestinationGeometry return value

Type: GeometryData

# DestinationScene

The scene used for the surface transfer destination.

# Syntax

// Setter
void SetDestinationScene( spScene value );

// Getter
spScene GetDestinationScene();

# SetDestinationScene parameters

Type Name Min Max Description
Scene value Is the destination scene object.

# GetDestinationScene return value

Type: Scene

# RecalculateSearchDirection

If set, the search direction from the destination mesh to the source mesh will be determined by an internal normal calculation with the specified hard edge angle. If false, the search direction will be determined by the existing normals of the destination geometry.

# Syntax

// Setter
void SetRecalculateSearchDirection( bool value );

// Getter
bool GetRecalculateSearchDirection();

# SetRecalculateSearchDirection parameters

Type Name Min Max Description
bool value Is the desired flag value.

# GetRecalculateSearchDirection return value

Type: bool

# SearchDirectionHardEdgeAngle

The hard edge angle in degrees. If RecalculateSearchDirection is on, the search direction from the destination mesh to the source mesh will be determined by an internal normal calculation with the specified hard edge angle. If false, the search direction will be determined by the existing normals of the destination geometry.

# Syntax

// Setter
void SetSearchDirectionHardEdgeAngle( real value );

// Getter
real GetSearchDirectionHardEdgeAngle();

# SetSearchDirectionHardEdgeAngle parameters

Type Name Min Max Description
real value 0 180 Is the hard angle value.

# GetSearchDirectionHardEdgeAngle return value

Type: real

Default: 180

# SearchDistance

The search distance. If the source geometry is found within this distance from the destination geometry, it will be mapped. If negative, it will be set to a sane default internally, based on the mesh size.

# Syntax

// Setter
void SetSearchDistance( real value );

// Getter
real GetSearchDistance();

# SetSearchDistance parameters

Type Name Min Max Description
real value Is the search distance value.

# GetSearchDistance return value

Type: real

# SearchOffset

The search offset. This is how far out from the destination geometry the search for the source geometry will begin, propagating inwardly for the length of SearchDistance. If negative, it will be set to a sane default internally, based on the mesh size.

# Syntax

// Setter
void SetSearchOffset( real value );

// Getter
real GetSearchOffset();

# SetSearchOffset parameters

Type Name Min Max Description
real value Is the search offset value.

# GetSearchOffset return value

Type: real

# SourceGeometry

The source geometry data.

# Syntax

// Setter
void SetSourceGeometry( spGeometryData value );

// Getter
spGeometryData GetSourceGeometry();

# SetSourceGeometry parameters

Type Name Min Max Description
GeometryData value Is the source geometry.

# GetSourceGeometry return value

Type: GeometryData

# SourceScene

The scene used for the surface transfer source.

# Syntax

// Setter
void SetSourceScene( spScene value );

// Getter
spScene GetSourceScene();

# SetSourceScene parameters

Type Name Min Max Description
Scene value Is the source scene object.

# GetSourceScene return value

Type: Scene

# Methods details

# GetClass

Get the name of the SurfaceMapper class.

# Syntax

spString GetClass();

# Parameters

GetClass takes no parameters.

# Return value

Type: spString

# GetMappingImage

The mapping image.

# Syntax

spMappingImage GetMappingImage();

# Parameters

GetMappingImage takes no parameters.

# Return value

Type: MappingImage

# GetMappingImageSettings

The mapping image settings. Currently, the only applicable settings for this mapper is texcoordlevel, texcoordname, size, and supersampling settings.

# Syntax

spMappingImageSettings GetMappingImageSettings();

# Parameters

GetMappingImageSettings takes no parameters.

# Return value

Type: MappingImageSettings

# IsA

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

# Return value

Type: bool

# IsNull

Returns true if the SurfaceMapper object is invalid.

# Syntax

bool IsNull();

# Parameters

IsNull takes no parameters.

# Return value

Type: bool

# RunSurfaceMapping

Runs the surface mapping.

# Syntax

void RunSurfaceMapping();

# Parameters

RunSurfaceMapping takes no parameters.

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

# Syntax

static spSurfaceMapper SafeCast( spObject object );

# Parameters

Type Name Min Max Description
Object object Object to cast.

# Return value

Type: SurfaceMapper