1.2

| home | graph lib | utility lib | custom lib | auxiliary lib | tutorials |

   Axis
   Blend
   Color
   ColorBar
   Fog
   Freetype
   Light
   Line
   Material
   Node
   Point
   Plot
   Polygon
   Render
   Scene
   Stencil
   TexCoord
   Text
   Texture
   Vertex

zeColor

Use .new("color") to create the object. It is used to hold color data of vertices. It can be shared by any number of shape objects.

:add(r, g, b[, a])

r - a number between 0 and 1 for red color.
g - a number between 0 and 1 for green color.
b - a number between 0 and 1 for blue color.
a - a number between 0 and 1 for transparency (alpha value).

Adds a color to the object.

:add(table)

table - a Lua table containing numbers.

Adds colors to the object using Lua table, which should contain color components of red, green, blue, and alpha.

:add(array)

array - a zeArray object of double type.

Transfers data in the array to the color object. The number of vectors of the array must larger than or equal to four. Color components of red, green, blue, and alpha should be in the first to the fourth vectors.

:clear()

Clears all data from the object.

:get(idx)

idx - the index number.

Returns red, green, blue, and alpha at the index. The first color is at index 0.

:size()

Gets the number of colors.