Class NurbsSurfaceTrans

    • Method Detail

      • 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<NurbsSurface>
        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<NurbsSurface>
        Parameters:
        transform - The transform to set this transform element to (may not be null).
      • size

        public int size()
        Returns the number of child-elements that make up this geometry element. This implementation returns the number of control points in the child NURBS surface.
        Specified by:
        size in interface GeomElement<NurbsSurface>
        Returns:
        The number of child-elements that make up this geometry element.
      • getNumberOfRows

        public int getNumberOfRows()
        Return the control point matrix size in the s-direction (down a column of control points).
        Specified by:
        getNumberOfRows in class NurbsSurface
        Returns:
        The control point matrix size in the s-direction.
      • getNumberOfColumns

        public int getNumberOfColumns()
        Return the control point matrix size in the t-direction (across the columns of control points).
        Specified by:
        getNumberOfColumns in class NurbsSurface
        Returns:
        The control point matrix size in the t-direction.
      • getRealPoint

        public Point getRealPoint​(double s,
                                  double t)
        Calculate a point on the surface for the given parametric position on the surface.
        Specified by:
        getRealPoint in interface Surface<NurbsSurface>
        Parameters:
        s - 1st parametric dimension distance to get the point for (0.0 to 1.0 inclusive).
        t - 2nd parametric dimension distance to get the point for (0.0 to 1.0 inclusive).
        Returns:
        The calculated point on the surface at the specified parameter values.
        Throws:
        java.lang.IllegalArgumentException - if there is any problem with the parameter values.
      • getSDerivatives

        public java.util.List<Vector<javax.measure.quantity.Length>> getSDerivatives​(double s,
                                                                                     double t,
                                                                                     int grade,
                                                                                     boolean scaled)
        Calculate all the derivatives from 0 to grade with respect to parametric s-position on the surface for the given parametric position on the surface, d^{grade}p(s,t)/d^{grade}s.

        Example:
        1st derivative (grade = 1), this returns [p(s,t), dp(s,t)/ds];
        2nd derivative (grade = 2), this returns [p(s,t), dp(s,t)/ds, d^2p(s,t)/d^2s]; etc.

        Specified by:
        getSDerivatives in class AbstractSurface<NurbsSurface>
        Parameters:
        s - 1st parametric dimension distance to calculate derivative for (0.0 to 1.0 inclusive).
        t - 2nd parametric dimension distance to calculate derivative for (0.0 to 1.0 inclusive).
        grade - The maximum grade to calculate the u-derivatives for (1=1st derivative, 2=2nd derivative, etc)
        scaled - Pass true for properly scaled derivatives or false if the magnitude of the derivative vector is not required -- this sometimes results in faster calculation times.
        Returns:
        A list of s-derivatives up to the specified grade of the surface at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the grade is < 0 or the parameter values are invalid.
      • getTDerivatives

        public java.util.List<Vector<javax.measure.quantity.Length>> getTDerivatives​(double s,
                                                                                     double t,
                                                                                     int grade,
                                                                                     boolean scaled)
        Calculate all the derivatives from 0 to grade with respect to parametric t-position on the surface for the given parametric position on the surface, d^{grade}p(s,t)/d^{grade}t.

        Example:
        1st derivative (grade = 1), this returns [p(s,t), dp(s,t)/dt];
        2nd derivative (grade = 2), this returns [p(s,t), dp(s,t)/dt, d^2p(s,t)/d^2t]; etc.

        Specified by:
        getTDerivatives in class AbstractSurface<NurbsSurface>
        Parameters:
        s - 1st parametric dimension distance to calculate derivative for (0.0 to 1.0 inclusive).
        t - 2nd parametric dimension distance to calculate derivative for (0.0 to 1.0 inclusive).
        grade - The maximum grade to calculate the v-derivatives for (1=1st derivative, 2=2nd derivative, etc)
        scaled - Pass true for properly scaled derivatives or false if the magnitude of the derivative vector is not required -- this sometimes results in faster calculation times.
        Returns:
        A list of t-derivatives up to the specified grade of the surface at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the grade is < 0 or the parameter values are invalid.
      • getTwistVector

        public Vector<javax.measure.quantity.Length> getTwistVector​(double s,
                                                                    double t)
        Calculate the twist vector (d^2P/(ds*dt) = d(dP/ds)/dt) for this surface at the specified position on this surface.
        Specified by:
        getTwistVector in interface Surface<NurbsSurface>
        Parameters:
        s - 1st parametric dimension distance to calculate twist vector for (0.0 to 1.0 inclusive).
        t - 2nd parametric dimension distance to calculate twist vector for (0.0 to 1.0 inclusive).
        Returns:
        The twist vector of this surface at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the parameter values are invalid.
      • getBoundsMin

        public Point getBoundsMin()
        Return the coordinate point representing the minimum bounding box corner of this geometry element (e.g.: min X, min Y, min Z).
        Specified by:
        getBoundsMin in interface GeomElement<NurbsSurface>
        Returns:
        The minimum bounding box coordinate for this geometry element.
        Throws:
        java.lang.IndexOutOfBoundsException - if this list contains no elements.
      • getBoundsMax

        public Point getBoundsMax()
        Return the coordinate point representing the maximum bounding box corner (e.g.: max X, max Y, max Z).
        Specified by:
        getBoundsMax in interface GeomElement<NurbsSurface>
        Returns:
        The maximum bounding box coordinate for this geometry element.
        Throws:
        java.lang.IndexOutOfBoundsException - if this list contains no elements.
      • getUnit

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

        public NurbsSurfaceTrans to​(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
                             throws javax.measure.converter.ConversionException
        Returns the equivalent to this surface but stated in the specified unit.
        Specified by:
        to in interface GeomElement<NurbsSurface>
        Specified by:
        to in interface ParametricGeometry<NurbsSurface>
        Specified by:
        to in interface Surface<NurbsSurface>
        Parameters:
        unit - the length unit of the surface to be returned. May not be null.
        Returns:
        an equivalent to this surface but stated in the specified unit.
        Throws:
        javax.measure.converter.ConversionException - if the the input unit is not a length unit.
      • toDimension

        public NurbsSurfaceTrans toDimension​(int newDim)
        Return the equivalent of this surface 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<NurbsSurface>
        Specified by:
        toDimension in interface ParametricGeometry<NurbsSurface>
        Specified by:
        toDimension in interface Surface<NurbsSurface>
        Parameters:
        newDim - The dimension of the surface to return. MUST equal 3.
        Returns:
        The equivalent of this surface converted to the new dimensions.
        Throws:
        java.lang.IllegalArgumentException - if the new dimension is anything other than 3.
      • equals

        public boolean equals​(java.lang.Object obj)
        Compares this NurbsSurfaceTrans against the specified object for strict equality.
        Overrides:
        equals in class AbstractGeomElement<NurbsSurface>
        Parameters:
        obj - the object to compare with.
        Returns:
        true if this transform is identical to that transform; false otherwise.
      • recycle

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