Revision 6bb59aad
Added by Leszek Koltunski almost 7 years ago
src/main/java/org/distorted/library/effect/VertexEffectDeform.java | ||
---|---|---|
30 | 30 |
|
31 | 31 |
public class VertexEffectDeform extends VertexEffect |
32 | 32 |
{ |
33 |
private static final String NAME = "DEFORM"; |
|
33 | 34 |
private static final float[] UNITIES = new float[] {0.0f,0.0f,0.0f}; |
34 | 35 |
private static final int DIMENSION = 3; |
35 | 36 |
private static final boolean SUPPORTS_CENTER = true; |
36 | 37 |
private static final boolean SUPPORTS_REGION = true; |
37 | 38 |
|
38 | 39 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
39 |
|
|
40 |
/** |
|
41 |
* Deform the shape of the whole Object with a (possibly changing in time) vector of force applied to |
|
42 |
* a (possibly changing in time) point on the Object. |
|
43 |
* |
|
44 |
* @param vector Vector of force that deforms the shape of the whole Object. |
|
45 |
* @param center 3-dimensional Data that, at any given time, returns the Center of the Effect. |
|
46 |
* @param region Region that masks the Effect. |
|
47 |
*/ |
|
40 | 48 |
public VertexEffectDeform(Data3D vector, Data3D center, Data4D region) |
41 | 49 |
{ |
42 |
super(DEFORM,UNITIES,DIMENSION,SUPPORTS_CENTER,SUPPORTS_REGION); |
|
50 |
super(DEFORM,UNITIES,DIMENSION,SUPPORTS_CENTER,SUPPORTS_REGION,NAME);
|
|
43 | 51 |
|
44 | 52 |
if( vector instanceof Dynamic3D ) |
45 | 53 |
{ |
... | ... | |
70 | 78 |
} |
71 | 79 |
|
72 | 80 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
73 |
|
|
81 |
/** |
|
82 |
* Deform the shape of the whole Object with a (possibly changing in time) vector of force applied to |
|
83 |
* a (possibly changing in time) point on the Object. |
|
84 |
* |
|
85 |
* @param vector Vector of force that deforms the shape of the whole Object. |
|
86 |
* @param center 3-dimensional Data that, at any given time, returns the Center of the Effect. |
|
87 |
*/ |
|
74 | 88 |
public VertexEffectDeform(Data3D vector, Data3D center) |
75 | 89 |
{ |
76 |
super(DEFORM,UNITIES,DIMENSION,SUPPORTS_CENTER,SUPPORTS_REGION); |
|
90 |
super(DEFORM,UNITIES,DIMENSION,SUPPORTS_CENTER,SUPPORTS_REGION,NAME);
|
|
77 | 91 |
|
78 | 92 |
if( vector instanceof Dynamic3D ) |
79 | 93 |
{ |
Also available in: Unified diff
Progress with support for Effect classes.