wrap.transferTexture

wrap.transferTexture(geomSrc, textureSrc, geomDst, textureSizeDst, maxRelativeDist = 3.0)

Transfer texture from geomSrc to geomDst using ray-tracing. If ray from geomSrc does not hit any polygons on geomDst it will produce transparent pixel on resulting texture.

Parameters:

geomSrc : wrap.Geom

Geometry to project from

textureSrc : wrap.Image

Texture to project

geomDst : wrap.Geom

Geometry to project to

maxRelativeDist : number, optional

Limits the maximum distance of projection, defaults to 3.0. Actual maximum distance is maxRelativeDist * medianNearestPointDistanceDst, where medianNearestPointDistanceDst is a median distance from each point to nearest neighbour point on geomDst.

Returns:

result : wrap.Image

Returns the texture for geomDst