Packageaway3d.materials.utils
Classpublic class TangentToObjectMapper
InheritanceTangentToObjectMapper Inheritance Object

A util class that transforms a tangent space normal map to an object space normal map.



Public Methods
 MethodDefined By
  
transform(tangentMap:BitmapData, targetMesh:Mesh, smoothNormals:Boolean = false):BitmapData
[static] Transform a tangent space normal map to an object space normal map for a specific mesh
TangentToObjectMapper
Method Detail
transform()method
public static function transform(tangentMap:BitmapData, targetMesh:Mesh, smoothNormals:Boolean = false):BitmapData

Transform a tangent space normal map to an object space normal map for a specific mesh

Parameters

tangentMap:BitmapData — The source tangent space map to be transformed
 
targetMesh:Mesh — The target mesh for which the object space map is generated
 
smoothNormals:Boolean (default = false) — Interpolates the triangle normals. Set to true for rounded surfaces, false for sharp edges.

Returns
BitmapData — An object space normal map for the target mesh.