Sha256: fb711cf60639e8fee4d01c32c1fa7e4dfeb48fbec429120d006e5db8cebb3a1d
Contents?: true
Size: 611 Bytes
Versions: 11
Compression:
Stored size: 611 Bytes
Contents
package toxi.processing; import toxi.color.ReadonlyTColor; import toxi.color.TColor; import toxi.geom.Matrix4x4; import toxi.geom.Vec3D; /** * * @author tux */ public class XYZNormalMapper implements NormalMapper { /** * */ public static final Matrix4x4 normalMap = new Matrix4x4().translateSelf( 0.5, 0.5, 0.5).scaleSelf(0.4999); /** * * @param normal * @return */ @Override public ReadonlyTColor getRGBForNormal(Vec3D normal) { normal = normalMap.applyTo(normal); return TColor.newRGB(normal.x, normal.y, normal.z); } }
Version data entries
11 entries across 11 versions & 1 rubygems