Class QuadraticSurfacePtr


  • public class QuadraticSurfacePtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • Constructor Detail

      • QuadraticSurfacePtr

        public QuadraticSurfacePtr​(long cPtr,
                                   boolean cMemoryOwn)
      • QuadraticSurfacePtr

        public QuadraticSurfacePtr()
        Default constructor yielding a NULL-pointer.
      • QuadraticSurfacePtr

        public QuadraticSurfacePtr​(QuadraticSurface ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • delete

        public void delete()
      • isShared

        public boolean isShared()
        check if this Ptr has shared ownership or none
        ownership
        Returns:
        true if Ptr has shared ownership, false if it has no ownership.
      • isNull

        public boolean isNull()
        checks if the pointer is null
        Returns:
        Returns true if the pointer is null
      • setDiscretizationResolution

        public void setDiscretizationResolution​(double resolution)
      • SurfaceEqual

        public boolean SurfaceEqual​(Surface surface,
                                    double threshold)
      • call

        public double call​(Vector3D in)
      • insideTrimmingRegion

        public boolean insideTrimmingRegion​(Vector3D P)
      • u

        public double u()
        Get the scalar for the zero order term in the implicit formulation.
      • determinantA

        public double determinantA()
        Get the determinant of the \mathbf{A} matrix.
        Returns:
        the determinant.
      • normalize

        public QuadraticSurfacePtr normalize()
        Normalize the implicit expression such that the largest coefficient becomes one.

        For a quadratic surface, a scaling of \mathbf{A}, \mathbf{a} and u with a common
        factor, will give the exact same surface. This means that the numerical values can get
        arbitrarily big or small. This functions scales the expression such that the largest
        element becomes 1.

        Returns:
        a mathematically identical surface, where the coefficients of the defining
        equation is normalized.
      • addTrimmingCondition

        public void addTrimmingCondition​(ImplicitSurfaceCPtr condition)
        Add a trimming condition to this surface.
        Parameters:
        condition - [in] the condition to add.
      • diagonalized

        public boolean diagonalized()
        Check if this surface is diagonalized.
        Returns:
        true if A is digaonalized, false otherwise.
      • makeEllipticParaboloid

        public QuadraticSurfacePtr makeEllipticParaboloid​(double a,
                                                          double b)
      • makeHyperbolicParaboloid

        public QuadraticSurfacePtr makeHyperbolicParaboloid​(double a,
                                                            double b)
      • makeEllipticHyperboloidOneSheet

        public QuadraticSurfacePtr makeEllipticHyperboloidOneSheet​(double a,
                                                                   double b,
                                                                   double c)
      • makeCircularHyperboloidOneSheet

        public QuadraticSurfacePtr makeCircularHyperboloidOneSheet​(double a,
                                                                   double b)
      • makeEllipticHyperboloidTwoSheets

        public QuadraticSurfacePtr makeEllipticHyperboloidTwoSheets​(double a,
                                                                    double b,
                                                                    double c)
      • makeCircularHyperboloidTwoSheets

        public QuadraticSurfacePtr makeCircularHyperboloidTwoSheets​(double a,
                                                                    double b)
      • makeEllipticCone

        public QuadraticSurfacePtr makeEllipticCone​(double a,
                                                    double b,
                                                    double c)
      • makeEllipticCylinder

        public QuadraticSurfacePtr makeEllipticCylinder​(double a,
                                                        double b)
      • makeCircularCylinder

        public QuadraticSurfacePtr makeCircularCylinder​(double radius,
                                                        boolean outward)
      • makeHyperbolicCylinder

        public QuadraticSurfacePtr makeHyperbolicCylinder​(double a,
                                                          double b)
      • makePlane

        public QuadraticSurfacePtr makePlane​(Vector3D n,
                                             double d)
        Represent a plane as a QuadraticSurface.

        A plane is a particularly simple type of quadratic surface, where
        \mathbf{A}=\mathbf{0} .

        Even though a plane is not strictly a quadratic surface, is is often convenient to be
        able to treat it like a quadratic surface.

        Parameters:
        n - [in] the normal of the plane.
        d - [in] the distance from the plane to the origo.
        Returns:
        a QuadraticSurface representing a plane.