Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## codeanticode.glgraphics
Class GLModel

    java.lang.Object
      codeanticode.glgraphics.GLModel

All Implemented Interfaces:
  GLConstants, processing.core.PConstants

    public class GLModel

extends java.lang.Object
implements processing.core.PConstants, GLConstants

This class holds a 3D model composed of vertices, normals, colors (per vertex) and texture coordinates (also per vertex). All this data is stored in Vertex Buffer Objects (VBO) for fast access. This is class is still undergoing development, the API will probably change quickly in the following months as features are tested and refined. In particular, with the settings of the VBOs in this first implementation (GL.GL_DYNAMIC_DRAW_ARB) it is assumed that the coordinates will change often during the lifetime of the model. For static models a different VBO setting (GL.GL_STATIC_DRAW_ARB) should be used.

Nested Class Summary

Nested classes/interfaces inherited from interface codeanticode.glgraphics.GLConstants
`GLConstants.ClickAction, GLConstants.KeyboardAction, GLConstants.MouseAction, GLConstants.MouseHandler`

Field Summary
`java.nio.FloatBuffer` | `attributes`
`java.nio.FloatBuffer` | `colors`
`static int` | `DYNAMIC`
`java.nio.FloatBuffer` | `normals`
`static int` | `STATIC`
`static int` | `STREAM`
`java.nio.FloatBuffer` | `texCoords`
`GLTexture[]` | `textures`
`java.nio.FloatBuffer` | `vertices`

Fields inherited from interface processing.core.PConstants
`A, AB, ADD, AG, ALPHA, ALPHA_MASK, ALT, AMBIENT, AR, ARC, ARGB, ARROW, B, BACKSPACE, BASELINE, BEEN_LIT, BEVEL, BLEND, BLUE_MASK, BLUR, BOTTOM, BOX, BURN, CENTER, CENTER_DIAMETER, CENTER_RADIUS, CHATTER, CLOSE, CMYK, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CUSTOM, DA, DARKEST, DB, DEG_TO_RAD, DELETE, DG, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_ACCURATE_TEXTURES, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_OPENGL_2X_SMOOTH, DISABLE_OPENGL_ERROR_REPORT, DODGE, DOWN, DR, DXF, EB, EDGE, EG, ELLIPSE, ENABLE_ACCURATE_TEXTURES, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_2X_SMOOTH, ENABLE_OPENGL_4X_SMOOTH, ENABLE_OPENGL_ERROR_REPORT, ENTER, EPSILON, ER, ERODE, ERROR_BACKGROUND_IMAGE_FORMAT, ERROR_BACKGROUND_IMAGE_SIZE, ERROR_PUSHMATRIX_OVERFLOW, ERROR_PUSHMATRIX_UNDERFLOW, ERROR_TEXTFONT_NULL_PFONT, ESC, EXCLUSION, G, GIF, GRAY, GREEN_MASK, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LEFT, LIGHTEST, LINE, LINES, LINUX, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MOVE, MULTIPLY, NORMAL, NORMALIZED, NX, NY, NZ, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PDF, PERSPECTIVE, PI, platformNames, POINT, POINTS, POLYGON, POSTERIZE, PROBLEM, PROJECT, QUAD, QUAD_STRIP, QUADS, QUARTER_PI, R, RAD_TO_DEG, RADIUS, RECT, RED_MASK, REPLACE, RETURN, RGB, RIGHT, ROUND, SA, SB, SCREEN, SG, SHAPE, SHIFT, SHINE, SOFT_LIGHT, SPB, SPG, SPHERE, SPOT, SPR, SQUARE, SR, SUBTRACT, SW, TAB, TARGA, TEXT, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, TX, TY, TZ, U, UP, V, VERTEX_FIELD_COUNT, VW, VX, VY, VZ, WAIT, WHITESPACE, WINDOWS, X, Y, Z`

Fields inherited from interface codeanticode.glgraphics.GLConstants
`BACKGROUND_ALPHA, COLOR, DOUBLE, FLOAT, GL_DEPTH_STENCIL, GL_DEPTH24_STENCIL8, GL_UNSIGNED_INT_24_8, GLGRAPHICS, LINE_LOOP, LINE_STRIP, LINEAR, LINEAR_MIPMAP_LINEAR, LINEAR_MIPMAP_NEAREST, NEAREST, NEAREST_MIPMAP_LINEAR, NEAREST_MIPMAP_NEAREST, POINT_SPRITES, TEX_BYTE, TEX_FILTER_PARAM_FLOAT, TEX_FILTER_PARAM_INT, TEX_FILTER_PARAM_MAT2, TEX_FILTER_PARAM_MAT3, TEX_FILTER_PARAM_MAT4, TEX_FILTER_PARAM_VEC2, TEX_FILTER_PARAM_VEC3, TEX_FILTER_PARAM_VEC4, TEX_INT, TEX_NORM, TEX_ONEDIM, TEX_RECT`

Constructor Summary
`GLModel(processing.core.PApplet parent, java.util.ArrayList<processing.core.PVector> vertArrayList, int mode, int usage)`
`GLModel(processing.core.PApplet parent, float[] vertArray, int mode, int usage)`
`GLModel(processing.core.PApplet parent, int numVert, int mode, int usage)` Creates an instance of GLModel with the specified parameters: number of vertices, mode to draw the vertices (as points, sprites, lines, etc) and usage (static if the vertices will never change after the first time are initialized, dynamic if they will change frequently or stream if they will change at every frame).
`GLModel(processing.core.PApplet parent, java.lang.String filename)`
`GLModel(processing.core.PApplet parent, java.net.URL url)`

Method Summary
`void` | `beginUpdateAttributes(int n)`
`void` | `beginUpdateColors()`
`void` | `beginUpdateNormals()`
`void` | `beginUpdateTexCoords(int n)`
`void` | `beginUpdateVertices()` Enables vertex updating, to be done with the updateVertex()/displaceVertex() methods.
`void` | `centerVertices()` Centers the model to (0, 0, 0).
`void` | `centerVertices(float xc, float yc)` Centers the model to (xc, yc, 0).
`void` | `centerVertices(float xc, float yc, float zc)` Centers the model to (xc, yc, zc).
`void` | `displaceAttribute(int idx, float dx)`
`void` | `displaceAttribute(int idx, float[] dvalues)`
`void` | `displaceAttribute(int idx, float dx, float dy)`
`void` | `displaceAttribute(int idx, float x, float y, float z)`
`void` | `displaceAttribute(int idx, float x, float y, float z, float w)`
`void` | `displaceNormal(int idx, float dx, float dy)`
`void` | `displaceNormal(int idx, float dx, float dy, float dz)`
`void` | `displaceNormal(int idx, float dx, float dy, float dz, float dw)`
`void` | `displaceTexCoord(int idx, float ds, float dt)`
`void` | `displaceVertex(int idx, float dx, float dy)` Adds a displacement (dx, dy) to the vertex idx.
`void` | `displaceVertex(int idx, float dx, float dy, float dz)` Adds a displacement (dx, dy, dz) to the vertex idx.
`void` | `displaceVertex(int idx, float dx, float dy, float dz, float dw)` Adds a displacement (dx, dy, dz, dw) to the vertex idx.
`void` | `endUpdateAttributes()`
`void` | `endUpdateColors()`
`void` | `endUpdateNormals()`
`void` | `endUpdateTexCoords()`
`void` | `endUpdateVertices()` Disables vertex updating.
`java.util.ArrayList<float[]>` | `getAttributes(java.lang.String filename, int len)` Returns array list with attributes stored in binary file.
`java.util.ArrayList<float[]>` | `getColors(java.lang.String filename)` Returns array list with colors stored in binary file.
`int` | `getCoordsVBO()` Returns the OpenGL identifier of the Vertex Buffer Object holding the coordinates of this model.
`java.lang.String` | `getDescription()`
`float` | `getMaxPointSize()`
`java.util.ArrayList<processing.core.PVector>` | `getNormals(java.lang.String filename)` Returns array list with normals stored in binary file.
`int` | `getNumTextures()` Returns the number of textures.
`int` | `getSize()`
`java.util.ArrayList<processing.core.PVector>` | `getTexCoords(java.lang.String filename)` Returns array list with texture coordinates stored in binary file.
`GLTexture` | `getTexture(int i)` Returns the i-th texture.
`java.util.ArrayList<processing.core.PVector>` | `getVertices(java.lang.String filename)` Returns array list with vertices stored in binary file.
`void` | `initAttributes(int n)` Sets the number of attributes for this model.
`void` | `initColors()` This method creates the colors, i.e.: it creates the internal OpenGL variables to store color data.
`void` | `initNormals()` This method creates the normals, i.e.: it creates the internal OpenGL variables to store normal data.
`void` | `initTexures(int n)` This method creates n textures, i.e.: it creates the internal OpenGL variables to store n textures.
`void` | `loadAttributes(int n, java.lang.String filename)` Loads attribute nth from binary file into model.
`void` | `loadColors(java.lang.String filename)` Loads colors from binary file into model.
`void` | `loadNormals(java.lang.String filename)` Loads normals from binary file into model.
`void` | `loadTexCoords(int n, java.lang.String filename)` Loads texture coordinates of nth texture from binary file into model.
`void` | `loadVertices(java.lang.String filename)` Loads vertices from binary file into model.
`void` | `noBlend()` Disables blending.
`void` | `render()`
`void` | `render(GLModelEffect effect)`
`void` | `render(int first, int last)`
`void` | `render(int first, int last, GLModelEffect effect)`
`void` | `saveAttributes(int n, java.lang.String filename)` Saves attribute n-th in the model to binary file.
`void` | `saveAttributes(java.lang.String filename, java.util.ArrayList<float[]> iattrib, int len)` Saves attributes in the given array list to binary file.
`void` | `saveColors(java.lang.String filename)` Saves colors in the model to binary file.
`void` | `saveColors(java.lang.String filename, java.util.ArrayList<float[]> icolors)` Saves colors in the given array list to binary file.
`void` | `saveNormals(java.lang.String filename)` Saves normals in the model to binary file.
`void` | `saveNormals(java.lang.String filename, java.util.ArrayList<processing.core.PVector> norms)` Saves normals in the given array list to binary file.
`void` | `saveTexCoords(int n, java.lang.String filename)` Saves colors in the model to binary file.
`void` | `saveTexCoords(java.lang.String filename, java.util.ArrayList<processing.core.PVector> itexCoords)` Saves texture coordinates in the given array list to binary file.
`void` | `saveVertices(java.lang.String filename)` Saves vertices in the model to binary file.
`void` | `saveVertices(java.lang.String filename, java.util.ArrayList<processing.core.PVector> verts)` Saves vertices in the given array list to binary file.
`void` | `setAttribute(int i, java.lang.String aname, int asize)` Sets the name and size (number of components per vertex) of attribute i.
`void` | `setBlendMode(int MODE)` Enables blending and sets the mode.
`void` | `setColors(float gray)` Paints all vertices with the specified gray tone.
`void` | `setColors(float gray, float alpha)` Paints all vertices with the specified gray tone and alpha value.
`void` | `setColors(float x, float y, float z)` Paints all vertices with the specified color components.
`void` | `setColors(float x, float y, float z, float a)` Paints all vertices with the specified color components and alpha component.
`void` | `setColors(int rgb, float alpha)` Paints all vertices with the specified rgb color and alpha value.
`void` | `setColors(int gray, int alpha)` Paints all vertices with the specified gray tone and alpha value.
`void` | `setColors(int x, int y, int z)` Paints all vertices with the specified color components.
`void` | `setColors(int x, int y, int z, int a)` Paints all vertices with the specified color components and alpha component.
`void` | `setEmission(float gray)` Set the emissive color to the specified gray tone.
`void` | `setEmission(float gray, float alpha)` Set the emissive color to the specified gray tone and alpha value.
`void` | `setEmission(float x, float y, float z)` Set the emissive color to the specified color components.
`void` | `setEmission(float x, float y, float z, float a)` Set the emissive color to the specified color components and alpha component.
`void` | `setEmission(int rgb, float alpha)` Set the emissive color to the specified rgb color and alpha value.
`void` | `setEmission(int gray, int alpha)` Set the emissive color to the specified gray tone and alpha value.
`void` | `setEmission(int x, int y, int z)` Set the emissive color to the specified color components.
`void` | `setEmission(int x, int y, int z, int a)` Set the emissive color to the specified color components and alpha component.
`void` | `setLineWidth(float w)`
`void` | `setPointSize(float s)`
`void` | `setReflection(float gray)` Set the specular color to the specified gray tone.
`void` | `setReflection(float gray, float alpha)` Set the specular color to the specified gray tone and alpha value.
`void` | `setReflection(float x, float y, float z)` Set the specular color to the specified color components.
`void` | `setReflection(float x, float y, float z, float a)` Set the specular color to the specified color components and alpha component.
`void` | `setReflection(int rgb, float alpha)` Set the specular color to the specified rgb color and alpha value.
`void` | `setReflection(int gray, int alpha)` Set the specular color to the specified gray tone and alpha value.
`void` | `setReflection(int x, int y, int z)` Set the specular color to the specified color components.
`void` | `setReflection(int x, int y, int z, int a)` Set the specular color to the specified color components and alpha component.
`void` | `setSpriteFadeSize(float s)`
`void` | `setTexture(int i, GLTexture tex)` Sets the i-th texture.
`void` | `setTint(float gray)` Set the tint color to the specified gray tone.
`void` | `setTint(float gray, float alpha)` Set the tint color to the specified gray tone and alpha value.
`void` | `setTint(float x, float y, float z)` Set the tint color to the specified color components.
`void` | `setTint(float x, float y, float z, float a)` Set the tint color to the specified color components and alpha component.
`void` | `setTint(int rgb, float alpha)` Set the tint color to the specified rgb color and alpha value.
`void` | `setTint(int gray, int alpha)` Set the tint color to the specified gray tone and alpha value.
`void` | `setTint(int x, int y, int z)` Set the tint color to the specified color components.
`void` | `setTint(int x, int y, int z, int a)` Set the tint color to the specified color components and alpha component.
`void` | `updateAttribute(int idx, float x)`
`void` | `updateAttribute(int idx, float[] values)`
`void` | `updateAttribute(int idx, float x, float y)`
`void` | `updateAttribute(int idx, float x, float y, float z)`
`void` | `updateAttribute(int idx, float x, float y, float z, float w)`
`void` | `updateAttributes(int n, java.util.ArrayList<float[]> vertAttribsArrayList)`
`void` | `updateAttributes(int n, float[] attributesArray)`
`void` | `updateColor(int i, float gray)` Paints the vertex i with the specified gray tone.
`void` | `updateColor(int i, float gray, float alpha)` Paints the vertex i with the specified gray tone and alpha value.
`void` | `updateColor(int i, float x, float y, float z)` Paints the vertex i with the specified color components.
`void` | `updateColor(int i, float x, float y, float z, float a)` Paints the vertex i with the specified color components and alpha component.
`void` | `updateColor(int i, int rgb, float alpha)` Paints the vertex i with the specified rgb color and alpha value.
`void` | `updateColor(int i, int gray, int alpha)` Paints the vertex i with the specified gray tone and alpha value.
`void` | `updateColor(int i, int x, int y, int z)` Paints the vertex i with the specified color components.
`void` | `updateColor(int i, int x, int y, int z, int a)` Paints the vertex i with the specified color components and alpha component.
`void` | `updateColors(java.util.ArrayList<float[]> colArrayList)`
`void` | `updateColors(float[] colArray)`
`void` | `updateNormal(int idx, float x, float y)`
`void` | `updateNormal(int idx, float x, float y, float z)`
`void` | `updateNormal(int idx, float x, float y, float z, float w)`
`void` | `updateNormals(java.util.ArrayList<processing.core.PVector> normArrayList)`
`void` | `updateNormals(float[] normArray)`
`void` | `updateTexCoord(int idx, float s, float t)`
`void` | `updateTexCoords(int n, java.util.ArrayList<processing.core.PVector> texCoordsArrayList)`
`void` | `updateTexCoords(int n, float[] texCoordsArray)`
`void` | `updateVertex(int idx, float x, float y)` Updates the coordinates of vertex idx.
`void` | `updateVertex(int idx, float x, float y, float z)` Updates the coordinates of vertex idx.
`void` | `updateVertex(int idx, float x, float y, float z, float w)` Updates the coordinates of vertex idx.
`void` | `updateVertices(java.util.ArrayList<processing.core.PVector> vertArrayList)` Updates all the vertices using the coordinates provided in the array vertArray.
`void` | `updateVertices(float[] vertArray)` Updates all the vertices using the coordinates provided in the array vertArray.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### textures

    public GLTexture[] textures

### vertices

    public java.nio.FloatBuffer vertices

### colors

    public java.nio.FloatBuffer colors

### normals

    public java.nio.FloatBuffer normals

### texCoords

    public java.nio.FloatBuffer texCoords

### attributes

    public java.nio.FloatBuffer attributes

### STATIC

    public static final int STATIC

See Also:
  Constant Field Values

### DYNAMIC

    public static final int DYNAMIC

See Also:
  Constant Field Values

### STREAM

    public static final int STREAM

See Also:
  Constant Field Values

Constructor Detail

### GLModel

    public GLModel(processing.core.PApplet parent,
                   int numVert,
                   int mode,
                   int usage)

  Creates an instance of GLModel with the specified parameters: number of vertices, mode to draw the vertices (as points, sprites, lines, etc) and usage (static if the vertices will never change after the first time are initialized, dynamic if they will change frequently or stream if they will change at every frame).

  Parameters:
    `parent` - PApplet
    `numVert` - int
    `mode` - int
    `usage` - int

### GLModel

    public GLModel(processing.core.PApplet parent,
                   float[] vertArray,
                   int mode,
                   int usage)

### GLModel

    public GLModel(processing.core.PApplet parent,
                   java.util.ArrayList<processing.core.PVector> vertArrayList,
                   int mode,
                   int usage)

### GLModel

    public GLModel(processing.core.PApplet parent,
                   java.lang.String filename)

### GLModel

    public GLModel(processing.core.PApplet parent,
                   java.net.URL url)

Method Detail

### getSize

    public int getSize()

### getDescription

    public java.lang.String getDescription()

### getCoordsVBO

    public int getCoordsVBO()

  Returns the OpenGL identifier of the Vertex Buffer Object holding the coordinates of this model.

  Returns:
    int

### initNormals

    public void initNormals()

  This method creates the normals, i.e.: it creates the internal OpenGL variables to store normal data.

### initColors

    public void initColors()

  This method creates the colors, i.e.: it creates the internal OpenGL variables to store color data.

### initAttributes

    public void initAttributes(int n)

  Sets the number of attributes for this model. An attribute is a vector value associated to each vertex of the model, and can be used for any custom calculation (lighting, deformations, etc). This custom calculations can be performed using a GLModelEffect.

  Parameters:
    `n` - int

### setAttribute

    public void setAttribute(int i,
                             java.lang.String aname,
                             int asize)

  Sets the name and size (number of components per vertex) of attribute i.

  Parameters:
    `i` - int
    `aname` - String
    `asize` - int

### initTexures

    public void initTexures(int n)

  This method creates n textures, i.e.: it creates the internal OpenGL variables to store n textures.

  Parameters:
    `n` - int

### setTexture

    public void setTexture(int i,
                           GLTexture tex)

  Sets the i-th texture.

  Parameters:
    `i` - int

### getNumTextures

    public int getNumTextures()

  Returns the number of textures.

  Returns:
    int

### getTexture

    public GLTexture getTexture(int i)

  Returns the i-th texture.

  Returns:
    GLTexture

### beginUpdateVertices

    public void beginUpdateVertices()

  Enables vertex updating, to be done with the updateVertex()/displaceVertex() methods.

### endUpdateVertices

    public void endUpdateVertices()

  Disables vertex updating.

### getVertices

    public java.util.ArrayList<processing.core.PVector> getVertices(java.lang.String filename)

  Returns array list with vertices stored in binary file.

  Parameters:
    `String` - filename
  Returns:
    ArrayList

### saveVertices

    public void saveVertices(java.lang.String filename,
                             java.util.ArrayList<processing.core.PVector> verts)

  Saves vertices in the given array list to binary file.

  Parameters:
    `String` - filename
    `ArrayList` - verts

### loadVertices

    public void loadVertices(java.lang.String filename)

  Loads vertices from binary file into model.

  Parameters:
    `String` - filename

### saveVertices

    public void saveVertices(java.lang.String filename)

  Saves vertices in the model to binary file.

### updateVertex

    public void updateVertex(int idx,
                             float x,
                             float y)

  Updates the coordinates of vertex idx.

  Parameters:
    `idx` - int
    `x` - float
    `y` - float

### updateVertex

    public void updateVertex(int idx,
                             float x,
                             float y,
                             float z)

  Updates the coordinates of vertex idx.

  Parameters:
    `idx` - int
    `x` - float
    `y` - float
    `z` - float

### updateVertex

    public void updateVertex(int idx,
                             float x,
                             float y,
                             float z,
                             float w)

  Updates the coordinates of vertex idx.

  Parameters:
    `idx` - int
    `x` - float
    `y` - float
    `z` - float
    `w` - float

### displaceVertex

    public void displaceVertex(int idx,
                               float dx,
                               float dy)

  Adds a displacement (dx, dy) to the vertex idx.

  Parameters:
    `idx` - int
    `dx` - float
    `dy` - float

### displaceVertex

    public void displaceVertex(int idx,
                               float dx,
                               float dy,
                               float dz)

  Adds a displacement (dx, dy, dz) to the vertex idx.

  Parameters:
    `idx` - int
    `dx` - float
    `dy` - float
    `dz` - float

### displaceVertex

    public void displaceVertex(int idx,
                               float dx,
                               float dy,
                               float dz,
                               float dw)

  Adds a displacement (dx, dy, dz, dw) to the vertex idx.

  Parameters:
    `idx` - int
    `dx` - float
    `dy` - float
    `dz` - float
    `dw` - float

### updateVertices

    public void updateVertices(float[] vertArray)

  Updates all the vertices using the coordinates provided in the array vertArray.

  Parameters:
    `vertArray` - float[]

### updateVertices

    public void updateVertices(java.util.ArrayList<processing.core.PVector> vertArrayList)

  Updates all the vertices using the coordinates provided in the array vertArray.

  Parameters:
    `vertArrayList` - ArrayList

### centerVertices

    public void centerVertices()

  Centers the model to (0, 0, 0).

### centerVertices

    public void centerVertices(float xc,
                               float yc)

  Centers the model to (xc, yc, 0).

  Parameters:
    `xc` - float
    `yc` - float

### centerVertices

    public void centerVertices(float xc,
                               float yc,
                               float zc)

  Centers the model to (xc, yc, zc).

  Parameters:
    `xc` - float
    `yc` - float
    `zc` - float

### beginUpdateColors

    public void beginUpdateColors()

### endUpdateColors

    public void endUpdateColors()

### getColors

    public java.util.ArrayList<float[]> getColors(java.lang.String filename)

  Returns array list with colors stored in binary file.

  Parameters:
    `String` - filename
  Returns:
    ArrayList

### saveColors

    public void saveColors(java.lang.String filename,
                           java.util.ArrayList<float[]> icolors)

  Saves colors in the given array list to binary file.

  Parameters:
    `String` - filename
    `ArrayList` - icolors

### loadColors

    public void loadColors(java.lang.String filename)

  Loads colors from binary file into model.

  Parameters:
    `String` - filename

### saveColors

    public void saveColors(java.lang.String filename)

  Saves colors in the model to binary file.

### updateColor

    public void updateColor(int i,
                            float gray)

  Paints the vertex i with the specified gray tone.

  Parameters:
    `gray` - float

### updateColor

    public void updateColor(int i,
                            int gray,
                            int alpha)

  Paints the vertex i with the specified gray tone and alpha value.

  Parameters:
    `gray` - int
    `alpha` - int

### updateColor

    public void updateColor(int i,
                            int rgb,
                            float alpha)

  Paints the vertex i with the specified rgb color and alpha value.

  Parameters:
    `rgb` - int
    `alpha` - float

### updateColor

    public void updateColor(int i,
                            float gray,
                            float alpha)

  Paints the vertex i with the specified gray tone and alpha value.

  Parameters:
    `gray` - float
    `alpha` - float

### updateColor

    public void updateColor(int i,
                            int x,
                            int y,
                            int z)

  Paints the vertex i with the specified color components.

  Parameters:
    `x` - int
    `y` - int
    `z` - int

### updateColor

    public void updateColor(int i,
                            float x,
                            float y,
                            float z)

  Paints the vertex i with the specified color components.

  Parameters:
    `x` - float
    `y` - float
    `z` - float

### updateColor

    public void updateColor(int i,
                            int x,
                            int y,
                            int z,
                            int a)

  Paints the vertex i with the specified color components and alpha component.

  Parameters:
    `x` - int
    `y` - int
    `z` - int
    `a` - int

### updateColor

    public void updateColor(int i,
                            float x,
                            float y,
                            float z,
                            float a)

  Paints the vertex i with the specified color components and alpha component.

  Parameters:
    `x` - float
    `y` - float
    `z` - float
    `a` - float

### setColors

    public void setColors(float gray)

  Paints all vertices with the specified gray tone.

  Parameters:
    `gray` - float

### setColors

    public void setColors(int gray,
                          int alpha)

  Paints all vertices with the specified gray tone and alpha value.

  Parameters:
    `gray` - int
    `alpha` - int

### setColors

    public void setColors(int rgb,
                          float alpha)

  Paints all vertices with the specified rgb color and alpha value.

  Parameters:
    `rgb` - int
    `alpha` - float

### setColors

    public void setColors(float gray,
                          float alpha)

  Paints all vertices with the specified gray tone and alpha value.

  Parameters:
    `gray` - float
    `alpha` - float

### setColors

    public void setColors(int x,
                          int y,
                          int z)

  Paints all vertices with the specified color components.

  Parameters:
    `x` - int
    `y` - int
    `z` - int

### setColors

    public void setColors(float x,
                          float y,
                          float z)

  Paints all vertices with the specified color components.

  Parameters:
    `x` - float
    `y` - float
    `z` - float

### setColors

    public void setColors(int x,
                          int y,
                          int z,
                          int a)

  Paints all vertices with the specified color components and alpha component.

  Parameters:
    `x` - int
    `y` - int
    `z` - int
    `a` - int

### setColors

    public void setColors(float x,
                          float y,
                          float z,
                          float a)

  Paints all vertices with the specified color components and alpha component.

  Parameters:
    `x` - float
    `y` - float
    `z` - float
    `a` - float

### updateColors

    public void updateColors(float[] colArray)

### updateColors

    public void updateColors(java.util.ArrayList<float[]> colArrayList)

### beginUpdateTexCoords

    public void beginUpdateTexCoords(int n)

### updateTexCoord

    public void updateTexCoord(int idx,
                               float s,
                               float t)

### getTexCoords

    public java.util.ArrayList<processing.core.PVector> getTexCoords(java.lang.String filename)

  Returns array list with texture coordinates stored in binary file.

  Parameters:
    `String` - filename
  Returns:
    ArrayList

### saveTexCoords

    public void saveTexCoords(java.lang.String filename,
                              java.util.ArrayList<processing.core.PVector> itexCoords)

  Saves texture coordinates in the given array list to binary file.

  Parameters:
    `String` - filename
    `ArrayList` - icolors

### loadTexCoords

    public void loadTexCoords(int n,
                              java.lang.String filename)

  Loads texture coordinates of nth texture from binary file into model.

  Parameters:
    `n` -
    `String` - filename

### saveTexCoords

    public void saveTexCoords(int n,
                              java.lang.String filename)

  Saves colors in the model to binary file.

### displaceTexCoord

    public void displaceTexCoord(int idx,
                                 float ds,
                                 float dt)

### endUpdateTexCoords

    public void endUpdateTexCoords()

### updateTexCoords

    public void updateTexCoords(int n,
                                float[] texCoordsArray)

### updateTexCoords

    public void updateTexCoords(int n,
                                java.util.ArrayList<processing.core.PVector> texCoordsArrayList)

### beginUpdateNormals

    public void beginUpdateNormals()

### endUpdateNormals

    public void endUpdateNormals()

### getNormals

    public java.util.ArrayList<processing.core.PVector> getNormals(java.lang.String filename)

  Returns array list with normals stored in binary file.

  Parameters:
    `String` - filename
  Returns:
    ArrayList

### saveNormals

    public void saveNormals(java.lang.String filename,
                            java.util.ArrayList<processing.core.PVector> norms)

  Saves normals in the given array list to binary file.

  Parameters:
    `String` - filename
    `ArrayList` - verts

### loadNormals

    public void loadNormals(java.lang.String filename)

  Loads normals from binary file into model.

  Parameters:
    `String` - filename

### saveNormals

    public void saveNormals(java.lang.String filename)

  Saves normals in the model to binary file.

### updateNormal

    public void updateNormal(int idx,
                             float x,
                             float y)

### updateNormal

    public void updateNormal(int idx,
                             float x,
                             float y,
                             float z)

### updateNormal

    public void updateNormal(int idx,
                             float x,
                             float y,
                             float z,
                             float w)

### displaceNormal

    public void displaceNormal(int idx,
                               float dx,
                               float dy)

### displaceNormal

    public void displaceNormal(int idx,
                               float dx,
                               float dy,
                               float dz)

### displaceNormal

    public void displaceNormal(int idx,
                               float dx,
                               float dy,
                               float dz,
                               float dw)

### updateNormals

    public void updateNormals(float[] normArray)

### updateNormals

    public void updateNormals(java.util.ArrayList<processing.core.PVector> normArrayList)

### beginUpdateAttributes

    public void beginUpdateAttributes(int n)

### endUpdateAttributes

    public void endUpdateAttributes()

### getAttributes

    public java.util.ArrayList<float[]> getAttributes(java.lang.String filename,
                                                      int len)

  Returns array list with attributes stored in binary file. Each attribute has size len.

  Parameters:
    `String` - filename
  Returns:
    ArrayList int len

### saveAttributes

    public void saveAttributes(java.lang.String filename,
                               java.util.ArrayList<float[]> iattrib,
                               int len)

  Saves attributes in the given array list to binary file. Each attribute has size len.

  Parameters:
    `String` - filename
    `ArrayList` - iattrib

### loadAttributes

    public void loadAttributes(int n,
                               java.lang.String filename)

  Loads attribute nth from binary file into model.

  Parameters:
    `String` - filename

### saveAttributes

    public void saveAttributes(int n,
                               java.lang.String filename)

  Saves attribute n-th in the model to binary file.

### updateAttribute

    public void updateAttribute(int idx,
                                float x)

### updateAttribute

    public void updateAttribute(int idx,
                                float x,
                                float y)

### updateAttribute

    public void updateAttribute(int idx,
                                float x,
                                float y,
                                float z)

### updateAttribute

    public void updateAttribute(int idx,
                                float x,
                                float y,
                                float z,
                                float w)

### updateAttribute

    public void updateAttribute(int idx,
                                float[] values)

### displaceAttribute

    public void displaceAttribute(int idx,
                                  float dx)

### displaceAttribute

    public void displaceAttribute(int idx,
                                  float dx,
                                  float dy)

### displaceAttribute

    public void displaceAttribute(int idx,
                                  float x,
                                  float y,
                                  float z)

### displaceAttribute

    public void displaceAttribute(int idx,
                                  float x,
                                  float y,
                                  float z,
                                  float w)

### displaceAttribute

    public void displaceAttribute(int idx,
                                  float[] dvalues)

### updateAttributes

    public void updateAttributes(int n,
                                 float[] attributesArray)

### updateAttributes

    public void updateAttributes(int n,
                                 java.util.ArrayList<float[]> vertAttribsArrayList)

### setLineWidth

    public void setLineWidth(float w)

### setPointSize

    public void setPointSize(float s)

### getMaxPointSize

    public float getMaxPointSize()

### setSpriteFadeSize

    public void setSpriteFadeSize(float s)

### noBlend

    public void noBlend()

  Disables blending.

### setBlendMode

    public void setBlendMode(int MODE)

  Enables blending and sets the mode.

  Parameters:
    `MODE` - int

### setTint

    public void setTint(float gray)

  Set the tint color to the specified gray tone.

  Parameters:
    `gray` - float

### setTint

    public void setTint(int gray,
                        int alpha)

  Set the tint color to the specified gray tone and alpha value.

  Parameters:
    `gray` - int
    `alpha` - int

### setTint

    public void setTint(int rgb,
                        float alpha)

  Set the tint color to the specified rgb color and alpha value.

  Parameters:
    `rgb` - int
    `alpha` - float

### setTint

    public void setTint(float gray,
                        float alpha)

  Set the tint color to the specified gray tone and alpha value.

  Parameters:
    `gray` - float
    `alpha` - float

### setTint

    public void setTint(int x,
                        int y,
                        int z)

  Set the tint color to the specified color components.

  Parameters:
    `x` - int
    `y` - int
    `z` - int

### setTint

    public void setTint(float x,
                        float y,
                        float z)

  Set the tint color to the specified color components.

  Parameters:
    `x` - float
    `y` - float
    `z` - float

### setTint

    public void setTint(int x,
                        int y,
                        int z,
                        int a)

  Set the tint color to the specified color components and alpha component.

  Parameters:
    `x` - int
    `y` - int
    `z` - int
    `a` - int

### setTint

    public void setTint(float x,
                        float y,
                        float z,
                        float a)

  Set the tint color to the specified color components and alpha component.

  Parameters:
    `x` - float
    `y` - float
    `z` - float
    `a` - float

### setReflection

    public void setReflection(float gray)

  Set the specular color to the specified gray tone.

  Parameters:
    `gray` - float

### setReflection

    public void setReflection(int gray,
                              int alpha)

  Set the specular color to the specified gray tone and alpha value.

  Parameters:
    `gray` - int
    `alpha` - int

### setReflection

    public void setReflection(int rgb,
                              float alpha)

  Set the specular color to the specified rgb color and alpha value.

  Parameters:
    `rgb` - int
    `alpha` - float

### setReflection

    public void setReflection(float gray,
                              float alpha)

  Set the specular color to the specified gray tone and alpha value.

  Parameters:
    `gray` - float
    `alpha` - float

### setReflection

    public void setReflection(int x,
                              int y,
                              int z)

  Set the specular color to the specified color components.

  Parameters:
    `x` - int
    `y` - int
    `z` - int

### setReflection

    public void setReflection(float x,
                              float y,
                              float z)

  Set the specular color to the specified color components.

  Parameters:
    `x` - float
    `y` - float
    `z` - float

### setReflection

    public void setReflection(int x,
                              int y,
                              int z,
                              int a)

  Set the specular color to the specified color components and alpha component.

  Parameters:
    `x` - int
    `y` - int
    `z` - int
    `a` - int

### setReflection

    public void setReflection(float x,
                              float y,
                              float z,
                              float a)

  Set the specular color to the specified color components and alpha component.

  Parameters:
    `x` - float
    `y` - float
    `z` - float
    `a` - float

### setEmission

    public void setEmission(float gray)

  Set the emissive color to the specified gray tone.

  Parameters:
    `gray` - float

### setEmission

    public void setEmission(int gray,
                            int alpha)

  Set the emissive color to the specified gray tone and alpha value.

  Parameters:
    `gray` - int
    `alpha` - int

### setEmission

    public void setEmission(int rgb,
                            float alpha)

  Set the emissive color to the specified rgb color and alpha value.

  Parameters:
    `rgb` - int
    `alpha` - float

### setEmission

    public void setEmission(float gray,
                            float alpha)

  Set the emissive color to the specified gray tone and alpha value.

  Parameters:
    `gray` - float
    `alpha` - float

### setEmission

    public void setEmission(int x,
                            int y,
                            int z)

  Set the emissive color to the specified color components.

  Parameters:
    `x` - int
    `y` - int
    `z` - int

### setEmission

    public void setEmission(float x,
                            float y,
                            float z)

  Set the emissive color to the specified color components.

  Parameters:
    `x` - float
    `y` - float
    `z` - float

### setEmission

    public void setEmission(int x,
                            int y,
                            int z,
                            int a)

  Set the emissive color to the specified color components and alpha component.

  Parameters:
    `x` - int
    `y` - int
    `z` - int
    `a` - int

### setEmission

    public void setEmission(float x,
                            float y,
                            float z,
                            float a)

  Set the emissive color to the specified color components and alpha component.

  Parameters:
    `x` - float
    `y` - float
    `z` - float
    `a` - float

### render

    public void render()

### render

    public void render(GLModelEffect effect)

### render

    public void render(int first,
                       int last)

### render

    public void render(int first,
                       int last,
                       GLModelEffect effect)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

processing library glgraphics by Andres Colubri. (c) 2008