Sets vertex position coordinates (with Y-axis negation).
Takes mesh (surface-based mesh entity), surface (surface handle, 0-based), vertexIndex (vertex number, 0-based), x/y/z (new position coordinates as doubles).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
meshInt
surfaceInt
vertexIndexInt
xDouble
yDouble
zDouble
Returns
Void
Quick Summary
Sets vertex position coordinates (with Y-axis negation).
Takes mesh (surface-based mesh entity), surface (surface handle, 0-based), vertexIndex (vertex number, 0-based), x/y/z (new position coordinates as doubles).
Returns nothing.
Technical Exegesis...
Sets vertex position coordinates (with Y-axis negation). Takes mesh (surface-based mesh entity), surface (surface handle, 0-based), vertexIndex (vertex number, 0-based), x/y/z (new position coordinates as doubles). Returns nothing. Validates mesh exists, type is ENTITY_MESH, is surface-based, surface index valid, and vertex index valid. Sets position: position.x = x, position.y = -y (negated), position.z = z. Sets surface->needsGPUUpload=true and mesh->needsGPUUpload=true.
Sets vertex position coordinates (with Y-axis negation). Takes mesh (surface-based mesh entity), surface (surface handle, 0-based), vertexIndex (vertex number, 0-based), x/y/z (new position coordinates as doubles). Returns nothing. Validates mesh exists, type is ENTITY_MESH, is surface-based, surface index valid, and vertex index valid. Sets position: position.x = x, position.y = -y (negated), position.z = z. Sets surface->needsGPUUpload=true and mesh->needsGPUUpload=true. Silently returns on validation errors.
This function modifies vertex position for procedural mesh deformation and animation. CRITICAL: Y-axis negation applied - user Y+ = up converted to DirectX Y- = up internally. User sets Y=10.0 (10 units up), internally stored as -10.0. needsGPUUpload flags ensure changes uploaded to GPU on next b3dUnlockMesh. Must lock mesh before calling - b3dLockMesh required for all vertex modification operations. Use cases: (1) Vertex animation (move vertices each frame for waving flags, rippling water), (2) Mesh deformation (terrain editing, sculpting), (3) Morphing (interpolate between vertex positions), (4) Procedural geometry (update heightfield vertices), (5) Collision response (deform mesh on impact). Common pattern: b3dLockMesh(mesh), For i=0 To b3dCountVertices(mesh, surf)-1, x=b3dVertexX(mesh, surf, i), y=b3dVertexY(mesh, surf, i), z=b3dVertexZ(mesh, surf, i), newY = y + Sin(time + x) * amplitude, b3dVertexCoords(mesh, surf, i, x, newY, z), b3dUnlockMesh(mesh). Y-negation symmetry: b3dAddVertex negates Y on input, b3dVertexY negates Y on output, b3dVertexCoords negates Y on input - round-trip consistent. Position range: unlimited, any double value valid (world-space coordinates). GPU upload deferred: changes not rendered until b3dUnlockMesh called. Alternative: b3dAddVertex for new vertices, recreate mesh for complete rebuild. Performance: O(1) per vertex, batch updates efficient. Normal update: after moving vertices, call b3dUpdateNormals to recalculate surface normals for correct lighting. Precision: double input, float storage (slight precision loss for very large values).