greenhouse
a creative coding toolkit for spatial interfaces

Feld Access

Accessing felds and placing objects on them.

  • SpaceFeld
  • Feld ()
  • SlapOnFeld ()
  • FeldCount ()
  • NthFeld ()

Example

#include "Greenhouse.h"

void Setup ()
{ SetFeldsColor (Color (.4, .2, .8));

  Text *txt = new Text ("helloworld");
  txt -> SlapOnFeld ();
  txt -> IncTranslation (-50 * Feld () -> Over () +
                         25 * Feld () -> Up () +
                         10 * Feld () -> Norm ());

  for (int i = 0; i < FeldCount (); i++)
  { SpaceFeld *sf = NthFeld (i);
    INFORM (sf -> Name () + ":");
    INFORM ("    Loc    = " + ToStr (sf -> Loc ()));
    INFORM ("    Width  = " + ToStr (sf -> Width ()));
    INFORM ("    Height = " + ToStr (sf -> Height ()));
  }
}