Package geomss.geom

Class GeomPlaneTrans

    • Method Detail

      • newInstance

        public static GeomPlaneTrans newInstance​(GeomPlane child,
                                                 GTransform transform)
        Returns a 3D GeomPlaneTrans instance holding the specified GeomPlane and GTransform.
        Parameters:
        child - The plane that is the child of this transform element (may not be null).
        transform - The transform held by this transform element (may not be null).
        Returns:
        the transform element having the specified values.
        Throws:
        DimensionException - if the input element is not 3D.
      • getTotalTransform

        public GTransform getTotalTransform()
        Returns the total transformation represented by an entire chain of GeomTransform objects below this one.
        Specified by:
        getTotalTransform in interface GeomTransform<GeomPlane>
        Returns:
        The total transformation represented by an entire chain of GeomTransform objects below this one.
      • setTransform

        public void setTransform​(GTransform transform)
        Sets the transformation represented by this transformation element.
        Specified by:
        setTransform in interface GeomTransform<GeomPlane>
        Parameters:
        transform - The transform to set this transform element to (may not be null).
      • immutable

        public Plane immutable()
        Return an immutable version of this plane.
        Specified by:
        immutable in class GeomPlane
        Returns:
        An immutable version of this plane.
      • recycle

        public static void recycle​(GeomPlaneTrans instance)
        Recycles a GeomPlaneTrans instance immediately (on the stack when executing in a StackContext).
        Parameters:
        instance - The instance to be recycled.
      • getPhyDimension

        public int getPhyDimension()
        Returns the number of physical dimensions of the geometry element. This implementation always returns 3.
        Specified by:
        getPhyDimension in interface GeomElement<GeomPlane>
        Returns:
        The number of physical dimensions of this geometry element.
      • getNormal

        public GeomVector<javax.measure.quantity.Dimensionless> getNormal()
        Return the normal vector for the plane. The normal vector is a unit vector that is perpendicular to the plane.
        Specified by:
        getNormal in class GeomPlane
        Returns:
        The normal vector for the plane.
      • getConstant

        public Parameter<javax.measure.quantity.Length> getConstant()
        Return the constant term of the plane equation (e.g.: "D" for a 3D plane: A*x + B*y + C*z = D).
        Specified by:
        getConstant in class GeomPlane
        Returns:
        The constant term of the plane equation for this plane.
      • getRefPoint

        public GeomPointTrans getRefPoint()
        Return the reference point for this plane. The reference point is an arbitrary point that is contained in the plane and is used as a reference when drawing the plane.
        Specified by:
        getRefPoint in class GeomPlane
        Returns:
        The reference point for this plane.
      • toDimension

        public GeomPlaneTrans toDimension​(int newDim)
        Return the equivalent of this plane converted to the specified number of physical dimensions. This implementation will throw an exception if the specified dimension is anything other than 3.
        Specified by:
        toDimension in interface GeomElement<GeomPlane>
        Specified by:
        toDimension in class GeomPlane
        Parameters:
        newDim - The dimension of the plane to return. MUST equal 3.
        Returns:
        The equivalent of this plane converted to the new dimensions.
        Throws:
        java.lang.IllegalArgumentException - if the new dimension is anything other than 3.
      • getUnit

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

        public GeomPlane 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.

        WARNING: If the unit changes, then the returned transform element DOES NOT refer back to the original plane (the link with the original plane is broken).

        Specified by:
        to in interface GeomElement<GeomPlane>
        Parameters:
        unit - the length unit of the element to be returned. May not be null.
        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.
      • equals

        public boolean equals​(java.lang.Object obj)
        Compares this GeomPlaneTrans against the specified object for strict equality (same values and same units).
        Overrides:
        equals in class AbstractGeomElement<GeomPlane>
        Parameters:
        obj - the object to compare with.
        Returns:
        true if this point is identical to that point; false otherwise.
      • copy

        public GeomPlaneTrans copy()
        Returns a copy of this GeomPlaneTrans instance allocated by the calling thread (possibly on the stack).
        Specified by:
        copy in interface GeomElement<GeomPlane>
        Specified by:
        copy in class GeomPlane
        Returns:
        an identical and independent copy of this object.