Пример #1
0
 public boolean update(ParameterList pl, SunflowAPI api) {
   ri = pl.getFloat("radiusInner", ri);
   ro = pl.getFloat("radiusOuter", ro);
   ri2 = ri * ri;
   ro2 = ro * ro;
   return true;
 }
Пример #2
0
 public boolean update(ParameterList pl, SunflowAPI api) {
   // get parameters
   fov = pl.getFloat("fov", fov);
   aspect = pl.getFloat("aspect", aspect);
   shiftX = pl.getFloat("shift.x", shiftX);
   shiftY = pl.getFloat("shift.y", shiftY);
   focusDistance = pl.getFloat("focus.distance", focusDistance);
   lensRadius = pl.getFloat("lens.radius", lensRadius);
   lensSides = pl.getInt("lens.sides", lensSides);
   lensRotation = pl.getFloat("lens.rotation", lensRotation);
   update();
   return true;
 }