|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object codeanticode.glgraphics.GLModel
public class GLModel
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.
Field Summary | |
---|---|
java.nio.FloatBuffer |
attributes
|
java.nio.FloatBuffer |
colors
|
float |
depth
|
static int |
DYNAMIC
|
float |
height
|
java.nio.IntBuffer |
indices
|
java.nio.FloatBuffer |
normals
|
static int |
STATIC
|
static int |
STREAM
|
java.nio.FloatBuffer |
texCoords
|
GLTexture[] |
textures
|
java.nio.FloatBuffer |
vertices
|
float |
width
|
float |
xmax
|
float |
xmin
|
float |
ymax
|
float |
ymin
|
float |
zmax
|
float |
zmin
|
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, BILINEAR, BLEND, BLUE_MASK, BLUR, BOTTOM, BOX, BURN, CENTER, CENTER_DIAMETER, CENTER_RADIUS, CHATTER, CLAMP, 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_MASK, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_NATIVE_FONTS, DISABLE_OPENGL_2X_SMOOTH, DISABLE_OPENGL_ERROR_REPORT, DODGE, DOWN, DR, DXF, EB, EDGE, EG, ELLIPSE, ENABLE_ACCURATE_TEXTURES, ENABLE_DEPTH_MASK, 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, FIXED, G, GIF, GRAY, GREEN_MASK, HALF_PI, HAND, HARD_LIGHT, HAS_NORMAL, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LEFT, LIGHTEST, LINE, LINE_LOOP, LINE_STRIP, LINEAR, LINES, LINUX, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MODELVIEW, MOVE, MULTIPLY, NORMAL, NORMALIZED, NX, NY, NZ, OPAQUE, OPEN, OPENGL, OPENGL2, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PDF, PERSPECTIVE, PI, platformNames, POINT, POINT_SPRITES, POINTS, POLYGON, POSTERIZE, PROBLEM, PROG_GL2, PROG_GL3, PROG_GL4, PROJECT, PROJECTION, QUAD, QUAD_STRIP, QUADRATIC, QUADS, QUARTER_PI, R, RAD_TO_DEG, RADIUS, RECT, RED_MASK, REPEAT, 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, TEXTURE2D, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TRILINEAR, TWO_PI, TX, TY, TZ, U, UP, V, VERTEX_FIELD_COUNT, VW, VX, VY, VZ, WAIT, WHITESPACE, WINDOWS, X, Y, Z |
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 |
autoIndexBounds(boolean val)
This method enables/disables the automatic calculation of index bounds (maximum and minimum). |
void |
beginUpdateAttributes(int n)
|
void |
beginUpdateColors()
|
void |
beginUpdateIndices()
Prepares the indices for updating. |
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 |
delete()
|
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 |
endUpdateIndices()
Cleans-up index updating. |
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()
|
int |
getMode()
|
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 |
initIndices(int n)
This method initializes the index array in this GLModel, capable to hold up to n vertex indices. |
void |
initIndices(int n,
int usage)
This method initializes the index array in this GLModel, capable to hold up to n vertex indices. |
void |
initNormals()
This method creates the normals, i.e.: it creates the internal OpenGL variables to store normal data. |
void |
initTextures(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 |
noTint()
Set the tint color to solid white. |
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 |
setMaxIndex(int max)
Sets the maximum index value to use when rendering the model. |
void |
setMaxSpriteSize(float s)
Sets the maximum sprite size (which is capped by the maximum point size). |
void |
setMinIndex(int min)
Sets the minimum index value to use when rendering the model. |
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 |
setShininess(float val)
|
void |
setSpriteSize(float s)
Sets the sprite size to be constant and equal to s. |
void |
setSpriteSize(float s,
float d)
Sets the sprite distance attenuation function for sprites using quadratic dependence on the distance. |
void |
setSpriteSize(float s,
float d,
boolean quadratic)
Sets the sprite distance attenuation function for sprites such that the sprite size at distance d from the camera is exactly 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 |
updateBounds()
|
void |
updateBounds(int[] indices,
int len)
|
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 |
updateIndices(int[] indexArray)
Updates the indices with all the values provided in the array. |
void |
updateIndices(int[] indexArray,
int len)
Updates the indices with the values provided in the array, up to the element len-1. |
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 |
---|
public GLTexture[] textures
public java.nio.FloatBuffer vertices
public java.nio.FloatBuffer colors
public java.nio.FloatBuffer normals
public java.nio.FloatBuffer texCoords
public java.nio.FloatBuffer attributes
public java.nio.IntBuffer indices
public float width
public float height
public float depth
public float xmin
public float xmax
public float ymin
public float ymax
public float zmin
public float zmax
public static final int STATIC
public static final int DYNAMIC
public static final int STREAM
Constructor Detail |
---|
public GLModel(processing.core.PApplet parent, int numVert, int mode, int usage)
parent
- PAppletnumVert
- intmode
- intusage
- intpublic GLModel(processing.core.PApplet parent, float[] vertArray, int mode, int usage)
public GLModel(processing.core.PApplet parent, java.util.ArrayList<processing.core.PVector> vertArrayList, int mode, int usage)
public GLModel(processing.core.PApplet parent, java.lang.String filename)
public GLModel(processing.core.PApplet parent, java.net.URL url)
Method Detail |
---|
public void delete()
public int getMode()
public int getSize()
public java.lang.String getDescription()
public int getCoordsVBO()
public void initNormals()
public void initColors()
public void initAttributes(int n)
n
- intpublic void setAttribute(int i, java.lang.String aname, int asize)
i
- intaname
- Stringasize
- intpublic void initTextures(int n)
n
- intpublic void initIndices(int n)
n
- intpublic void initIndices(int n, int usage)
n
- maximum size of index arrayusage
- could be STATIC, DYNAMIC, or STREAMpublic void autoIndexBounds(boolean val)
val
- true or falsepublic void beginUpdateIndices()
public void endUpdateIndices()
public void updateIndices(int[] indexArray)
indexArray
- array with new indicespublic void updateIndices(int[] indexArray, int len)
indexArray
- array with new indiceslen
- number of values to read from intexArray, starting at zero.public void setMinIndex(int min)
min
- minimum indexpublic void setMaxIndex(int max)
max
- maximum indexpublic void setTexture(int i, GLTexture tex)
i
- intpublic int getNumTextures()
public GLTexture getTexture(int i)
public void beginUpdateVertices()
public void endUpdateVertices()
public java.util.ArrayList<processing.core.PVector> getVertices(java.lang.String filename)
String
- filename
public void saveVertices(java.lang.String filename, java.util.ArrayList<processing.core.PVector> verts)
String
- filenameArrayList
- vertspublic void loadVertices(java.lang.String filename)
String
- filenamepublic void saveVertices(java.lang.String filename)
public void updateVertex(int idx, float x, float y)
idx
- intx
- floaty
- floatpublic void updateVertex(int idx, float x, float y, float z)
idx
- intx
- floaty
- floatz
- floatpublic void updateVertex(int idx, float x, float y, float z, float w)
idx
- intx
- floaty
- floatz
- floatw
- floatpublic void displaceVertex(int idx, float dx, float dy)
idx
- intdx
- floatdy
- floatpublic void displaceVertex(int idx, float dx, float dy, float dz)
idx
- intdx
- floatdy
- floatdz
- floatpublic void displaceVertex(int idx, float dx, float dy, float dz, float dw)
idx
- intdx
- floatdy
- floatdz
- floatdw
- floatpublic void updateVertices(float[] vertArray)
vertArray
- float[]public void updateVertices(java.util.ArrayList<processing.core.PVector> vertArrayList)
vertArrayList
- ArrayListpublic void centerVertices()
public void centerVertices(float xc, float yc)
xc
- floatyc
- floatpublic void centerVertices(float xc, float yc, float zc)
xc
- floatyc
- floatzc
- floatpublic void updateBounds()
public void updateBounds(int[] indices, int len)
public void beginUpdateColors()
public void endUpdateColors()
public java.util.ArrayList<float[]> getColors(java.lang.String filename)
String
- filename
public void saveColors(java.lang.String filename, java.util.ArrayList<float[]> icolors)
String
- filenameArrayList
- icolorspublic void loadColors(java.lang.String filename)
String
- filenamepublic void saveColors(java.lang.String filename)
public void updateColor(int i, float gray)
gray
- floatpublic void updateColor(int i, int gray, int alpha)
gray
- intalpha
- intpublic void updateColor(int i, int rgb, float alpha)
rgb
- intalpha
- floatpublic void updateColor(int i, float gray, float alpha)
gray
- floatalpha
- floatpublic void updateColor(int i, int x, int y, int z)
x
- inty
- intz
- intpublic void updateColor(int i, float x, float y, float z)
x
- floaty
- floatz
- floatpublic void updateColor(int i, int x, int y, int z, int a)
x
- inty
- intz
- inta
- intpublic void updateColor(int i, float x, float y, float z, float a)
x
- floaty
- floatz
- floata
- floatpublic void setColors(float gray)
gray
- floatpublic void setColors(int gray, int alpha)
gray
- intalpha
- intpublic void setColors(int rgb, float alpha)
rgb
- intalpha
- floatpublic void setColors(float gray, float alpha)
gray
- floatalpha
- floatpublic void setColors(int x, int y, int z)
x
- inty
- intz
- intpublic void setColors(float x, float y, float z)
x
- floaty
- floatz
- floatpublic void setColors(int x, int y, int z, int a)
x
- inty
- intz
- inta
- intpublic void setColors(float x, float y, float z, float a)
x
- floaty
- floatz
- floata
- floatpublic void updateColors(float[] colArray)
public void updateColors(java.util.ArrayList<float[]> colArrayList)
public void beginUpdateTexCoords(int n)
public void updateTexCoord(int idx, float s, float t)
public java.util.ArrayList<processing.core.PVector> getTexCoords(java.lang.String filename)
String
- filename
public void saveTexCoords(java.lang.String filename, java.util.ArrayList<processing.core.PVector> itexCoords)
String
- filenameArrayList
- public void loadTexCoords(int n, java.lang.String filename)
n
- String
- filenamepublic void saveTexCoords(int n, java.lang.String filename)
public void displaceTexCoord(int idx, float ds, float dt)
public void endUpdateTexCoords()
public void updateTexCoords(int n, float[] texCoordsArray)
public void updateTexCoords(int n, java.util.ArrayList<processing.core.PVector> texCoordsArrayList)
public void beginUpdateNormals()
public void endUpdateNormals()
public java.util.ArrayList<processing.core.PVector> getNormals(java.lang.String filename)
String
- filename
public void saveNormals(java.lang.String filename, java.util.ArrayList<processing.core.PVector> norms)
String
- filenameArrayList
- vertspublic void loadNormals(java.lang.String filename)
String
- filenamepublic void saveNormals(java.lang.String filename)
public void updateNormal(int idx, float x, float y)
public void updateNormal(int idx, float x, float y, float z)
public void updateNormal(int idx, float x, float y, float z, float w)
public void displaceNormal(int idx, float dx, float dy)
public void displaceNormal(int idx, float dx, float dy, float dz)
public void displaceNormal(int idx, float dx, float dy, float dz, float dw)
public void updateNormals(float[] normArray)
public void updateNormals(java.util.ArrayList<processing.core.PVector> normArrayList)
public void beginUpdateAttributes(int n)
public void endUpdateAttributes()
public java.util.ArrayList<float[]> getAttributes(java.lang.String filename, int len)
String
- filename
public void saveAttributes(java.lang.String filename, java.util.ArrayList<float[]> iattrib, int len)
String
- filenameArrayList
- iattribpublic void loadAttributes(int n, java.lang.String filename)
String
- filenamepublic void saveAttributes(int n, java.lang.String filename)
public void updateAttribute(int idx, float x)
public void updateAttribute(int idx, float x, float y)
public void updateAttribute(int idx, float x, float y, float z)
public void updateAttribute(int idx, float x, float y, float z, float w)
public void updateAttribute(int idx, float[] values)
public void displaceAttribute(int idx, float dx)
public void displaceAttribute(int idx, float dx, float dy)
public void displaceAttribute(int idx, float x, float y, float z)
public void displaceAttribute(int idx, float x, float y, float z, float w)
public void displaceAttribute(int idx, float[] dvalues)
public void updateAttributes(int n, float[] attributesArray)
public void updateAttributes(int n, java.util.ArrayList<float[]> vertAttribsArrayList)
public void setLineWidth(float w)
public void setPointSize(float s)
public float getMaxPointSize()
public void setMaxSpriteSize(float s)
public void setSpriteSize(float s)
public void setSpriteSize(float s, float d)
public void setSpriteSize(float s, float d, boolean quadratic)
public void noBlend()
public void setBlendMode(int MODE)
MODE
- intpublic void setTint(float gray)
gray
- floatpublic void setTint(int gray, int alpha)
gray
- intalpha
- intpublic void setTint(int rgb, float alpha)
rgb
- intalpha
- floatpublic void setTint(float gray, float alpha)
gray
- floatalpha
- floatpublic void setTint(int x, int y, int z)
x
- inty
- intz
- intpublic void setTint(float x, float y, float z)
x
- floaty
- floatz
- floatpublic void setTint(int x, int y, int z, int a)
x
- inty
- intz
- inta
- intpublic void setTint(float x, float y, float z, float a)
x
- floaty
- floatz
- floata
- floatpublic void noTint()
public void setReflection(float gray)
gray
- floatpublic void setReflection(int gray, int alpha)
gray
- intalpha
- intpublic void setReflection(int rgb, float alpha)
rgb
- intalpha
- floatpublic void setReflection(float gray, float alpha)
gray
- floatalpha
- floatpublic void setReflection(int x, int y, int z)
x
- inty
- intz
- intpublic void setReflection(float x, float y, float z)
x
- floaty
- floatz
- floatpublic void setReflection(int x, int y, int z, int a)
x
- inty
- intz
- inta
- intpublic void setReflection(float x, float y, float z, float a)
x
- floaty
- floatz
- floata
- floatpublic void setEmission(float gray)
gray
- floatpublic void setEmission(int gray, int alpha)
gray
- intalpha
- intpublic void setEmission(int rgb, float alpha)
rgb
- intalpha
- floatpublic void setEmission(float gray, float alpha)
gray
- floatalpha
- floatpublic void setEmission(int x, int y, int z)
x
- inty
- intz
- intpublic void setEmission(float x, float y, float z)
x
- floaty
- floatz
- floatpublic void setEmission(int x, int y, int z, int a)
x
- inty
- intz
- inta
- intpublic void setEmission(float x, float y, float z, float a)
x
- floaty
- floatz
- floata
- floatpublic void setShininess(float val)
public void render()
public void render(GLModelEffect effect)
public void render(int first, int last)
public void render(int first, int last, GLModelEffect effect)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |