Revision 6bb59aad
Added by Leszek Koltunski almost 7 years ago
src/main/java/org/distorted/library/effect/MatrixEffectShear.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
public class MatrixEffectShear extends MatrixEffect |
29 | 29 |
{ |
30 |
private static final String NAME = "SHEAR"; |
|
30 | 31 |
private static final float[] UNITIES = new float[] {0.0f,0.0f,0.0f}; |
31 | 32 |
private static final int DIMENSION = 3; |
32 | 33 |
private static final boolean SUPPORTS_CENTER = true; |
33 | 34 |
private static final boolean SUPPORTS_REGION = false; |
34 | 35 |
|
35 | 36 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
36 |
|
|
37 |
/** |
|
38 |
* Shears the Object. |
|
39 |
* |
|
40 |
* @param shear The 3-tuple of shear factors. The first controls level |
|
41 |
* of shearing in the X-axis, second - Y-axis and the third - |
|
42 |
* Z-axis. Each is the tangens of the shear angle, i.e 0 - |
|
43 |
* no shear, 1 - shear by 45 degrees (tan(45deg)=1) etc. |
|
44 |
* @param center Center of shearing, i.e. the point which stays unmoved. |
|
45 |
*/ |
|
37 | 46 |
public MatrixEffectShear(Data3D shear, Data3D center) |
38 | 47 |
{ |
39 |
super(SHEAR,UNITIES,DIMENSION,SUPPORTS_CENTER,SUPPORTS_REGION); |
|
48 |
super(SHEAR,UNITIES,DIMENSION,SUPPORTS_CENTER,SUPPORTS_REGION,NAME);
|
|
40 | 49 |
|
41 | 50 |
if( shear instanceof Static3D) |
42 | 51 |
{ |
Also available in: Unified diff
Progress with support for Effect classes.