Book Image

OpenFrameworks Essentials

Book Image

OpenFrameworks Essentials

Overview of this book

Table of Contents (19 chapters)
openFrameworks Essentials
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Multimedia and other classes


The following table lists the most important classes used in most openFrameworks projects. They are discussed in Chapter 4, Working with Raster Graphics – Images, Videos, and Shaders, Chapter 5, Creating 3D Graphics, Chapter 6, Animating Parameters, and Chapter 7, Distributed and Physical Computing with Networking and Arduino.

Class name with example of an object definition

Description

ofImage image;

This is an image class, which holds equal data in the RAM and video memory.

ofPixels pixels;

This is an image class, which holds data in RAM only.

ofTexture texture;

This is an image class, which holds data in video memory only.

ofVideoPlayer video;

This is a video player class.

ofVideoGrabber camera;

This a class for grabbing frames from a camera.

ofFbo fbo;

This is a buffer for offscreen drawing.

ofShader shader;

This is a shader class, which contains a vertex, fragment and, optionally, geometry shader programs.

ofMesh mesh;

This is a class for representing and drawing a set of primitives, such as triangles, lines, or points.

The ofEnableDepthTest() command enables Z-buffering for proper drawing of 3D objects, and the ofDisableDepthTest() command disables it back.

ofSpherePrimitive sphere;

This is a class for representing and drawing a sphere in 3D. Also, there are the ofPlanePrimitive, ofSpherePrimitive, ofIcoSpherePrimitive, ofCylinderPrimitive, and ofConePrimitive classes for representing other simple geometrical objects.

ofEasyCam cam;

This is a camera for 3D drawing.

ofLight light;

This is the light source for 3D drawing.

ofMaterial material;

These are the material properties for 3D drawing.

ofSoundPlayer sound;

This is the sound player class.

ofxOscReceiver oscReceiver;

This is the receiver of OSC networking messages (it requires the ofxOsc addon).

ofxOscSender oscSender;

This is the sender of OSC networking messages (it requires the ofxOsc addon).

ofSerial serial;

This is the class for serial port communication with devices such as Arduino.