Package util.ValueArray.NativeArray

Examples of util.ValueArray.NativeArray.NativeDoubleArray3D$MyIterator


    public void init() {
        points = new ArrayList<>();
        solidShadingValues = new ArrayList<>();

        NativeDoubleArray3D xcoords = new NativeDoubleArray3D(getNumPoints(), 1, 1);
        NativeDoubleArray3D ycoords = new NativeDoubleArray3D(getNumPoints(), 1, 1);
        NativeDoubleArray3D zcoords = new NativeDoubleArray3D(getNumPoints(), 1, 1);

        for(int i = 0; i < getNumPoints(); i++){
            xcoords.setValue(i, 0, 0, getRandom().nextDouble());
            ycoords.setValue(i, 0, 0, getRandom().nextDouble());
            zcoords.setValue(i, 0, 0, getRandom().nextDouble());
        }

//        RangeWrapper xrange = new RangeWrapper(xcoords, 0, getMaxDistanceX());
//        RangeWrapper yrange = new RangeWrapper(ycoords, 0, getMaxDistanceY());
//        RangeWrapper zrange = new RangeWrapper(zcoords, 0, getMaxDistanceZ());

        for(int i = 0; i < getNumPoints(); i++){
//            double x = xrange.getValue(i, 0, 0);
//            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

TOP

Related Classes of util.ValueArray.NativeArray.NativeDoubleArray3D$MyIterator

Copyright © 2018 www.massapicom. 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.