copymesh question

BlitzMax Forums/MiniB3D Module/copymesh question

jkrankie(Posted 2009) [#1]
Am i right in thinking that copymesh is there so i only need to load a mesh once, then i can copy it as many times as i like? Are there any prerequisites to it working, as it seems to only sometimes work for me?

Cheers
Charlie


ima747(Posted 2009) [#2]
Can you define "sometimes works"?

Copy mesh makes a copy of the mesh data to a new mesh, the origonal and copy are not bound and can be manipulated without affecting each other. Since it only copys the mesh data it will not copy any manipulation you have done to the entity, like alpha, scaling etc. only things you've done to the mesh itself, such as scalemesh.


jkrankie(Posted 2009) [#3]
Doh! i was trying to copy BEFORE i'd loaded them!

Cheers
Charlie


Zethrax(Posted 2009) [#4]
CopyMesh will copy the mesh data to the new entity. You end up with one copy of the mesh data for each copy entity, plus the entity you copied it from.

If you want to have multiple entities referencing a single set of mesh data, then you would use CopyEntity instead.


jkrankie(Posted 2009) [#5]
Yeah, i get it. I was trying to copy a mesh declared as global before it had loaded, one of the traps of using include rather than import.

Cheers
Charlie