Sha256: b465410d37e2d59f017d621697890a5b5badcf19bad1d670dd72947c3e8b0ccb

Contents?: true

Size: 1.68 KB

Versions: 19

Compression:

Stored size: 1.68 KB

Contents

package monkstone.vecmath;

import processing.core.PShape;

/**
 *
 * @author Martin Prout
 */
public class ShapeRender implements JRender {

    final PShape shape;

    /**
     *
     * @param shape PShape
     */
    public ShapeRender(final PShape shape) {
        this.shape = shape;

    }

    /**
     *
     * @param x double
     * @param y double
     */
    @Override
    public void vertex(double x, double y) {
        shape.vertex((float) x, (float) y);
    }

    /**
     *
     * @param x double
     * @param y double
     */
    @Override
    public void curveVertex(double x, double y) {
        throw new UnsupportedOperationException("Not implemented for this renderer");
    }

    /**
     *
     * @param x double
     * @param y double
     * @param z double
     */
    @Override
    public void vertex(double x, double y, double z) {
        shape.vertex((float) x, (float) y, (float) z);
    }

    /**
     *
     * @param x double
     * @param y double
     * @param z double
     */
    @Override
    public void normal(double x, double y, double z) {
        shape.normal((float) x, (float) y, (float) z);
    }

    /**
     *
     * @param x double
     * @param y double
     * @param z double
     * @param u double
     * @param v double
     */
    @Override
    public void vertex(double x, double y, double z, double u, double v) {
        shape.vertex((float) x, (float) y, (float) z, (float) u, (float) v);
    }

    /**
     *
     * @param x double
     * @param y double
     * @param z double
     */
    @Override
    public void curveVertex(double x, double y, double z) {
        throw new UnsupportedOperationException("Not implemented for this renderer");
    }
}

Version data entries

19 entries across 18 versions & 2 rubygems

Version Path
propane-4.0.0-java src/main/java/monkstone/vecmath/ShapeRender.java
picrate-2.5.2-java src/main/java/monkstone/vecmath/ShapeRender.java
picrate-2.5.1-java src/main/java/monkstone/vecmath/ShapeRender.java
propane-3.11.0-java src/main/java/monkstone/vecmath/ShapeRender.java
picrate-2.5.0-java src/main/java/monkstone/vecmath/ShapeRender.java
propane-3.10.0-java lib/java/monkstone/vecmath/ShapeRender.java
propane-3.10.0-java src/main/java/monkstone/vecmath/ShapeRender.java
propane-3.9.0-java src/main/java/monkstone/vecmath/ShapeRender.java
propane-3.8.0-java src/main/java/monkstone/vecmath/ShapeRender.java
propane-3.7.1-java src/main/java/monkstone/vecmath/ShapeRender.java
propane-3.7.0.pre-java src/main/java/monkstone/vecmath/ShapeRender.java
propane-3.6.0-java src/main/java/monkstone/vecmath/ShapeRender.java
propane-3.5.0-java src/main/java/monkstone/vecmath/ShapeRender.java
propane-3.4.2-java src/main/java/monkstone/vecmath/ShapeRender.java
propane-3.4.1-java src/main/java/monkstone/vecmath/ShapeRender.java
propane-3.4.0-java src/main/java/monkstone/vecmath/ShapeRender.java
propane-3.3.1-java src/main/java/monkstone/vecmath/ShapeRender.java
propane-3.3.0-java src/main/java/monkstone/vecmath/ShapeRender.java
propane-3.2.0-java src/main/java/monkstone/vecmath/ShapeRender.java