mesh - mesh handle x# - x position of mesh y# - y position of mesh z# - z position of mesh |
Moves all vertices of a mesh.
See also: dxPositionEntity, dxMoveEntity, dxTranslateEntity. |
; dxPositionMesh Example ; -------------------- ; In this example we will demonstrate the use of the dxPositionMesh command. ; Unlike dxPositionEntity, dxPositionMesh actually modifies the actual mesh structure. ; So whereas using dxPositionEntity 0,0,1 would only move an entity by one unit the first time it was ; used, dxPositionMesh 0,0,1 will move the mesh by one unit every time it is used. ; This is because dxPositionEntity positions an entity based on a fixed mesh structure, whereas ; dxPositionMesh actually modifies the mesh structure itself. dxGraphics3D 640,480 dxSetBuffer dxBackBuffer() camera=dxCreateCamera() light=dxCreateLight() ; Create cube mesh cube=dxCreateCube() ; Position cube in front of camera so we can see it dxPositionEntity cube,0,0,5 While Not dxKeyDown(1) ; If space bar pressed then position mesh 1 unit along the z axis. Also set syntax$ dxText. If dxKeyHit(57)=True Then dxPositionMesh cube,0,0,1 : syntax$="dxPositionMesh 0,0,1" dxRenderWorld dxText 0,0,"Press space to position the mesh 1 unit along the z axis" dxText 0,20,syntax$ dxFlip Wend End |