Example usage for org.apache.commons.math3.geometry.euclidean.threed Vector3D getY

List of usage examples for org.apache.commons.math3.geometry.euclidean.threed Vector3D getY

Introduction

In this page you can find the example usage for org.apache.commons.math3.geometry.euclidean.threed Vector3D getY.

Prototype

public double getY() 

Source Link

Document

Get the ordinate of the vector.

Usage

From source file:nova.core.wrapper.mc.forge.v18.wrapper.block.world.BWWorld.java

@Override
public void markStaticRender(Vector3D position) {
    world().markBlockForUpdate(/*from  w w  w.  j av a  2  s . c o m*/
            new BlockPos((int) position.getX(), (int) position.getY(), (int) position.getZ()));
}

From source file:nova.core.wrapper.mc.forge.v18.wrapper.block.world.BWWorld.java

@Override
public void markChange(Vector3D position) {
    world().notifyNeighborsOfStateChange(
            new BlockPos((int) position.getX(), (int) position.getY(), (int) position.getZ()),
            access.getBlockState(/* w ww  . ja v a2  s  .c om*/
                    new BlockPos((int) position.getX(), (int) position.getY(), (int) position.getZ()))
                    .getBlock());
}

From source file:nova.core.wrapper.mc.forge.v18.wrapper.block.world.BWWorld.java

@Override
public Optional<Block> getBlock(Vector3D position) {
    net.minecraft.block.Block mcBlock = access
            .getBlockState(new BlockPos((int) position.getX(), (int) position.getY(), (int) position.getZ()))
            .getBlock();//from ww w  . j  a va  2 s.c om
    if (mcBlock == null || mcBlock == Blocks.air) {
        Block airBlock = Game.blocks().getAirBlock().build();
        airBlock.components.add(new MCBlockTransform(airBlock, this, position));
        return Optional.of(airBlock);
    } else if (mcBlock instanceof FWBlock) {
        return Optional.of(((FWBlock) mcBlock).getBlockInstance(access, position));
    } else {
        return Optional.of(new BWBlock(mcBlock, this, position));
    }
}

From source file:nova.core.wrapper.mc.forge.v18.wrapper.block.world.BWWorld.java

@Override
public boolean setBlock(Vector3D position, BlockFactory blockFactory) {
    //TODO: Do not call blockFactory.build()
    net.minecraft.block.Block mcBlock = Game.natives().toNative(blockFactory.build());
    BlockPos pos = new BlockPos((int) position.getX(), (int) position.getY(), (int) position.getZ());
    net.minecraft.block.Block actualBlock = mcBlock != null ? mcBlock : Blocks.air;
    IBlockState defaultState = actualBlock.getDefaultState();
    IBlockState extendedState = actualBlock.getExtendedState(defaultState, world(), pos);
    return world().setBlockState(pos, extendedState);
}

From source file:nova.core.wrapper.mc.forge.v18.wrapper.block.world.BWWorld.java

@Override
public boolean removeBlock(Vector3D position) {
    return world()
            .setBlockToAir(new BlockPos((int) position.getX(), (int) position.getY(), (int) position.getZ()));
}

From source file:nova.core.wrapper.mc.forge.v18.wrapper.block.world.BWWorld.java

@Override
public Entity addEntity(Vector3D position, Item item) {
    EntityItem entityItem = new EntityItem(world(), position.getX(), position.getY(), position.getZ(),
            Game.natives().toNative(item));
    world().spawnEntityInWorld(entityItem);
    return Game.natives().toNova(entityItem);
}

From source file:nova.core.wrapper.mc.forge.v18.wrapper.block.world.BWWorld.java

@Override
public void playSoundAtPosition(Vector3D position, Sound sound) {
    world().playSoundEffect(position.getX(), position.getY(), position.getZ(), sound.getID(), sound.volume,
            sound.pitch);//w ww .  j a v a  2s  . c  o  m
}

From source file:nova.core.wrapper.mc.forge.v18.wrapper.VectorConverter.java

@Override
public BlockPos toNative(Vector3D vec) {
    return new BlockPos(vec.getX(), vec.getY(), vec.getZ());
}

From source file:org.aminb.mathtools.app.math.Line3D.java

public boolean ifHasIntersection(Line3D ln) {
    if (!(isParallelTo(ln))) {
        Vector3D a;
        a = line.intersection(ln.getApacheLine());
        tmpIntersect[0] = a.getX();//from   w  w  w . j a  va  2 s . c o m
        tmpIntersect[1] = a.getY();
        tmpIntersect[2] = a.getZ();
        return true;
    } else
        return false;
}

From source file:org.ardusat.GeomagneticFieldCalculation.java

private void printOutput(PrintStream stream, double alt, double lat, double lon, Vector3D b,
        GeoMagneticElements elem) {//from   w w w  .j a v  a2  s. co m
    String fmt1 = "%6.1f %3d %5.1f %5.1f ";
    String fmt2 = "%9.2f %9.2f %9.2f %9.2f %9.2f ";
    String fmt3 = "%8.1f %7.1f";
    stream.format(fmt1, year, (int) alt, lat, lon);
    stream.format(fmt2, b.getX(), b.getY(), b.getY(), elem.getHorizontalIntensity(), elem.getTotalIntensity());
    stream.format(fmt3 + "\n", elem.getInclination(), elem.getDeclination());
}