Examples of Vector3Double


Examples of util.Vectors.Vector.Vector3Double

//            double y = yrange.getValue(i, 0, 0);
//            double z = zrange.getValue(i, 0, 0);
            double x = xcoords.getValue(i, 0, 0) * getMaxDistanceX();
            double y = ycoords.getValue(i, 0, 0) * getMaxDistanceY();
            double z = zcoords.getValue(i, 0, 0) * getMaxDistanceZ();
            points.add(new Vector3Double(x, y, z));
            solidShadingValues.add(getRandom().nextDouble());
        }

        Logger.getLogger("generator").log(Level.INFO, "Voronoi point list: " + points);
    }
View Full Code Here

Examples of util.Vectors.Vector.Vector3Double

     *
     * @param x
     */
    @Override
    public Double getValue(Double x) {
        Vector3Double px = new Vector3Double(x, (double) 0, (double) 0);
        switch (shadingType) {
            case Distance:
                return getDistance1D(getClosestPoint1D(x), px);
            case Solid:
                return solidShadingValues.get(points.indexOf(getClosestPoint1D(x)));
View Full Code Here

Examples of util.Vectors.Vector.Vector3Double

        }
    }

    @Override
    public Double getValue(Double x, Double y) {
        Vector3Double pxy = new Vector3Double(x, y, (double) 0);
        switch (shadingType) {
            case Distance:
                return getDistance2D(getClosestPoint2D(x, y), pxy);
            case Solid:
                return solidShadingValues.get(points.indexOf(getClosestPoint2D(x, y)));
View Full Code Here

Examples of util.Vectors.Vector.Vector3Double

        }
    }

    @Override
    public Double getValue(Double x, Double y, Double z) {
        Vector3Double pxyz = new Vector3Double(x, y, z);
        switch (shadingType) {
            case Distance:
                return getDistance3D(getClosestPoint3D(x, y, z), pxyz);
            case Solid:
                return solidShadingValues.get(points.indexOf(getClosestPoint3D(x, y, z)));
View Full Code Here

Examples of util.Vectors.Vector.Vector3Double

                return getDistance3D(getClosestPoint3D(x, y, z), pxyz);
        }
    }

    private Vector3Double getClosestPoint1D(double x) {
        Vector3Double refPoint = new Vector3Double(x, (double) 0, (double) 0);
        Vector3Double currentPoint = null;
        double currentDistance = Double.MAX_VALUE;

        for (Vector3Double p : points) {
            if (getDistance1D(p, refPoint) < currentDistance) {
                currentPoint = p;
View Full Code Here

Examples of util.Vectors.Vector.Vector3Double

        return currentPoint;
    }

    private Vector3Double getClosestPoint2D(double x, double y) {
        Vector3Double refPoint = new Vector3Double(x, y, (double) 0);
        Vector3Double currentPoint = null;
        double currentDistance = Double.MAX_VALUE;

        for (Vector3Double p : points) {
            if (getDistance2D(p, refPoint) < currentDistance) {
                currentPoint = p;
View Full Code Here

Examples of util.Vectors.Vector.Vector3Double

        return currentPoint;
    }

    private Vector3Double getClosestPoint3D(double x, double y, double z) {
        Vector3Double refPoint = new Vector3Double(x, y, z);
        Vector3Double currentPoint = null;
        double currentDistance = Double.MAX_VALUE;

        for (Vector3Double p : points) {
            if (getDistance3D(p, refPoint) < currentDistance) {
                currentPoint = p;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.