Revision 9351ad55
Added by Leszek Koltunski over 9 years ago
| src/main/java/org/distorted/library/DistortedObject.java | ||
|---|---|---|
| 304 | 304 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 305 | 305 |
/** |
| 306 | 306 |
* Adds the calling class to the list of Listeners that get notified each time some event happens |
| 307 |
* to one of the Effects that are currently applied to the DistortedBitmap.
|
|
| 307 |
* to one of the Effects that are currently applied to the DistortedObject.
|
|
| 308 | 308 |
* |
| 309 | 309 |
* @param el A class implementing the EffectListener interface that wants to get notifications. |
| 310 | 310 |
*/ |
| ... | ... | |
| 534 | 534 |
* Scales the Object by a factor that smoothly changes from (1,1,1) at time 0 to (xscale,yscale,zscale) |
| 535 | 535 |
* after 'duration' milliseconds. |
| 536 | 536 |
* |
| 537 |
* @param xscale After time 'duration' passes, Bitmap's width will get multiplied by xscale; e.g. if
|
|
| 537 |
* @param xscale After time 'duration' passes, Object's width will get multiplied by xscale; e.g. if
|
|
| 538 | 538 |
* xscale=2, after 'duration' milliseconds the Object will become twice broader. |
| 539 | 539 |
* @param yscale Factor to scale Object's height with. |
| 540 | 540 |
* @param zscale Factor to scale Object's depth with. |
| ... | ... | |
| 649 | 649 |
* Axis of rotation is the vector (0,0,1), i.e. a vector normal to the screen surface. |
| 650 | 650 |
* |
| 651 | 651 |
* @param center Coordinates of the Point we are rotating around. |
| 652 |
* @param angle Angle that we want to rotate the Bitmap to. Unit: degrees
|
|
| 652 |
* @param angle Angle that we want to rotate the Object to. Unit: degrees
|
|
| 653 | 653 |
* @param duration Time, in milliseconds, it takes to complete one rotation from 0 to 'angle' degrees. |
| 654 | 654 |
* @return ID of the effect added, or -1 if we failed to add one. |
| 655 | 655 |
*/ |
| ... | ... | |
| 670 | 670 |
* Axis of rotation is given by the last 3 floats. |
| 671 | 671 |
* |
| 672 | 672 |
* @param center Coordinates of the Point we are rotating around. |
| 673 |
* @param angle Angle that we want to rotate the Bitmap to. Unit: degrees
|
|
| 673 |
* @param angle Angle that we want to rotate the Object to. Unit: degrees
|
|
| 674 | 674 |
* @param axisX Axis of rotation: x-coordinate |
| 675 | 675 |
* @param axisY Axis of rotation: y-coordinate |
| 676 | 676 |
* @param axisZ Axis of rotation: z-coordinate |
| ... | ... | |
| 686 | 686 |
* Rotates the Object immediately by 'angle' degrees around point p. |
| 687 | 687 |
* |
| 688 | 688 |
* @param center Coordinates of the Point we are rotating around. |
| 689 |
* @param angle The angle that we want to rotate the Bitmap to. Unit: degrees
|
|
| 689 |
* @param angle The angle that we want to rotate the Object to. Unit: degrees
|
|
| 690 | 690 |
* @return ID of the effect added, or -1 if we failed to add one. |
| 691 | 691 |
*/ |
| 692 | 692 |
public long rotate(Float3D center, int angle) |
| ... | ... | |
| 784 | 784 |
* |
| 785 | 785 |
* @param size 1-dimensional Interpolator which, at any given time, returns the size of the macroblocks. |
| 786 | 786 |
* @param region Region this Effect is limited to. |
| 787 |
* Null here means 'apply the effect to the whole Bitmap'.
|
|
| 787 |
* Null here means 'apply the effect to the whole Object'.
|
|
| 788 | 788 |
* @param center 2-dimensional Interpolator which, at any given time, returns a Float2D representing the |
| 789 | 789 |
* current center of the effect. |
| 790 | 790 |
* @return ID of the effect added, or -1 if we failed to add one. |
| ... | ... | |
| 803 | 803 |
* |
| 804 | 804 |
* @param size 1-dimensional Interpolator which, at any given time, returns the size of the macroblocks. |
| 805 | 805 |
* @param region Region this Effect is limited to. |
| 806 |
* Null here means 'apply the effect to the whole Bitmap'.
|
|
| 806 |
* Null here means 'apply the effect to the whole Object'.
|
|
| 807 | 807 |
* @param center Center of the Effect. |
| 808 | 808 |
* @return ID of the effect added, or -1 if we failed to add one. |
| 809 | 809 |
*/ |
| ... | ... | |
| 822 | 822 |
* |
| 823 | 823 |
* @param pixels Maximum size, in pixels, of the Macroblocks we want to see. |
| 824 | 824 |
* @param region Region this Effect is limited to. |
| 825 |
* Null here means 'apply the effect to the whole Bitmap'.
|
|
| 825 |
* Null here means 'apply the effect to the whole Object'.
|
|
| 826 | 826 |
* @param center 2-dimensional Interpolator which, at any given time, returns a Float2D representing the |
| 827 | 827 |
* current center of the effect. |
| 828 | 828 |
* @param duration Time, in milliseconds, it takes to do one full interpolation. |
| ... | ... | |
| 852 | 852 |
* |
| 853 | 853 |
* @param pixels Maximum size, in pixels, of the Macroblocks we want to see. |
| 854 | 854 |
* @param region Region this Effect is limited to. |
| 855 |
* Null here means 'apply the effect to the whole Bitmap'.
|
|
| 855 |
* Null here means 'apply the effect to the whole Object'.
|
|
| 856 | 856 |
* @param center Center of the Effect. |
| 857 | 857 |
* @param duration Time, in milliseconds, it takes to do one full interpolation. |
| 858 | 858 |
* @param count Controls how many interpolations we want to do. See {@link Interpolator#setCount(float)}
|
| ... | ... | |
| 906 | 906 |
* mixed with the next parameter 'color': pixel = (1-level)*pixel + level*color |
| 907 | 907 |
* @param color Color to mix. (1,0,0) is RED. |
| 908 | 908 |
* @param region Region this Effect is limited to. |
| 909 |
* Null here means 'apply the Effect to the whole Bitmap'.
|
|
| 909 |
* Null here means 'apply the Effect to the whole Object'.
|
|
| 910 | 910 |
* @param center 2-dimensional Interpolator which, at any given time, returns a Float2D representing |
| 911 | 911 |
* the current center of the effect. |
| 912 | 912 |
* @return ID of the effect added, or -1 if we failed to add one. |
| ... | ... | |
| 926 | 926 |
* mixed with the next parameter 'color': pixel = (1-level)*pixel + level*color |
| 927 | 927 |
* @param color Color to mix. (1,0,0) is RED. |
| 928 | 928 |
* @param region Region this Effect is limited to. |
| 929 |
* Null here means 'apply the Effect to the whole Bitmap'.
|
|
| 929 |
* Null here means 'apply the Effect to the whole Object'.
|
|
| 930 | 930 |
* @param center Center of the Effect. |
| 931 | 931 |
* @return ID of the effect added, or -1 if we failed to add one. |
| 932 | 932 |
*/ |
| ... | ... | |
| 943 | 943 |
* pixel = (1-t)*pixel + t*color |
| 944 | 944 |
* @param color Color to mix. (1,0,0) is RED. |
| 945 | 945 |
* @param region Region this Effect is limited to. |
| 946 |
* Null here means 'apply the Effect to the whole Bitmap'.
|
|
| 946 |
* Null here means 'apply the Effect to the whole Object'.
|
|
| 947 | 947 |
* @param center 2-dimensional Interpolator which, at any given time, returns a Float2D representing the |
| 948 | 948 |
* current center of the effect. |
| 949 | 949 |
* @return ID of the effect added, or -1 if we failed to add one. |
| ... | ... | |
| 963 | 963 |
* pixel = (1-t)*pixel + t*color |
| 964 | 964 |
* @param color Color to mix. (1,0,0) is RED. |
| 965 | 965 |
* @param region The Region this Effect is limited to. |
| 966 |
* Null here means 'apply the Effect to the whole Bitmap'.
|
|
| 966 |
* Null here means 'apply the Effect to the whole Object'.
|
|
| 967 | 967 |
* @param center Center of the Effect. |
| 968 | 968 |
* @return ID of the effect added, or -1 if we failed to add one. |
| 969 | 969 |
*/ |
| ... | ... | |
| 976 | 976 |
/** |
| 977 | 977 |
* Makes a certain sub-region of the Object smoothly change all three of its RGB components. |
| 978 | 978 |
* <p> |
| 979 |
* Here the Effect applies to the whole bitmap.
|
|
| 979 |
* Here the Effect applies to the whole Object.
|
|
| 980 | 980 |
* |
| 981 | 981 |
* @param blend Level of blend a given pixel will be mixed with the next parameter 'color': |
| 982 | 982 |
* pixel = (1-t)*pixel + t*color |
| ... | ... | |
| 2144 | 2144 |
// DEFORM |
| 2145 | 2145 |
/** |
| 2146 | 2146 |
* Deform the shape of the whole Object with a (possibly changing in time) vector of force applied to |
| 2147 |
* a (possibly changing in time) point on the Bitmap.
|
|
| 2147 |
* a (possibly changing in time) point on the Object.
|
|
| 2148 | 2148 |
* |
| 2149 | 2149 |
* @param vector Interpolator that, at any given time, returns a Float2D representing vector of |
| 2150 |
* force that deforms the shape of the whole Bitmap.
|
|
| 2150 |
* force that deforms the shape of the whole Object.
|
|
| 2151 | 2151 |
* @param center 2-dimensional Interpolator that, at any given time, returns a Point2D representing |
| 2152 | 2152 |
* the Center of the Effect. |
| 2153 | 2153 |
* @return ID of the effect added, or -1 if we failed to add one. |
| ... | ... | |
| 2160 | 2160 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 2161 | 2161 |
/** |
| 2162 | 2162 |
* Deform the shape of the whole Object with a (possibly changing in time) vector of force applied to |
| 2163 |
* a constant point on the Bitmap.
|
|
| 2163 |
* a constant point on the Object.
|
|
| 2164 | 2164 |
* |
| 2165 | 2165 |
* @param vector Interpolator that, at any given time, returns a Float2D representing |
| 2166 |
* vector of force that deforms the shape of the whole Bitmap.
|
|
| 2166 |
* vector of force that deforms the shape of the whole Object.
|
|
| 2167 | 2167 |
* @param center Center of the Effect. |
| 2168 | 2168 |
* @return ID of the effect added, or -1 if we failed to add one. |
| 2169 | 2169 |
*/ |
Also available in: Unified diff
comment cleanup in DistortedObject.