Sha256: c6fab46d9d54cc44ce185c36ef9a8cd98eab88c829cc1ebf29a30b13f99a625e
Contents?: true
Size: 1.02 KB
Versions: 11
Compression:
Stored size: 1.02 KB
Contents
package toxi.newmesh; import toxi.geom.Vec2D; import toxi.util.datatypes.ItemIndex; /** * * @author tux */ public class MeshUVCompiler extends MeshAttributeCompiler { /** * * @param f * @param index * @param buf * @param offset */ @Override public void compileFace(AttributedFace f, ItemIndex<?> index, float[] buf, int offset) { int[] vn = f.attribs.get(IndexedTriangleMesh.ATTR_UVCOORDS); Vec2D v = (Vec2D) index.forID(vn[0]); buf[offset++] = v.x; buf[offset++] = v.y; v = (Vec2D) index.forID(vn[1]); buf[offset++] = v.x; buf[offset++] = v.y; v = (Vec2D) index.forID(vn[2]); buf[offset++] = v.x; buf[offset++] = v.y; } /** * * @return */ @Override public ItemIndex<?> getIndex() { return mesh.attributes.get(IndexedTriangleMesh.ATTR_UVCOORDS); } /** * * @return */ @Override public int getStride() { return 2; } }
Version data entries
11 entries across 11 versions & 1 rubygems