Quote (Alex_IOS)
можно ли менять координаты вершин загруженой меш-модели
конечно можно!
вот наклепал:
Code
Graphics3D 640,480,0,2
SetBuffer BackBuffer()
SeedRnd MilliSecs()
camera=CreateCamera()
light=CreateLight()
cone=CreateSphere()
PositionEntity cone,0,0,5
While Not KeyDown( 1 )
DeformMesh(cone, .01)
RenderWorld
Flip
Wend
End
Function DeformMesh(mesh, force#)
SeedRnd MilliSecs()
For temp_dm_1 = 1 To CountSurfaces(mesh)
For temp_dm_2 = 1 To CountVertices(GetSurface(mesh, temp_dm_1))-1
temp_dm_3 = GetSurface(mesh, temp_dm_1)
temp_dm_4# = VertexX(temp_dm_3, temp_dm_2) + Rnd(0 - force/2, force/2)
temp_dm_5# = VertexY(temp_dm_3, temp_dm_2) + Rnd(0 - force/2, force/2)
temp_dm_6# = VertexZ(temp_dm_3, temp_dm_2) + Rnd(0 - force/2, force/2)
VertexCoords temp_dm_3, temp_dm_2, temp_dm_4, temp_dm_5, temp_dm_6
Next
Next
End Function