Appendix A. Basic Cinder Functionality Reference

This part of the book will help you find some basic Cinder functionalities used in this book for later reference. This reference is very basic, so if you are an experienced developer searching for detailed and in-depth function reference, you should take a look at the reference on the Cinder website (http://libcinder.org), or as Cinder is open-source, at the actual source code of Cinder.

Basic types

These are the basic types consumed by many other Cinder functions. This assumes that you are already familiar with int, float, and other basic data types in C++.

cinder::Vec2f( float x, float y )

The preceding code represents a two-dimensional vector of float values (x and y). This is usually used to represent location or size in two-dimensional space.

cinder::Vec2i( int x, int y )

The preceding code represents a two-dimensional vector of int values (x and y). This is usually used to represent location or size in two-dimensional space.

cinder::Vec3f( float x, float y, float z )

The preceding code represents a three-dimensional vector of float values ( x, y, and z). This is usually used to represent location or size in three-dimensional space.

cinder::Rectf( float x1, float y1, float x2, float y2 )

The preceding code represents an abstract rectangle that is defined by the top-left and bottom-right corner coordinates.

cinder::Color( float r, float g, float b, float a )

In the preceding code, the Color object or class represents color in the Cinder environment—r is for red, g is for green, b is for blue, and a is for alpha in range form 0.0f to 1.0f.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.138.178