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

Version Path
toxiclibs-2.1.0 src/main/java/toxi/processing/XYZNormalMapper.java
toxiclibs-2.0.0 src/main/java/toxi/processing/XYZNormalMapper.java
toxiclibs-1.0.0 src/toxi/processing/XYZNormalMapper.java
toxiclibs-0.9.3 src/toxi/processing/XYZNormalMapper.java
toxiclibs-0.9.2 src/toxi/processing/XYZNormalMapper.java
toxiclibs-0.9.1 src/toxi/processing/XYZNormalMapper.java
toxiclibs-0.9.0 src/toxi/processing/XYZNormalMapper.java
toxiclibs-0.8.0 src/toxi/processing/XYZNormalMapper.java
toxiclibs-0.6.0-java src/toxi/processing/XYZNormalMapper.java
toxiclibs-0.5.1-java src/toxi/processing/XYZNormalMapper.java
toxiclibs-0.5.0-java src/toxi/processing/XYZNormalMapper.java