Project

General

Profile

« Previous | Next » 

Revision 6bb59aad

Added by Leszek Koltunski almost 7 years ago

Progress with support for Effect classes.

View differences:

src/main/java/org/distorted/library/effect/VertexEffectDistort.java
30 30

  
31 31
public class VertexEffectDistort extends VertexEffect
32 32
  {
33
  private static final String NAME = "DISORT";
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
 * Distort a (possibly changing in time) part of the Object by a (possibly changing in time) vector of force.
42
 *
43
 * @param vector 3-dimensional Vector which represents the force the Center of the Effect is
44
 *               currently being dragged with.
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 VertexEffectDistort(Data3D vector, Data3D center, Data4D region)
41 49
    {
42
    super(DISTORT,UNITIES,DIMENSION,SUPPORTS_CENTER,SUPPORTS_REGION);
50
    super(DISTORT,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
 * Distort the whole Object by a (possibly changing in time) vector of force.
83
 *
84
 * @param vector 3-dimensional Vector which represents the force the Center of the Effect is
85
 *               currently being dragged with.
86
 * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
87
 */
74 88
  public VertexEffectDistort(Data3D vector, Data3D center)
75 89
    {
76
    super(DISTORT,UNITIES,DIMENSION,SUPPORTS_CENTER,SUPPORTS_REGION);
90
    super(DISTORT,UNITIES,DIMENSION,SUPPORTS_CENTER,SUPPORTS_REGION,NAME);
77 91

  
78 92
    if( vector instanceof Dynamic3D )
79 93
      {

Also available in: Unified diff