Project

General

Profile

« Previous | Next » 

Revision 06ed13b5

Added by Leszek Koltunski over 2 years ago

New API: set components centers of all components all in one go.

View differences:

src/main/java/org/distorted/library/uniformblock/UniformBlockCenter.java
60 60

  
61 61
  public void setEffectCenterNow(int comp, float x, float y, float z)
62 62
    {
63
    mArray[4*comp  ] = x;
64
    mArray[4*comp+1] = y;
65
    mArray[4*comp+2] = z;
63
    if( comp>=0 )
64
      {
65
      mArray[4*comp  ] = x;
66
      mArray[4*comp+1] = y;
67
      mArray[4*comp+2] = z;
68
      }
69
    else
70
      {
71
      for(int i=0; i<mMax; i++)
72
        {
73
        mArray[4*i  ] = x;
74
        mArray[4*i+1] = y;
75
        mArray[4*i+2] = z;
76
        }
77
      }
66 78

  
67 79
    mUBO.invalidate();
68 80
    }

Also available in: Unified diff