Class dXdYdZSolid

    • Field Detail

      • X

        protected final double X
        X
      • Y

        protected final double Y
        Y
      • Z

        protected final double Z
        Z
      • isOnSurface

        protected final boolean isOnSurface
        On surface?
      • thePoint

        protected final GeoPoint thePoint
        The point
      • edgePoints

        protected final GeoPoint[] edgePoints
        These are the edge points of the shape, which are defined to be at least one point on each surface area boundary. In the case of a solid, this includes points which represent the intersection of XYZ bounding planes and the planet, as well as points representing the intersection of single bounding planes with the planet itself.
      • nullPoints

        protected static final GeoPoint[] nullPoints
        Empty array of GeoPoint.
    • Constructor Detail

      • dXdYdZSolid

        public dXdYdZSolid​(PlanetModel planetModel,
                           double X,
                           double Y,
                           double Z)
        Sole constructor
        Parameters:
        planetModel - is the planet model.
        X - is the X value.
        Y - is the Y value.
        Z - is the Z value.
      • dXdYdZSolid

        public dXdYdZSolid​(PlanetModel planetModel,
                           java.io.InputStream inputStream)
                    throws java.io.IOException
        Constructor for deserialization.
        Parameters:
        planetModel - is the planet model.
        inputStream - is the input stream.
        Throws:
        java.io.IOException
    • Method Detail

      • write

        public void write​(java.io.OutputStream outputStream)
                   throws java.io.IOException
        Description copied from interface: SerializableObject
        Serialize to output stream.
        Specified by:
        write in interface SerializableObject
        Overrides:
        write in class BasePlanetObject
        Parameters:
        outputStream - is the output stream to write to.
        Throws:
        java.io.IOException
      • isWithin

        public boolean isWithin​(double x,
                                double y,
                                double z)
        Description copied from interface: Membership
        Check if a point is within this shape.
        Specified by:
        isWithin in interface Membership
        Specified by:
        isWithin in class BaseXYZSolid
        Parameters:
        x - is x coordinate of point to check.
        y - is y coordinate of point to check.
        z - is z coordinate of point to check.
        Returns:
        true if the point is within this shape
      • getRelationship

        public int getRelationship​(GeoShape path)
        Description copied from interface: GeoArea
        Find the spatial relationship between a shape and the current geo area. Note: return value is how the GeoShape relates to the GeoArea, not the other way around. For example, if this GeoArea is entirely within the shape, then CONTAINS should be returned. If the shape is entirely enclosed by this GeoArea, then WITHIN should be returned.

        It is permissible to return OVERLAPS instead of WITHIN if the shape intersects with the area at even a single point. So, a circle inscribed in a rectangle could return either OVERLAPS or WITHIN, depending on implementation. It is not permissible to return CONTAINS or DISJOINT in this circumstance, however.

        Similarly, it is permissible to return OVERLAPS instead of CONTAINS under conditions where the shape consists of multiple independent overlapping subshapes, and the area overlaps one of the subshapes. It is not permissible to return WITHIN or DISJOINT in this circumstance, however.

        Parameters:
        path - is the shape to consider.
        Returns:
        the relationship, from the perspective of the shape.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class BaseXYZSolid
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object