Getting Started
Toxiclibs geometry introducing Gfx, TVec2D and Toxi::Rect
See Calling Toxiclibs form JRubyArt for why we use Gfx
, and Toxi
prefix, and why we use TVec2D
and not Vec2D
.
Gfx::ToxiclibsSupport
is used to render the rect
and circle
, it provides convenience functions that can render toxiclibs objects (in this case to screen), but it is not absolutely required to use toxiclibs. Gfx::ToxiclibsSupport
uses the underlying JRubyArt app, and must be intialized with self
, do this in setup.
The Rect
class is basically a 2D bounding box that can grow to contain a point as in this sketch. TVec2D
is very similar to the JRubyArt built in Vec2D
, but is a pure java class and a core class in toxiclibs.