Revision a2594090
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/library/DistortedEffects.java | ||
---|---|---|
638 | 638 |
/** |
639 | 639 |
* Moves the Object by a (possibly changing in time) vector. |
640 | 640 |
* |
641 |
* @param vector 3-dimensional Data which at any given time will return a Static3D representing |
|
642 |
* the current coordinates of the vector we want to move the Object with. |
|
643 |
* Units: to make it independent of the dimensions of the surface we are rendering to, |
|
644 |
* the vector's unit is the size of the surface in each direction; i.e. a move(0.3,0.7,0.0) |
|
645 |
* will move our object 30% of the width of the surface to the right and 70% of its height |
|
646 |
* down. |
|
641 |
* @param vector 3-dimensional Data which at any given time will return a Static3D |
|
642 |
* representing the current coordinates of the vector we want to move the Object with. |
|
647 | 643 |
* @return ID of the effect added, or -1 if we failed to add one. |
648 | 644 |
*/ |
649 | 645 |
public long move(Data3D vector) |
... | ... | |
657 | 653 |
* |
658 | 654 |
* @param scale 3-dimensional Data which at any given time returns a Static3D |
659 | 655 |
* representing the current x- , y- and z- scale factors. |
660 |
* Example: a scale(2,1,-0.5) makes the object 2 times wider, keeps the height |
|
661 |
* unchanged, and makes it twice thinner in Z-axis shifting the originally further |
|
662 |
* wall in front of the originally closer to the camera one. |
|
663 | 656 |
* @return ID of the effect added, or -1 if we failed to add one. |
664 | 657 |
*/ |
665 | 658 |
public long scale(Data3D scale) |
... | ... | |
682 | 675 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
683 | 676 |
/** |
684 | 677 |
* Rotates the Object by 'angle' degrees around the center. |
685 |
* Static axis of rotation is given by the 2nd parameter.
|
|
678 |
* Static axis of rotation is given by the last parameter.
|
|
686 | 679 |
* |
687 | 680 |
* @param angle Angle that we want to rotate the Object to. Unit: degrees |
688 | 681 |
* @param axis Axis of rotation |
... | ... | |
727 | 720 |
* |
728 | 721 |
* @param shear The 3-tuple of shear factors. The first controls level |
729 | 722 |
* of shearing in the X-axis, second - Y-axis and the third - |
730 |
* Z-axis. Each is the tangent of the shear angle, i.e 0 -
|
|
723 |
* Z-axis. Each is the tangens of the shear angle, i.e 0 -
|
|
731 | 724 |
* no shear, 1 - shear by 45 degrees (tan(45deg)=1) etc. |
732 | 725 |
* @param center Center of shearing, i.e. the point which stays unmoved. |
733 | 726 |
* @return ID of the effect added, or -1 if we failed to add one. |
Also available in: Unified diff
Revert "Major refactoring: convert the Matrix Effects to be independent of the resolution of the surface we render to."
This reverts commit ec231614152da2cfdb65c3450cd47da83ee05a6f.
revert the recenr matrix Effects work.