Revision 6bb59aad
Added by Leszek Koltunski over 8 years ago
| src/main/java/org/distorted/library/effect/VertexEffectSink.java | ||
|---|---|---|
| 33 | 33 |
|
| 34 | 34 |
public class VertexEffectSink extends VertexEffect |
| 35 | 35 |
{
|
| 36 |
private static final String NAME = "SINK"; |
|
| 36 | 37 |
private static final float[] UNITIES = new float[] {1.0f};
|
| 37 | 38 |
private static final int DIMENSION = 1; |
| 38 | 39 |
private static final boolean SUPPORTS_CENTER = true; |
| 39 | 40 |
private static final boolean SUPPORTS_REGION = true; |
| 40 | 41 |
|
| 41 | 42 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 42 |
|
|
| 43 |
/** |
|
| 44 |
* Pull all points around the center of the Effect towards the center (if degree>=1) or push them |
|
| 45 |
* away from the center (degree<=1) |
|
| 46 |
* |
|
| 47 |
* @param sink The current degree of the Effect. |
|
| 48 |
* @param center 3-dimensional Data that, at any given time, returns the Center of the Effect. |
|
| 49 |
* @param region Region that masks the Effect. |
|
| 50 |
*/ |
|
| 43 | 51 |
public VertexEffectSink(Data1D sink, Data3D center, Data4D region) |
| 44 | 52 |
{
|
| 45 |
super(SINK,UNITIES,DIMENSION,SUPPORTS_CENTER,SUPPORTS_REGION); |
|
| 53 |
super(SINK,UNITIES,DIMENSION,SUPPORTS_CENTER,SUPPORTS_REGION,NAME);
|
|
| 46 | 54 |
|
| 47 | 55 |
if( sink instanceof Dynamic1D) |
| 48 | 56 |
{
|
| ... | ... | |
| 73 | 81 |
} |
| 74 | 82 |
|
| 75 | 83 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 76 |
|
|
| 84 |
/** |
|
| 85 |
* Pull all points around the center of the Effect towards the center (if degree>=1) or push them |
|
| 86 |
* away from the center (degree<=1) |
|
| 87 |
* |
|
| 88 |
* @param sink The current degree of the Effect. |
|
| 89 |
* @param center 3-dimensional Data that, at any given time, returns the Center of the Effect. |
|
| 90 |
*/ |
|
| 77 | 91 |
public VertexEffectSink(Data1D sink, Data3D center) |
| 78 | 92 |
{
|
| 79 |
super(SINK,UNITIES,DIMENSION,SUPPORTS_CENTER,SUPPORTS_REGION); |
|
| 93 |
super(SINK,UNITIES,DIMENSION,SUPPORTS_CENTER,SUPPORTS_REGION,NAME);
|
|
| 80 | 94 |
|
| 81 | 95 |
if( sink instanceof Dynamic1D) |
| 82 | 96 |
{
|
Also available in: Unified diff
Progress with support for Effect classes.