public class

Drawable2d

extends Object
java.lang.Object
   ↳ io.kickflip.sdk.av.Drawable2d

Class Overview

Base class for stuff we like to draw.

Summary

Nested Classes
enum Drawable2d.Prefab Enum values for constructor. 
Public Constructors
Drawable2d(Drawable2d.Prefab shape)
Prepares a drawable from a "pre-fabricated" shape definition.
Public Methods
int getCoordsPerVertex()
Returns the number of position coordinates per vertex.
FloatBuffer getVertexArray()
Returns the array of vertices.
int getVertexCount()
Returns the number of vertices stored in the vertex array.
int getVertexStride()
Returns the width, in bytes, of the data for each vertex.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Drawable2d (Drawable2d.Prefab shape)

Prepares a drawable from a "pre-fabricated" shape definition.

Does no EGL/GL operations, so this can be done at any time.

Public Methods

public int getCoordsPerVertex ()

Returns the number of position coordinates per vertex. This will be 2 or 3.

public FloatBuffer getVertexArray ()

Returns the array of vertices.

To avoid allocations, this returns internal state. The caller must not modify it.

public int getVertexCount ()

Returns the number of vertices stored in the vertex array.

public int getVertexStride ()

Returns the width, in bytes, of the data for each vertex.

public String toString ()