Sets vertex UV texture coordinates.
Takes mesh (surface-based mesh entity), surface (surface handle, 0-based), vertexIndex (vertex number, 0-based), u/v (texture coordinates as doubles), coordSet (UV set index, currently ignored - only set 0 supported).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
meshInt
surfaceInt
vertexIndexInt
uDouble
vDouble
coordSetInt
Returns
Void
Quick Summary
Sets vertex UV texture coordinates.
Takes mesh (surface-based mesh entity), surface (surface handle, 0-based), vertexIndex (vertex number, 0-based), u/v (texture coordinates as doubles), coordSet (UV set index, currently ignored - only set 0 supported).
Returns nothing.
Technical Exegesis...
Sets vertex UV texture coordinates. Takes mesh (surface-based mesh entity), surface (surface handle, 0-based), vertexIndex (vertex number, 0-based), u/v (texture coordinates as doubles), coordSet (UV set index, currently ignored - only set 0 supported). Returns nothing. Validates mesh exists, type is ENTITY_MESH, is surface-based, surface index valid, and vertex index valid. Sets texCoord: texCoord.x = u, texCoord.y = v. coordSet parameter ignored (reserved for multi-UV support).
Sets vertex UV texture coordinates. Takes mesh (surface-based mesh entity), surface (surface handle, 0-based), vertexIndex (vertex number, 0-based), u/v (texture coordinates as doubles), coordSet (UV set index, currently ignored - only set 0 supported). Returns nothing. Validates mesh exists, type is ENTITY_MESH, is surface-based, surface index valid, and vertex index valid. Sets texCoord: texCoord.x = u, texCoord.y = v. coordSet parameter ignored (reserved for multi-UV support). Sets surface->needsGPUUpload=true and mesh->needsGPUUpload=true. Silently returns on validation errors.
This function modifies UV coordinates for texture mapping control. UV = 2D texture coordinates mapping texture image onto 3D mesh. U = horizontal (0.0 = left, 1.0 = right), V = vertical (0.0 = top, 1.0 = bottom). Values outside 0-1 cause tiling/wrapping based on sampler mode. Must lock mesh before calling. Use cases: (1) UV animation (scroll texture by offsetting UVs each frame), (2) UV correction (fix seams or distortion), (3) Procedural UV mapping (custom algorithms), (4) Texture atlas assignment (map vertices to atlas regions), (5) Dynamic texture placement (move texture decals). Common pattern: b3dLockMesh(mesh), For i=0 To b3dCountVertices(mesh, surf)-1, u=b3dVertexU(mesh, surf, i, 0), v=b3dVertexV(mesh, surf, i, 0), newU = u + scrollSpeedX * time, newV = v + scrollSpeedY * time, b3dVertexTexCoords(mesh, surf, i, newU, newV, 0), b3dUnlockMesh(mesh). coordSet parameter: reserved for multi-UV (base texture set 0, lightmap set 1, normal map set 2), currently only set 0 implemented - other values ignored. UV range: typically 0.0-1.0 for single texture, any value valid for tiling. No UV negation: coordinates stored as-is (unlike position/normal Y). GPU upload deferred: changes rendered on b3dUnlockMesh. Alternative: b3dUVMap functions for automatic UV projection, b3dAddVertex for initial UV assignment. Performance: O(1) per vertex, efficient for dynamic UV updates. Texture wrapping modes: repeat (tiles texture), clamp (stretches edge), mirror (alternates texture). UV seam handling: duplicate vertices at seams with different UVs to avoid interpolation artifacts. Precision: double input, float storage.