- vertexAllocatedcount (vertexarray)
- returns: ([int cnt])
return vertex allocated count. This is the number of vertices that can be used in this vertexarray, index must always be smaller than this.
- vertexBBox (vertexarray)
- returns: (float minx,miny,minz,maxx,maxy,maxz)
gets bounding box of vertices
- vertexColor (vertexarray, int index,[float r,g,b,a])
- returns: ([float r,g,b,a])
set or return color
- vertexColorTris (vertexarray, int a, int b, int c, float ba, float ca)
- returns: ([float r,g,b,a])
returns interpolated color for given triangle indices, using the barycentric coordinates.
- vertexColorarray (vertexarray,[floatarray])
- returns: ([floatarray])
returns or sets vertex colors from given array (4 times the size of vertexAllocatedcount).
- vertexCopy (vertexarray, int start, vertexarray from,int fromstart, int size, [matrix16])
- returns: ()
copies vertices from other vertexarray, optionally with transfrom matrix.
- vertexCount (vertexarray, [int cnt])
- returns: ([int cnt])
set or return vertex count. This count is used for statistics and for optimizing, it can be smaller than allocated count and should be equal to the last vertex you use. Morphable
l3dmodels will not allow setting it.
- vertexInverttexcoord (vertexarray, boolean y,[int texchannel 0-3])
- returns: ()
inverts y (or x) coordinates of texcoord channel for all vertices by doing 1.0f-coord.
- vertexNormal (vertexarray, int index,[float x,y,z])
- returns: ([float x,y,z])
- vertexNormalTris (vertexarray, int a, int b, int c, float ba, float ca)
- returns: ([float x,y,z])
returns interpolated normal for given triangle indices, using the barycentric coordinates.
- vertexNormalarray (vertexarray,[floatarray])
- returns: ([floatarray])
returns or sets vertex position from given array (3 times the size of vertexAllocatedcount).
- vertexPos (vertexarray, int index,[matrix16],[float x,y,z])
- returns: ([float x,y,z])
set or return position. Transformed with by matrix if given.
- vertexPos2texcoord (vertexarray,[float planex,y,z], [int texchannel 0-3])
- returns: ()
copy xy coordinates from positions to texcoord channel for all vertices, or project them on given plane normal.
- vertexPosTris (vertexarray, int a, int b, int c, float ba, float ca)
- returns: ([float x,y,z])
returns interpolated position for given triangle indices, using the barycentric coordinates.
- vertexPosarray (vertexarray,[floatarray])
- returns: ([floatarray])
returns or sets vertex position from given array (3 times the size of vertexAllocatedcount).
- vertexTexcoord (vertexarray, int index,[float u,v],[int texchannel 0-3])
- returns: ([float u,v])
set or return
texture coordinates for given channel. All vertices have 1 channel, without normals 2 and bigvertex 4. channel 0 is used for
textures, channel 1 is used for lightmaps.
- vertexTexcoordTris (vertexarray, int a, int b, int c, float ba, float ca,[int texchannel 0-3])
- returns: ([float u,v])
returns
texture coordinates for given triangle indices, using the barycentric coordinates.
- vertexTexcoordtransform (vertexarray, matrix16,[int texchannel 0-3])
- returns: ()
transforms texcoords by given matrix
- vertexTransform (vertexarray, matrix16)
- returns: ()
transform all vertices with given matrix
- vertexUpdateVBO (vertexarray)
- returns: (boolean)
if possible resubmits array using vertexAllocatedcount to VBO, returns true on success else false (no VBO or non compatible vertexarray).
- vertexUser4 (vertexarray, int index,[float x,y,z,w])
- returns: ([float x,y,z,w])
set or return user4 vector, only bigvertex
vertexarrays will allow this. It overwrites texcoord channel 2 and 3.