tdev
27-12-2008 15:30:24
since i needed it, i thought it might be useful to others as well:
Index: Hydrax/Hydrax.cpp
===================================================================
--- Hydrax/Hydrax.cpp (revision 1669)
+++ Hydrax/Hydrax.cpp (working copy)
@@ -657,6 +657,12 @@
setSunPosition(mSunPosition);
}
+ void Hydrax::setVisible(const bool visible)
+ {
+ if(mMesh)
+ mMesh->getSceneNode()->setVisible(visible);
+ }
+
void Hydrax::rotate(const Ogre::Quaternion &q)
{
if (!mCreated)
Index: Hydrax/Hydrax.h
===================================================================
--- Hydrax/Hydrax.h (revision 1669)
+++ Hydrax/Hydrax.h (working copy)
@@ -109,6 +109,11 @@
*/
void setPosition(const Ogre::Vector3 &Position);
+ /** shows or hides the mesh
+ @param visible mesh visibility
+ */
+ void setVisible(const bool visible);
+
/** Rotate water and planes
@param q const Ogre::Quaternion&
*/