Class BSplineLattice3Df


  • public class BSplineLattice3Df
    extends java.lang.Object
    This class manages a 3D lattice of control points given a discretized B-Spline basis for each axis.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected WildMagic.LibFoundation.Mathematics.Vector3f[][][] m_aaakControlPoint
      DOCUMENT ME!
      protected WildMagic.LibFoundation.Curves.BSplineBasisDiscretef m_kBasisX
      DOCUMENT ME!
      protected WildMagic.LibFoundation.Curves.BSplineBasisDiscretef m_kBasisY
      DOCUMENT ME!
      protected WildMagic.LibFoundation.Curves.BSplineBasisDiscretef m_kBasisZ
      DOCUMENT ME!
    • Constructor Summary

      Constructors 
      Constructor Description
      BSplineLattice3Df​(WildMagic.LibFoundation.Curves.BSplineBasisDiscretef kBasisX, WildMagic.LibFoundation.Curves.BSplineBasisDiscretef kBasisY, WildMagic.LibFoundation.Curves.BSplineBasisDiscretef kBasisZ)
      Create 3D lattice of control points given a discretized B-Spline basis for each axis.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ModelSimpleImage[] createImageMap​(int iSizeX, int iSizeY, int iSizeZ)
      Create an image of the specified dimensions and fill it to contain a mapping of the coordinates based on the 3D lattice of B-spline control points.
      void finalize()
      Cleanup memory.
      WildMagic.LibFoundation.Curves.BSplineBasisDiscretef getBasisX()
      Return the discretized B-Spline basis for the X axis.
      WildMagic.LibFoundation.Curves.BSplineBasisDiscretef getBasisY()
      Return the discretized B-Spline basis for the Y axis.
      WildMagic.LibFoundation.Curves.BSplineBasisDiscretef getBasisZ()
      Return the discretized B-Spline basis for the Z axis.
      void getControlPoint​(int iControlX, int iControlY, int iControlZ, WildMagic.LibFoundation.Mathematics.Vector3f kPoint)
      Retrieve the position of the specified control point.
      void getPosition​(float fX, float fY, float fZ, WildMagic.LibFoundation.Mathematics.Vector3f kPos)
      Return the B-Spline evaluation for the given input values.
      void getPosition​(int iSampleX, int iSampleY, int iSampleZ, WildMagic.LibFoundation.Mathematics.Vector3f kPos)
      Return the B-Spline evaluation for the given input values.
      void setControlPoint​(int iControlX, int iControlY, int iControlZ, WildMagic.LibFoundation.Mathematics.Vector3f kPoint)
      Set the position of the specified control point.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • m_aaakControlPoint

        protected WildMagic.LibFoundation.Mathematics.Vector3f[][][] m_aaakControlPoint
        DOCUMENT ME!
      • m_kBasisX

        protected WildMagic.LibFoundation.Curves.BSplineBasisDiscretef m_kBasisX
        DOCUMENT ME!
      • m_kBasisY

        protected WildMagic.LibFoundation.Curves.BSplineBasisDiscretef m_kBasisY
        DOCUMENT ME!
      • m_kBasisZ

        protected WildMagic.LibFoundation.Curves.BSplineBasisDiscretef m_kBasisZ
        DOCUMENT ME!
    • Constructor Detail

      • BSplineLattice3Df

        public BSplineLattice3Df​(WildMagic.LibFoundation.Curves.BSplineBasisDiscretef kBasisX,
                                 WildMagic.LibFoundation.Curves.BSplineBasisDiscretef kBasisY,
                                 WildMagic.LibFoundation.Curves.BSplineBasisDiscretef kBasisZ)
        Create 3D lattice of control points given a discretized B-Spline basis for each axis. Initially, all of the control points are equally spaced.
        Parameters:
        kBasisX - BSplineBasisDiscretef B-Spline basis for the X axis.
        kBasisY - BSplineBasisDiscretef B-Spline basis for the Y axis.
        kBasisZ - BSplineBasisDiscretef B-Spline basis for the Z axis.
    • Method Detail

      • createImageMap

        public ModelSimpleImage[] createImageMap​(int iSizeX,
                                                 int iSizeY,
                                                 int iSizeZ)
        Create an image of the specified dimensions and fill it to contain a mapping of the coordinates based on the 3D lattice of B-spline control points.
        Parameters:
        iSizeX - int Number of samples along x axis of image.
        iSizeY - int Number of samples along y axis of image.
        iSizeZ - int Number of samples along z axis of image.
        Returns:
        ModelSimpleImage[] Array of three ModelSimpleImage instances. The first one contains the x coordinate, the second contains the y coordinate for the map, and the third contains the z coordinate for the map. Each image has default resolutions of 1 for each axis.
      • finalize

        public void finalize()
                      throws java.lang.Throwable
        Cleanup memory.
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable - DOCUMENT ME!
      • getBasisX

        public WildMagic.LibFoundation.Curves.BSplineBasisDiscretef getBasisX()
        Return the discretized B-Spline basis for the X axis.
        Returns:
        BSplineBasisDiscretef B-Spline basis.
      • getBasisY

        public WildMagic.LibFoundation.Curves.BSplineBasisDiscretef getBasisY()
        Return the discretized B-Spline basis for the Y axis.
        Returns:
        BSplineBasisDiscretef B-Spline basis.
      • getBasisZ

        public WildMagic.LibFoundation.Curves.BSplineBasisDiscretef getBasisZ()
        Return the discretized B-Spline basis for the Z axis.
        Returns:
        BSplineBasisDiscretef B-Spline basis.
      • getControlPoint

        public void getControlPoint​(int iControlX,
                                    int iControlY,
                                    int iControlZ,
                                    WildMagic.LibFoundation.Mathematics.Vector3f kPoint)
        Retrieve the position of the specified control point.
        Parameters:
        iControlX - int Identifies control point in 3D lattice.
        iControlY - int Identifies control point in 3D lattice.
        iControlZ - int Identifies control point in 3D lattice.
        kPoint - Point3f Where the current coordinates of the control point will be stored upon return.
      • getPosition

        public void getPosition​(int iSampleX,
                                int iSampleY,
                                int iSampleZ,
                                WildMagic.LibFoundation.Mathematics.Vector3f kPos)
        Return the B-Spline evaluation for the given input values. The evaluation is based on the 3D evaluation of the B-Spline basis (one for each axis) and the 3D lattice of control points.
        Parameters:
        iSampleX - int Sample index along X axis which determines an input value in the [0,1] for that axis' B-Spline basis evaluation.
        iSampleY - int Sample index along Y axis which determines an input value in the [0,1] for that axis' B-Spline basis evaluation.
        iSampleZ - int Sample index along Z axis which determines an input value in the [0,1] for that axis' B-Spline basis evaluation.
        kPos - Point3f 3D coordinates resulting from evaluation.
      • getPosition

        public void getPosition​(float fX,
                                float fY,
                                float fZ,
                                WildMagic.LibFoundation.Mathematics.Vector3f kPos)
        Return the B-Spline evaluation for the given input values. The evaluation is based on the 3D evaluation of the B-Spline basis (one for each axis) and the 3D lattice of control points. This method is used for interpolating between the discrete samples.
        Parameters:
        fX - float Sample in [0,1] range for the X axis evaluation of the B-Spline basis.
        fY - float Sample in [0,1] range for the Y axis evaluation of the B-Spline basis.
        fZ - float Sample in [0,1] range for the Z axis evaluation of the B-Spline basis.
        kPos - Point3f 3D coordinates resulting from evaluation.
      • setControlPoint

        public void setControlPoint​(int iControlX,
                                    int iControlY,
                                    int iControlZ,
                                    WildMagic.LibFoundation.Mathematics.Vector3f kPoint)
        Set the position of the specified control point. No checks are made on the input coordinates of the control point.
        Parameters:
        iControlX - int Identifies control point in 3D lattice.
        iControlY - int Identifies control point in 3D lattice.
        iControlZ - int Identifies control point in 3D lattice.
        kPoint - Point3f New coordinates of the control point.