Package com.sk89q.worldedit

Examples of com.sk89q.worldedit.Vector


    public static BlockWorldVector toWorldVector(Block block) {
        return new BlockWorldVector(getLocalWorld(block.getWorld()), block.getX(), block.getY(), block.getZ());
    }

    public static Vector toVector(org.bukkit.Location loc) {
        return new Vector(loc.getX(), loc.getY(), loc.getZ());
    }
View Full Code Here


    private double tension;
    private double bias;
    private double continuity;

    public Node() {
        this(new Vector(0, 0, 0));
    }
View Full Code Here

    }

    public static Location toLocation(org.bukkit.Location loc) {
        return new Location(
            getLocalWorld(loc.getWorld()),
            new Vector(loc.getX(), loc.getY(), loc.getZ()),
            loc.getYaw(), loc.getPitch()
        );
    }
View Full Code Here

            loc.getYaw(), loc.getPitch()
        );
    }

    public static Vector toVector(org.bukkit.util.Vector vector) {
        return new Vector(vector.getX(), vector.getY(), vector.getZ());
    }
View Full Code Here

    }

    public static final double EQUALS_PRECISION = 0.0001;

    public static org.bukkit.Location toLocation(Location location) {
        Vector pt = location.getPosition();
        return new org.bukkit.Location(
            toWorld(location.getWorld()),
            pt.getX(), pt.getY(), pt.getZ(),
            location.getYaw(), location.getPitch()
        );
    }
View Full Code Here

        position *= nodes.size() - 1;

        final int index1 = (int) Math.floor(position);
        final double remainder = position - index1;

        final Vector position1 = nodes.get(index1).getPosition();
        final Vector position2 = nodes.get(index1 + 1).getPosition();

        return position1.multiply(1.0 - remainder).add(position2.multiply(remainder));
    }
View Full Code Here

        position *= nodes.size() - 1;

        final int index1 = (int) Math.floor(position);

        final Vector position1 = nodes.get(index1).getPosition();
        final Vector position2 = nodes.get(index1 + 1).getPosition();

        return position2.subtract(position1);
    }
View Full Code Here

                    arcLengthRecursive(indexB, 0.0, remainderB);
        }
    }

    private double arcLengthRecursive(int index, double remainderA, double remainderB) {
        final Vector position1 = nodes.get(index).getPosition();
        final Vector position2 = nodes.get(index + 1).getPosition();

        return position1.distance(position2) * (remainderB - remainderA);
    }
View Full Code Here

    public BlockArrayClipboard(Region region) {
        checkNotNull(region);
        this.region = region.clone();
        this.origin = region.getMinimumPoint();

        Vector dimensions = getDimensions();
        blocks = new BaseBlock[dimensions.getBlockX()][dimensions.getBlockY()][dimensions.getBlockZ()];
    }
View Full Code Here

    }

    @Override
    public BaseBlock getBlock(Vector position) {
        if (region.contains(position)) {
            Vector v = position.subtract(region.getMinimumPoint());
            BaseBlock block = blocks[v.getBlockX()][v.getBlockY()][v.getBlockZ()];
            if (block != null) {
                return new BaseBlock(block);
            }
        }
View Full Code Here

TOP

Related Classes of com.sk89q.worldedit.Vector

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.