# 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.
# 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.
# 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.
# 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.
# 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.
# Methods details
# GetClass
Get the name of the SurfaceMapper class.
# 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.
# IsNull
Returns true if the SurfaceMapper object is invalid.
# RunSurfaceMapping
Runs the surface mapping.
# Static methods details
# 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.