Examples of intersects()


Examples of javafx.geometry.BoundingBox.intersects()

        BoundingBox bounds = new BoundingBox(
                parentMinX + (newWidth * World.TILE_WIDTH) / 2 + (newWidth * World.TILE_WIDTH) / 2 * (x - y),
                parentMinY + (newWidth * World.TILE_HEIGHT) / 2 * (x + y),
                newWidth * World.TILE_WIDTH,
                newWidth * World.TILE_HEIGHT);
        if (bounds.intersects(checkBounds)) {
          renderLevel(bounds.getMinX(), bounds.getMinY(),
                  parentOffsetX + x * newWidth, parentOffsetY + y * newWidth,
                  newWidth);
        }
      }
 
View Full Code Here

Examples of javafx.geometry.Bounds.intersects()

    }

    private boolean isNodeWithinSceneBounds(Node node) {
        Scene scene = node.getScene();
        Bounds nodeBounds = node.localToScene(node.getBoundsInLocal());
        return nodeBounds.intersects(0, 0, scene.getWidth(), scene.getHeight());
    }

    private void assertNodesFound(Set<Node> resultNodes, String errorMessage) {
        // TODO: Save screenshot on exception.
        if (resultNodes.isEmpty()) {
View Full Code Here

Examples of javax.media.Format.intersects()

    {
      final Format f1 = new Format("abc");
      final Format f2 = new Format("abc");
      assertEquals(f1.intersects(f2), f1);
      assertEquals(f1.intersects(f2), f2);
      assertEquals(f2.intersects(f1), f1);
      assertEquals(f2.intersects(f1), f2);
    }
   
    {
      final Format f1 = new Format("abc");
View Full Code Here

Examples of javax.media.format.AudioFormat.intersects()

    // AudioFormat - equal and match:
    {
      final AudioFormat[] f2s = new AudioFormat[]{
          new AudioFormat(AudioFormat.DOLBYAC3, 2.0, 1, 2, 3, 4, 5, 6.0, Format.byteArray),
            (AudioFormat) f1.clone(),
            (AudioFormat) f1.intersects(f1)
      };
      for (int i = 0; i < f2s.length; ++i)
      {
        AudioFormat f2 = f2s[i];
        assertTrue(f1.equals(f2));
View Full Code Here

Examples of javax.media.format.H261Format.intersects()

    // H261Format - equal and match:
    {
      final H261Format[] f2s = new H261Format[]{
          new H261Format(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1),
            (H261Format) f1.clone(),
            (H261Format) f1.intersects(f1)
      };
      for (int i = 0; i < f2s.length; ++i)
      {
        H261Format f2 = f2s[i];
        assertTrue(f1.equals(f2));
View Full Code Here

Examples of javax.media.format.H263Format.intersects()

    // equal and match:
    {
      final H263Format[] f2s = new H263Format[]{
          new H263Format(new Dimension(1, 1), 2000, Format.shortArray, 2.f, 1, 2, 3, 4, 5, 6),
            (H263Format) f1.clone(),
            (H263Format) f1.intersects(f1)
      };
      for (int i = 0; i < f2s.length; ++i)
      {
        H263Format f2 = f2s[i];
        assertTrue(f1.equals(f2));
View Full Code Here

Examples of javax.media.format.IndexedColorFormat.intersects()

    // IndexedColorFormat - equal and match:
    {
      final IndexedColorFormat[] f2s = new IndexedColorFormat[]{
          new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3),
            (IndexedColorFormat) f1.clone(),
            (IndexedColorFormat) f1.intersects(f1)
      };
      for (int i = 0; i < f2s.length; ++i)
      {
        IndexedColorFormat f2 = f2s[i];
        assertTrue(f1.equals(f2));
View Full Code Here

Examples of javax.media.format.JPEGFormat.intersects()

    // equal and match:
    {
      final JPEGFormat[] f2s = new JPEGFormat[]{
          new JPEGFormat(new Dimension(1, 1), 1000, Format.shortArray, 1.f, 2, 3),
            (JPEGFormat) f1.clone(),
            (JPEGFormat) f1.intersects(f1)
      };
      for (int i = 0; i < f2s.length; ++i)
      {
        JPEGFormat f2 = f2s[i];
        assertTrue(f1.equals(f2));
View Full Code Here

Examples of javax.media.format.RGBFormat.intersects()

//      System.out.println(f1.intersects(f2));
//      System.out.println(f3); 
//      final Format f1_2 = f1.intersects(f2);
      assertEquals(f1.intersects(f2), f3);
      assertNotEquals(f1.intersects(f2), f2);
      assertEquals(f2.intersects(f1), f1);
//      final Format f2_1 = f1.intersects(f2);
//      System.out.println(f2.intersects(f1));
//      System.out.println(f4);
      assertEquals(f2.intersects(f1), f4);
    }
View Full Code Here

Examples of javax.media.format.YUVFormat.intersects()

   
    {
      final Format f1 = new RGBFormat(new Dimension(1, 1), 1000, Format.byteArray, 2.f, 11, 2, 13, 14, 5, 6, 17, 8);
      final Format f2 = new YUVFormat(new Dimension(1, 1), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6);
      assertEquals(f1.intersects(f2), null);
      assertEquals(f2.intersects(f1), null);
    }
 
  }
 
  public void testRelax()
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.