Project

General

Profile

« Previous | Next » 

Revision fa6c352d

Added by Leszek Koltunski over 7 years ago

Complete moving center to 3D.

View differences:

src/main/java/org/distorted/library/DistortedObject.java
723 723
 *
724 724
 * @param vector 3-dimensional Vector which represents the force the Center of the Effect is
725 725
 *               currently being dragged with.
726
 * @param center 2-dimensional Data that, at any given time, returns the Center of the Effect.
726
 * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
727 727
 * @param region Region that masks the Effect.
728 728
 * @return       ID of the effect added, or -1 if we failed to add one.
729 729
 */
730
  public long distort(Data3D vector, Data2D center, Data4D region)
730
  public long distort(Data3D vector, Data3D center, Data4D region)
731 731
    {  
732 732
    return mV.add(EffectNames.DISTORT, vector, center, region);
733 733
    }
......
738 738
 *
739 739
 * @param vector 3-dimensional Vector which represents the force the Center of the Effect is
740 740
 *               currently being dragged with.
741
 * @param center 2-dimensional Data that, at any given time, returns the Center of the Effect.
741
 * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
742 742
 * @return       ID of the effect added, or -1 if we failed to add one.
743 743
 */
744
  public long distort(Data3D vector, Data2D center)
744
  public long distort(Data3D vector, Data3D center)
745 745
    {
746 746
    return mV.add(EffectNames.DISTORT, vector, center, null);
747 747
    }
......
752 752
 * a (possibly changing in time) point on the Object.
753 753
 *     
754 754
 * @param vector Vector of force that deforms the shape of the whole Object.
755
 * @param center 2-dimensional Data that, at any given time, returns the Center of the Effect.
755
 * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
756 756
 * @return       ID of the effect added, or -1 if we failed to add one.
757 757
 */
758
  public long deform(Data3D vector, Data2D center)
758
  public long deform(Data3D vector, Data3D center)
759 759
    {  
760 760
    return mV.add(EffectNames.DEFORM, vector, center, null);
761 761
    }
......
766 766
 * away from the center (degree<=1)
767 767
 *
768 768
 * @param sink   The current degree of the Effect.
769
 * @param center 2-dimensional Data that, at any given time, returns the Center of the Effect.
769
 * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
770 770
 * @param region Region that masks the Effect.
771 771
 * @return       ID of the effect added, or -1 if we failed to add one.
772 772
 */
773
  public long sink(Data1D sink, Data2D center, Data4D region)
773
  public long sink(Data1D sink, Data3D center, Data4D region)
774 774
    {
775 775
    return mV.add(EffectNames.SINK, sink, center, region);
776 776
    }
......
781 781
 * away from the center (degree<=1)
782 782
 *
783 783
 * @param sink   The current degree of the Effect.
784
 * @param center 2-dimensional Data that, at any given time, returns the Center of the Effect.
784
 * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
785 785
 * @return       ID of the effect added, or -1 if we failed to add one.
786 786
 */
787
  public long sink(Data1D sink, Data2D center)
787
  public long sink(Data1D sink, Data3D center)
788 788
    {
789 789
    return mV.add(EffectNames.SINK, sink, center);
790 790
    }
......
794 794
 * Rotate part of the Object around the Center of the Effect by a certain angle.
795 795
 *
796 796
 * @param swirl  The angle of Swirl (in degrees). Positive values swirl clockwise.
797
 * @param center 2-dimensional Data that, at any given time, returns the Center of the Effect.
797
 * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
798 798
 * @param region Region that masks the Effect.
799 799
 * @return       ID of the effect added, or -1 if we failed to add one.
800 800
 */
801
  public long swirl(Data1D swirl, Data2D center, Data4D region)
801
  public long swirl(Data1D swirl, Data3D center, Data4D region)
802 802
    {    
803 803
    return mV.add(EffectNames.SWIRL, swirl, center, region);
804 804
    }
......
808 808
 * Rotate the whole Object around the Center of the Effect by a certain angle.
809 809
 *
810 810
 * @param swirl  The angle of Swirl (in degrees). Positive values swirl clockwise.
811
 * @param center 2-dimensional Data that, at any given time, returns the Center of the Effect.
811
 * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
812 812
 * @return       ID of the effect added, or -1 if we failed to add one.
813 813
 */
814
  public long swirl(Data1D swirl, Data2D center)
814
  public long swirl(Data1D swirl, Data3D center)
815 815
    {
816 816
    return mV.add(EffectNames.SWIRL, swirl, center);
817 817
    }
......
842 842
 *               Example3: if Alpha = 0 and Beta = 45, then V=(sqrt(2)/2, -sqrt(2)/2, 0) and the wave
843 843
 *               is entirely 'horizontal' and moves point (x,y,0) in direction V by whatever is the
844 844
 *               value if sin at this point.
845
 * @param center 2-dimensional Data that, at any given time, returns the Center of the Effect.
845
 * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
846 846
 * @return       ID of the effect added, or -1 if we failed to add one.
847 847
 */
848
  public long wave(Data5D wave, Data2D center)
848
  public long wave(Data5D wave, Data3D center)
849 849
    {
850 850
    return mV.add(EffectNames.WAVE, wave, center, null);
851 851
    }
......
855 855
 * Directional, sinusoidal wave effect.
856 856
 *
857 857
 * @param wave   see {@link DistortedObject#wave(Data5D,Data2D)}
858
 * @param center see {@link DistortedObject#wave(Data5D,Data2D)}
858
 * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
859 859
 * @param region Region that masks the Effect.
860 860
 * @return       ID of the effect added, or -1 if we failed to add one.
861 861
 */
862
  public long wave(Data5D wave, Data2D center, Data4D region)
862
  public long wave(Data5D wave, Data3D center, Data4D region)
863 863
    {
864 864
    return mV.add(EffectNames.WAVE, wave, center, region);
865 865
    }

Also available in: Unified diff