Sha256: 11fbda48b12894c84ff01a063318dfb113f433ec975cc9fb613c3889500645f6

Contents?: true

Size: 949 Bytes

Versions: 11

Compression:

Stored size: 949 Bytes

Contents

package toxi.newmesh;

import toxi.geom.Vec3D;
import toxi.util.datatypes.ItemIndex;

/**
 *
 * @author tux
 */
public class MeshFaceNormalCompiler extends MeshAttributeCompiler {

    /**
     *
     * @param f
     * @param index
     * @param buf
     * @param offset
     */
    @Override
    public void compileFace(AttributedFace f, ItemIndex<?> index, float[] buf,
            int offset) {
        Vec3D v = (Vec3D) index.forID(f.normal);
        buf[offset++] = v.x;
        buf[offset++] = v.y;
        buf[offset++] = v.z;
        buf[offset++] = v.x;
        buf[offset++] = v.y;
        buf[offset++] = v.z;
        buf[offset++] = v.x;
        buf[offset++] = v.y;
        buf[offset++] = v.z;
    }

    /**
     *
     * @return
     */
    @Override
    public ItemIndex<?> getIndex() {
        return mesh.fnormals;
    }

    /**
     *
     * @return
     */
    @Override
    public int getStride() {
        return 3;
    }

}

Version data entries

11 entries across 11 versions & 1 rubygems

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