Class/Object

com.spark3d.geometryObjects

BoxEnvelope

Related Docs: object BoxEnvelope | package geometryObjects

Permalink

class BoxEnvelope extends Shape3D with Serializable

Defines a cubical region of 3D coordinate space. This can be used to define a bounding box of a geometryObject

An cube Envelope can be uniquely defined based on minimum and maximum coordinates along all three axes. On creating the cube Envelope initially, the min's and max's are assigned automatically.

Default constructor is kept private to avoid creating an instance of the cube Envelope class without initialising the min/max coordinates along axes incorrectly.

Linear Supertypes
Serializable, Serializable, Shape3D, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BoxEnvelope
  2. Serializable
  3. Serializable
  4. Shape3D
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BoxEnvelope(env: BoxEnvelope)

    Permalink

    Clones an existing cube Envelope to create a duplicate cube Envelope.

    Clones an existing cube Envelope to create a duplicate cube Envelope.

    env

    original cube Envelope to be cloned

  2. new BoxEnvelope(p1: Point3D)

    Permalink

    Creates an cube Envelope for a region defined one coordinate.

    Creates an cube Envelope for a region defined one coordinate. The cube Envelope in this case will be a point.

    p1

    the coordinate

  3. new BoxEnvelope(p1: Point3D, p2: Point3D)

    Permalink

    Creates an cube Envelope for a region defined by two coordinates.

    Creates an cube Envelope for a region defined by two coordinates.

    p1

    first coordinate

    p2

    second coordinate

  4. new BoxEnvelope(p1: Point3D, p2: Point3D, p3: Point3D)

    Permalink

    Creates an cube Envelope for a region defined by three coordinates.

    Creates an cube Envelope for a region defined by three coordinates.

    p1

    first coordinate

    p2

    second coordinate

    p3

    third coordinate

  5. new BoxEnvelope()

    Permalink

    Creates a null cube Envelope

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val center: Point3D

    Permalink

    The center

    The center

    Definition Classes
    BoxEnvelopeShape3D
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def contains(x: Double, y: Double, z: Double): Boolean

    Permalink

    Tests if the given point lies in or on the envelope.

    Tests if the given point lies in or on the envelope.

    x

    the x-coordinate of the point for which the containment is to be checked

    y

    the y-coordinate of the point for which the containment is to be checked

    z

    the z-coordinate of the point for which the containment is to be checked

    returns

    true if (x, y, z) lies in the interior or on the boundary of this cube Envelope, false if the cube Envelope is null.

  8. def contains(env: BoxEnvelope): Boolean

    Permalink

    Tests if the cube Envelope other lies wholely inside this cube Envelope (inclusive of the boundary).

    Tests if the cube Envelope other lies wholely inside this cube Envelope (inclusive of the boundary).

    env

    the cube Envelope to check

    returns

    true if this cube Envelope covers the other cube Envelope, false if either of these cube Envelope is null

  9. def contains(p: Point3D): Boolean

    Permalink

    Tests if the given point lies in or on the envelope.

    Tests if the given point lies in or on the envelope.

    p

    Point3D to be checked for the containment

    returns

    true if the p lies in the interior or on the boundary of this cube Envelope, false if the cube Envelope is null.

  10. def covers(env: BoxEnvelope): Boolean

    Permalink

    Tests if the cube Envelope other lies completely inside this cube Envelope (inclusive of the boundary).

    Tests if the cube Envelope other lies completely inside this cube Envelope (inclusive of the boundary).

    env

    the cube Envelope to check

    returns

    true if this cube Envelope covers the other cube Envelope, false if either of these cube Envelope is null

  11. def covers(x: Double, y: Double, z: Double): Boolean

    Permalink

    Tests if the given point lies in or on the envelope.

    Tests if the given point lies in or on the envelope.

    x

    the x-coordinate of the point for which this cube Envelope is being checked for containment

    y

    the y-coordinate of the point for which this cube Envelope is being checked for containment

    z

    the z-coordinate of the point for which this cube Envelope is being checked for containment

    returns

    true if (x, y, z) lies in the interior or on the boundary of this cube Envelope, false if the cube Envelope is null.

  12. def covers(p: Point3D): Boolean

    Permalink

    Tests if the given point lies in or on the envelope.

    Tests if the given point lies in or on the envelope.

    p

    Point3D to be checked for the containment

    returns

    true if the p lies in the interior or on the boundary of this cube Envelope, false if the cube Envelope is null.

  13. def distance(env: BoxEnvelope): Double

    Permalink

    Computes the distance between this and another cube Envelope The distance between overlapping cube Envelopes is 0.

    Computes the distance between this and another cube Envelope The distance between overlapping cube Envelopes is 0. Otherwise, the distance is the Euclidean distance between the closest points.

    env

    the other cube Envelope from which distance is to be computed

    returns

    the distance between the two cube Envelopes

  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def expandBy(deltaX: Double, deltaY: Double, deltaZ: Double): Unit

    Permalink

    Expand cube Envelope by given distances along the three dimension.

    Expand cube Envelope by given distances along the three dimension.

    deltaX

    the distance to expand the cube Envelope along the the X axis

    deltaY

    the distance to expand the cube Envelope along the the Y axis

    deltaZ

    the distance to expand the cube Envelope along the the Z axis

  17. def expandBy(delta: Double): Unit

    Permalink

    Expand cube Envelope by given distance along the all three dimensions.

    Expand cube Envelope by given distance along the all three dimensions.

    delta

    the distance to expand the cube Envelope along all the axes

  18. def expandToInclude(env: BoxEnvelope): Unit

    Permalink

    Expand the cube Envelope so that it includes the other cube Envelope.

    Expand the cube Envelope so that it includes the other cube Envelope.

    env

    the cube Envelope to expand to include

  19. def expandToInclude(x: Double, y: Double, z: Double): Unit

    Permalink

    Enlarges this cube Envelope so that it contains the given point.

    Enlarges this cube Envelope so that it contains the given point. Has no effect if the point is already on or within the envelope.

    x

    the value to lower the minimum x to or to raise the maximum x to

    y

    the value to lower the minimum y to or to raise the maximum y to

    z

    the value to lower the minimum z to or to raise the maximum z to

  20. def expandToInclude(p: Point3D): Unit

    Permalink

    Expand the cube Envelope so that it contains the given Point

    Expand the cube Envelope so that it contains the given Point

    p

    the Point to expand to include

  21. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  23. def getEnvelope: BoxEnvelope

    Permalink

    The box envelope is already an envelope!

    The box envelope is already an envelope!

    returns

    (BoxEnvelope) the BoxEnvelope instance.

    Definition Classes
    BoxEnvelopeShape3D
  24. def getVolume(): Double

    Permalink

    Returns the volume of the cube Envelope.

    Returns the volume of the cube Envelope.

    returns

    the volume of the envelope, 0.0 if the cube Envelope is null

  25. def getXLength(): Double

    Permalink

    Return the difference between max and min X values of the cube Envelope.

    Return the difference between max and min X values of the cube Envelope.

    returns

    maxX - minX, or 0 if the cube Envelope is null

  26. def getYLength(): Double

    Permalink

    Returns the difference between max and min Y value of the cube Envelope.

    Returns the difference between max and min Y value of the cube Envelope.

    returns

    maxX - minY, or 0 if the cube Envelope is null

  27. def getZLength(): Double

    Permalink

    Return the difference between max and min Z value of the cube Envelope.

    Return the difference between max and min Z value of the cube Envelope.

    returns

    maxZ - minZ, or 0 if the cube Envelope is null

  28. def hasCenterCloseTo(p: Point3D, epsilon: Double): Boolean

    Permalink

    Return if the input Point3D is equal this Point3D

    Return if the input Point3D is equal this Point3D

    p

    Point3D for which the comparison has to be done

    returns

    true if the two Point3D centers are within epsilon

    Definition Classes
    Shape3D
  29. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  30. var indexID: Int

    Permalink

    Attach an id to the BoxEnvelope to be used while assigning partition ID.

  31. def intersection(env: BoxEnvelope): BoxEnvelope

    Permalink

    Comptutes the intersection of the two cube Envelopes

    Comptutes the intersection of the two cube Envelopes

    env

    the envelope to find intersection with

    returns

    a new cube Envelope representing the intersection of the envelopes (this will be the null envelope if either if the envelopes is null, or they do not intersect

  32. def intersects(x: Double, y: Double, z: Double): Boolean

    Permalink

    Check if the point (x, y, z) intersects (lies inside) the region of this cube Envelope.

    Check if the point (x, y, z) intersects (lies inside) the region of this cube Envelope.

    x

    the x-coordinate of the point

    y

    the y-coordinate of the point

    z

    the z-coordinate of the point

    returns

    true if the point overlaps this cube Envelope

  33. def intersects(p1: Point3D, p2: Point3D, p3: Point3D): Boolean

    Permalink

    Checks if the region the three external points intersects the region of this cube Envelope.

    Checks if the region the three external points intersects the region of this cube Envelope.

    p1

    the first external point

    p2

    the second external point

    p3

    the third external point

    returns

    true if the region intersects the other cube Envelope

  34. def intersects(env: BoxEnvelope): Boolean

    Permalink

    Checks if the region of the input cube Envelope intersects the region of this cube Envelope.

    Checks if the region of the input cube Envelope intersects the region of this cube Envelope.

    env

    the cube Envelope with which the intersection is being checked

    returns

    true if the cube Envelope intersects the other cube Envelope

  35. def isEqual(other: AnyRef): Boolean

    Permalink

    Checks if the input cube Envelope is equal to the this cube Envelope.

    Checks if the input cube Envelope is equal to the this cube Envelope. Return false if the input Object is not an instance of the cube Envelope class or either of these cube Envelopes is Empty.

    other

    the other cube Envelope for which the equality is to be checked

    returns

    true if the two cube Envelopes are equal, false otherwise

  36. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  37. def isNull(): Boolean

    Permalink

    Checks if this is a null envelope or not.

    Checks if this is a null envelope or not.

    returns

    if this cube Envelope is null (empty Geometry) or nots

  38. def maxExtent(): Double

    Permalink

    Gets maximum extent of this cube Envelope across all three dimensions.

    Gets maximum extent of this cube Envelope across all three dimensions.

    returns

    the maximum extent of this cube Envelope

  39. var maxX: Double

    Permalink

    maximum coordinate of cube Envelope along X-axis

  40. var maxY: Double

    Permalink

    maximum coordinate of cube Envelope along Y-axis

  41. var maxZ: Double

    Permalink

    maximum coordinate of cube Envelope along Z-axis

  42. def minExtent(): Double

    Permalink

    Gets minimum extent of this cube Envelope across all three dimensions.

    Gets minimum extent of this cube Envelope across all three dimensions.

    returns

    the minimum extent of this cube Envelope

  43. var minX: Double

    Permalink

    minimum coordinate of cube Envelope along X-axis

  44. var minY: Double

    Permalink

    minimum coordinate of cube Envelope along Y-axis

  45. var minZ: Double

    Permalink

    minimum coordinate of cube Envelope along Z-axis

  46. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  47. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  48. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  49. def setToNull: Unit

    Permalink

    Sets this cube Envelope to null

  50. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  51. def toHealpix(nside: Int, thetaphi: Boolean = false): Long

    Permalink

    Compute the healpix index of the geometry center.

    Compute the healpix index of the geometry center. By default, the method considers that this.y = ra, this.z = dec. You can also bypass that, and force this.y = theta, this.z = phi by setting thetaphi = true. We only consider the RING scheme for the moment.

    nside

    : (Int) Resolution of the healpix map.

    thetaphi

    : (Boolean) Convention for your data: this.y = ra, this.z = dec if false, this.y = theta, this.z = phi otherwise. Default is false.

    returns

    (Long) Healpix index of the point for the resolution chosen.

    Definition Classes
    Shape3D
  52. def toString(): String

    Permalink

    Represent the cube Envelope as a String

    Represent the cube Envelope as a String

    returns

    String representation of the cube Envelope

    Definition Classes
    BoxEnvelope → AnyRef → Any
  53. def translate(transX: Double, transY: Double, transZ: Double): Unit

    Permalink

    Translates/move this envelope by given amounts in the X, Y and Z direction.

    Translates/move this envelope by given amounts in the X, Y and Z direction.

    transX

    the amount to translate along the X axis

    transY

    the amount to translate along the Y axis

    transZ

    the amount to translate along the Z axis

  54. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Shape3D

Inherited from AnyRef

Inherited from Any

Ungrouped