Package resonant.lib.prefab.vector

Examples of resonant.lib.prefab.vector.Cuboid


  {
    Vector3 projectorPos = new Vector3((TileEntity) projector);
    projectorPos.add(projector.getTranslation());
    Vector3 relativePosition = position.clone().subtract(projectorPos);
    relativePosition.rotate(-projector.getRotationYaw(), -projector.getRotationPitch());
    Cuboid region = new Cuboid(projector.getNegativeScale().clone().scale(-1), projector.getPositiveScale());
    return region.intersects(relativePosition);
  }
View Full Code Here


  public boolean onProject(IProjector projector, Set<Vector3> fields)
  {
    final double repulsionVelocity = Math.max(projector.getModuleCount(this) / 20, 1.2);
    final Set<Vector3> field = projector.getCalculatedField();

    Cuboid volume = new Cuboid(projector.getNegativeScale().clone().invert(), projector.getPositiveScale().clone().add(1)).add(new Vector3((TileEntity) projector).add(projector.getTranslation()));
    List<Entity> entities = ((TileEntity) projector).getWorldObj().getEntitiesWithinAABB(Entity.class, volume.toAABB());

    for (Entity entity : entities)
    {
      Vector3 fieldPos = new Vector3(entity).floor();
View Full Code Here

    projectorPos.add(new Vector3(0, -negScale.intY() + 1, 0));

    Vector3 relativePosition = position.clone().subtract(projectorPos);
    relativePosition.rotate(-projector.getRotationYaw(), -projector.getRotationPitch());

    Cuboid region = new Cuboid(negScale.scale(-1), posScale);

    if (region.isIn(relativePosition) && relativePosition.y > 0)
    {
      if ((1 - (Math.abs(relativePosition.x) / xStretch) - (Math.abs(relativePosition.z) / zStretch) > relativePosition.y / yStretch))
      {
        return true;
      }
View Full Code Here

TOP

Related Classes of resonant.lib.prefab.vector.Cuboid

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.