greenhouse
a creative coding toolkit for spatial interfaces

Printing to the Console

These convenience functions print messages to Command Line/Standard Out.

  • INFORM ()
  • WARN ()
  • DIE ()

Example

#include "Greenhouse.h"

void Setup ()
{ // Prints "t_alpha = 1.000"
  Text *t = new Text ("Hello");
  float64 t_alpha = t -> Alpha ();
  INFORM ( "t_alpha = " + ToStr (t_alpha));

  // Prints the warning message "Invalid texture"
  Str img_path = "i-do-not-exist.png";
  Image *img = new Image (img_path);
  if (! img -> HasValidImageData ())
    WARN ("Invalid texture");

  DIE ("That about does it.");
}