Package geomss.geom

Interface GeomElement<T extends GeomElement>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addChangeListener​(javax.swing.event.ChangeListener listener)
      Add a listener that is notified of changes to the state of this element.
      T copy()
      Returns a copy of this GeomElement instance allocated by the calling thread (possibly on the stack).
      T copyToReal()
      Return a copy of this object with any transformations or subranges removed (applied).
      java.util.Map getAllUserData()
      Returns a new Map containing all the user objects associated with this geometry element.
      Point getBoundsMax()
      Return the coordinate point representing the maximum bounding box corner of this geometry element (e.g.: max X, max Y, max Z).
      Point getBoundsMin()
      Return the coordinate point representing the minimum bounding box corner of this geometry element (e.g.: min X, min Y, min Z).
      long getID()
      Return the unique ID number of this geometry element.
      GeomPoint getLimitPoint​(int dim, boolean max, double tol)
      Returns the most extreme point, either minimum or maximum, in the specified coordinate direction on this geometry element.
      java.lang.String getName()
      Return the name of this geometry element.
      int getParDimension()
      Returns the number of parametric dimensions of this geometry element.
      int getPhyDimension()
      Returns the number of physical dimensions of this geometry element.
      javax.measure.unit.Unit<javax.measure.quantity.Length> getUnit()
      Returns the unit in which the geometry in this element are stated.
      java.lang.Object getUserData​(java.lang.Object key)
      Return any user defined object associated with this geometry element and the specified key.
      boolean isValid()
      Return true if this GeomElement contains valid and finite numerical components.
      void putAllUserData​(java.util.Map data)
      Add all the user defined data in the supplied Map to this objects map of user defined data.
      void putUserData​(java.lang.Object key, java.lang.Object value)
      Set the user defined object associated with this geometry element and the specified key.
      void removeChangeListener​(javax.swing.event.ChangeListener listener)
      Remove a listener from receiving notifications of changes to the state of this element.
      void removeUserData​(java.lang.Object key)
      Removes the entry for the specified user object key if present.
      void setName​(java.lang.String name)
      Change the name of this geometry element to the specified name (may be null to clear the name and make it undefined).
      int size()
      Returns the number of child-elements that make up this geometry element.
      T to​(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
      Returns the equivalent to this element but stated in the specified unit.
      T toDimension​(int newDim)
      Return a copy of this element converted to the specified number of physical dimensions.
      javolution.text.Text toText()
      Returns the text representation of this geometry element.
      • Methods inherited from interface java.lang.Comparable

        compareTo
    • Method Detail

      • getID

        long getID()
        Return the unique ID number of this geometry element.
        Returns:
        The unique ID of this geometry element.
      • getName

        java.lang.String getName()
        Return the name of this geometry element. If the name is not defined, then null is returned.
        Returns:
        The name of this geometry element.
      • setName

        void setName​(java.lang.String name)
        Change the name of this geometry element to the specified name (may be null to clear the name and make it undefined).
        Parameters:
        name - The name of this geometry element.
      • size

        int size()
        Returns the number of child-elements that make up this geometry element.
        Returns:
        The number of child-elements that make up this geometry element.
      • toText

        javolution.text.Text toText()
        Returns the text representation of this geometry element.
        Returns:
        The text representation of this geometry element.
      • getPhyDimension

        int getPhyDimension()
        Returns the number of physical dimensions of this geometry element.
        Returns:
        The number of physical dimensions of this geometry element.
      • toDimension

        T toDimension​(int newDim)
        Return a copy of this element converted to the specified number of physical dimensions. If the number of dimensions is greater than this element, then zeros are added to the additional dimensions. If the number of dimensions is less than this element, then the extra dimensions are simply dropped (truncated). If the new dimensions are the same as the dimension of this element, then this element is simply returned.
        Parameters:
        newDim - The dimension of the element to return.
        Returns:
        A copy of this geometry element converted to the new dimensions.
      • getParDimension

        int getParDimension()
        Returns the number of parametric dimensions of this geometry element.
        Returns:
        The number of parametric dimensions of this geometry element.
      • getBoundsMin

        Point getBoundsMin()
        Return the coordinate point representing the minimum bounding box corner of this geometry element (e.g.: min X, min Y, min Z).
        Returns:
        The minimum bounding box coordinate for this geometry element.
      • getBoundsMax

        Point getBoundsMax()
        Return the coordinate point representing the maximum bounding box corner of this geometry element (e.g.: max X, max Y, max Z).
        Returns:
        The maximum bounding box coordinate for this geometry element.
      • getLimitPoint

        GeomPoint getLimitPoint​(int dim,
                                boolean max,
                                double tol)
        Returns the most extreme point, either minimum or maximum, in the specified coordinate direction on this geometry element. This is more accurate than getBoundsMax & getBoundsMin, but also typically takes longer to compute.
        Parameters:
        dim - An index indicating the dimension to find the min/max point for (0=X, 1=Y, 2=Z, etc).
        max - Set to true to return the maximum value, false to return the minimum.
        tol - Fractional tolerance to refine the min/max point position to if necessary.
        Returns:
        The point found on this element that is the min or max in the specified coordinate direction.
        See Also:
        getBoundsMin(), getBoundsMax()
      • isValid

        boolean isValid()
        Return true if this GeomElement contains valid and finite numerical components. A value of false will be returned if any of the evaluations of this element are NaN or Inf.
        Returns:
        true if this geometry element contains valid and finite data.
      • getUnit

        javax.measure.unit.Unit<javax.measure.quantity.Length> getUnit()
        Returns the unit in which the geometry in this element are stated.
        Returns:
        The unit in which the geometry in this element are stated.
      • to

        T to​(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
        throws javax.measure.converter.ConversionException
        Returns the equivalent to this element but stated in the specified unit.
        Parameters:
        unit - the length unit of the element to be returned.
        Returns:
        an equivalent to this element but stated in the specified unit.
        Throws:
        javax.measure.converter.ConversionException - if the the input unit is not a length unit.
      • copy

        T copy()
        Returns a copy of this GeomElement instance allocated by the calling thread (possibly on the stack).
        Returns:
        an identical and independent copy of this object.
      • copyToReal

        T copyToReal()
        Return a copy of this object with any transformations or subranges removed (applied).
        Returns:
        A copy of this object with any transformations removed (applied).
      • getUserData

        java.lang.Object getUserData​(java.lang.Object key)
        Return any user defined object associated with this geometry element and the specified key. If there is no user data with the specified key, then null is returned.
        Parameters:
        key - the key whose associated value is to be returned or null if the specified key could not be found.
        Returns:
        Any user defined data associated with this geometry and the specified key.
        Throws:
        java.lang.NullPointerException - if key is null.
      • getAllUserData

        java.util.Map getAllUserData()
        Returns a new Map containing all the user objects associated with this geometry element.
        Returns:
        A new Map containing all the user objects associated with this geometry element.
      • putUserData

        void putUserData​(java.lang.Object key,
                         java.lang.Object value)
        Set the user defined object associated with this geometry element and the specified key. This can be used to store any type of information with a geometry element that could be useful.
        Parameters:
        key - the key with which the specified value is to be associated.
        value - the value to be associated with the specified key.
        Throws:
        java.lang.NullPointerException - if the key is null.
      • putAllUserData

        void putAllUserData​(java.util.Map data)
        Add all the user defined data in the supplied Map to this objects map of user defined data.
        Parameters:
        data - The Map of user defined data to be added to this object's map of user defined data.
      • removeUserData

        void removeUserData​(java.lang.Object key)
        Removes the entry for the specified user object key if present.
        Parameters:
        key - the key whose mapping is to be removed from the map.
        Throws:
        java.lang.NullPointerException - if the key is null.
      • addChangeListener

        void addChangeListener​(javax.swing.event.ChangeListener listener)
        Add a listener that is notified of changes to the state of this element.
        Parameters:
        listener - The listener to be notified of changes to the state of this element.
      • removeChangeListener

        void removeChangeListener​(javax.swing.event.ChangeListener listener)
        Remove a listener from receiving notifications of changes to the state of this element.
        Parameters:
        listener - The listener to be removed from those being notified of changes to the state of this element.