Loading...
Searching...
No Matches
com.navigine.idl.java.BoundingBox Class Reference

Axis-aligned bounding box defined by two corner points. More...

Public Member Functions

 BoundingBox (Point bottomLeft, Point topRight)
 Default constructor for class BoundingBox.
 
Point getBottomLeft ()
 Lower-left corner of the bounding box.
 
Point getTopRight ()
 Upper-right corner of the bounding box.
 
String toString ()
 

Detailed Description

Axis-aligned bounding box defined by two corner points.

Java code snippet:

BoundingBox boundingBox = new BoundingBox(bottomLeft, topRight);
System.out.printf("Created bounding box: bottomLeft(%.1f, %.1f), topRight(%.1f, %.1f)%n",
boundingBox.getBottomLeft().getX(), boundingBox.getBottomLeft().getY(),
boundingBox.getTopRight().getX(), boundingBox.getTopRight().getY());

Kotlin code snippet:

val boundingBox = BoundingBox(bottomLeft, topRight)
println("Created bounding box: bottomLeft(${boundingBox.bottomLeft.x}, ${boundingBox.bottomLeft.y}), topRight(${boundingBox.topRight.x}, ${boundingBox.topRight.y})")

Definition at line 22 of file BoundingBox.java.

Constructor & Destructor Documentation

◆ BoundingBox()

com.navigine.idl.java.BoundingBox.BoundingBox ( Point bottomLeft,
Point topRight )
inline

Default constructor for class BoundingBox.

Definition at line 32 of file BoundingBox.java.

Member Function Documentation

◆ getBottomLeft()

Point com.navigine.idl.java.BoundingBox.getBottomLeft ( )
inline

Lower-left corner of the bounding box.

Returns

Java code snippet:

Point leftCorner = boundingBox.getBottomLeft();
System.out.printf("Bottom-left corner: (%.1f, %.1f)%n", leftCorner.getX(), leftCorner.getY());

Kotlin code snippet:

val leftCorner = boundingBox.bottomLeft
println("Bottom-left corner: (${leftCorner.x}, ${leftCorner.y})")

Definition at line 51 of file BoundingBox.java.

◆ getTopRight()

Point com.navigine.idl.java.BoundingBox.getTopRight ( )
inline

Upper-right corner of the bounding box.

Returns

Java code snippet:

Point rightCorner = boundingBox.getTopRight();
System.out.printf("Top-right corner: (%.1f, %.1f)%n", rightCorner.getX(), rightCorner.getY());

Kotlin code snippet:

val rightCorner = boundingBox.topRight
println("Top-right corner: (${rightCorner.x}, ${rightCorner.y})")

Definition at line 67 of file BoundingBox.java.

◆ toString()

String com.navigine.idl.java.BoundingBox.toString ( )
inline

Definition at line 72 of file BoundingBox.java.


The documentation for this class was generated from the following file: