OpenGL ES SDK for Android ARM Developer Center
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InstancedSolidTorus.h File Reference
#include "Torus.h"

Go to the source code of this file.

Classes

class  InstancedSolidTorus
 Class derived form Torus abstract class. It manages drawing of a rotating solid torus, built from separate patches. Each patch is modelled as a Bezier surface approximating surface of a perfect torus. To satisfy the C1 continuity between neighbour patches, the number of circles creating the torus and also the number of points in each circle is restricted to 12. It allows us to divide both circles of torus ("big" and "small") into 4 quadrants and approximate each of it using bicubic Bezier curves. Control mesh vertices has to be distored, so the derivatives on the patch edges are equal and resulting image is round. That is why we cannot use the regular way to determine control points. The patches are in fact very dense square-shaped meshes, used as input attributes by vertex shader. The shader changes their shape on the basis of the distorted control mesh and places them next to each other, forming a round torus. The class, apart from inherited components, manages: More...