How can meshes be loaded and unloaded? [solved]

Paulov

24-03-2007 15:36:28

Hello

I´m finishing my final university project. It consists on a visualization of a large urban area where architectural proposalls must be shown.

I need to load and unload the mesh of a Bridge, so that the site can be visualized prior and after the project.

A programmer is helping me, but is not familiarised with oFusion.

We are getting mad looking for the method to load and unload meshes.
We have very few time as it must be done for monday so rapid answers will be apreciated. ( A lot!!).

Thanks

Lioric

24-03-2007 15:54:00

Do you need to unload separated meshes or complete scenes?

For separated meshes (entities in your application) use the create/destroy methods of the Scene Manager object (or the hide methods if you need)

Paulov

24-03-2007 18:23:03

Hey

Thank for your fast replys Lioric.

I need to load/unload single meshes like a bridge, everything will be attached.

I´ll tell the programmer in the night conversation we´ll have to use the create/destroy method.

bye.

Axon

28-03-2007 09:58:52

I believe you can also assign a unique material to the bridge and then turn the material on & off. (Sorry I can't be more specific but I haven't tried this myself... just read it somewhere).

Lioric: Can you confirm whether this would work? What object and what method is used? e.g. Ogre::SceneNode::visible(bool)?

Paulov

28-03-2007 13:26:52

Hey, thanks for your replys

The programmer solved this problem with the Entities method commented by Lioric.

The result was very nice, helping to show a bridge and to hide it.

Thanks.

Lioric

03-04-2007 03:01:32

Axon, this will work, yes, but it will keep your object in memory (if you want to use/display it later) you can use the "setVisible" method of the scenenode to apply this to all of its attached objects, or the method of the entitiy/movableObject if you want to set the visibilty per attached object (if multiple objects are attached ot the scenenode)