Project

General

Profile

« Previous | Next » 

Revision ea16dc89

Added by Leszek Koltunski about 8 years ago

minor stuff

View differences:

src/main/java/org/distorted/library/DistortedObject.java
818 818
 * Directional, sinusoidal wave effect.
819 819
 *
820 820
 * @param wave   A 5-dimensional data structure describing the wave: first member is the amplitude,
821
 *               second is the wave length, third is the offset (i.e. when offset = PI/2, the sine
821
 *               second is the wave length, third is the phase (i.e. when phase = PI/2, the sine
822 822
 *               wave at the center does not start from sin(0), but from sin(PI/2) ) and the next two
823 823
 *               describe the 'direction' of the wave.
824 824
 *               <p>
src/main/java/org/distorted/library/type/Dynamic.java
23 23
import java.util.Vector;
24 24

  
25 25
///////////////////////////////////////////////////////////////////////////////////////////////////
26
/** A class to interpolate between a List of Static{1,2,3,4}Ds.
26
/** A class to interpolate between a list of Statics.
27 27
* <p><ul>
28 28
* <li>if there is only one Point, just jump to it.
29 29
* <li>if there are two Points, linearly bounce between them
......
524 524

  
525 525
///////////////////////////////////////////////////////////////////////////////////////////////////
526 526
/**
527
 * Returns the number of Static{1,2,3,4}Ds this Dynamic has been fed with.
527
 * Returns the number of Statics this Dynamic has been fed with.
528 528
 *   
529
 * @return the number of Static{1,2,3,4}Ds we are currently interpolating through.
529
 * @return the number of Statics we are currently interpolating through.
530 530
 */
531 531
  public synchronized int getNumPoints()
532 532
    {
......
537 537
/**
538 538
 * Controls how many times we want to interpolate.
539 539
 * <p>
540
 * Count equal to 1 means 'go from the first Static{1,2,3,4}D to the last and back'. Does not have to be an
540
 * Count equal to 1 means 'go from the first Static to the last and back'. Does not have to be an
541 541
 * integer - i.e. count=1.5 would mean 'start at the first Point, go to the last, come back to the first, 
542 542
 * go to the last again and stop'.
543 543
 * Count<=0 means 'go on interpolating indefinitely'.
544 544
 * 
545
 * @param count the number of times we want to interpolate between our collection of Static{1,2,3,4}Ds.
545
 * @param count the number of times we want to interpolate between our collection of Statics.
546 546
 */
547 547
  public void setCount(float count)
548 548
    {
src/main/res/raw/main_vertex_shader.glsl
425 425

  
426 426
  if( deg != 0.0 && length != 0.0 )
427 427
    {
428
    float offset= vUniforms[effect  ].z;
428
    float phase = vUniforms[effect  ].z;
429 429
    float alpha = vUniforms[effect  ].w;
430 430
    float beta  = vUniforms[effect+1].x;
431 431

  
......
434 434
    float sinB = sin(beta);
435 435
    float cosB = cos(beta);
436 436

  
437
    float angle= 1.578*(ps.x*cosB-ps.y*sinB) / length + offset;
437
    float angle= 1.578*(ps.x*cosB-ps.y*sinB) / length + phase;
438 438

  
439 439
    vec3 dir= vec3(sinB*cosA,cosB*cosA,sinA);
440 440

  

Also available in: Unified diff