Code archives/3D Graphics - Mesh/ResizeMesh(mesh,width#,height#,depth#)
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
Remember the ResizeImage function. There is nothing like that for entities and meshes. My function does it with one line code. | |||||
Function ResizeMesh(mesh,width#,height#,depth#) ScaleMesh mesh,1/MeshWidth#(mesh)*width#,1/MeshHeight#(mesh)*height#,(1/MeshDepth#(mesh))*depth# End Function |
Comments
| ||
This is absolutly bril! From Blitz123 |
| ||
what about FitMesh?? |
| ||
As mentioned by ryan..Function ResizeMesh%(M%,W#,H#,D#) If Mesh = 0 Then Return 0 FitMesh M%,-W#*.5,-H#*.5,-D#*.5,W#*.5,H#*.5,D#*.5 Return 1 End Function This is simpler and it has a failsafe. |
| ||
Good work though "AuzingLG" - you obviously weren't aware, yet you decided to soldier on for a solution - good stuff. |
| ||
I think he was well aware, his routine works. |
| ||
Thanks for this function !!!! very usefull for me ! |
Code Archives Forum