| Home | zeGraph lib | Lua lib | Custom lib | Tutorials | Notes | XML Script | C-Talk | Z-Script |
Graph
   axis
   blend
   color
   color bar
   fog
   freetype
   light
   line
   material
   node
   point
   plot
   polygon
   render
   scene
   stencil
   texcoord
   text
   texture
   vertex
Utility
   array
   bio
   hdf
   make
   math
   netcdf
Auxiliary
   curl
   expact
   sqlite
   window

zeColor

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

:add(red, green, blue)

Adds a color to the object. The alpha will be 1.

:add(red, green, blue, alpha)

Adds a color to the object.

:add{red, green, blue, alpha, ...}

Adds color data to the object with a Lua table.

:add(array)

Transfers data in the array of double type to the color object. The number of vectors of the array must be 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(index)

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

:get(array)

Transfers color data to the array. The array must have four vectors and the same number of records as the color object.

:size()

Gets the number of color data.