Commit 862c51ed authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[FIX] - removed several compiler warnings

[DOC][STYLE]
parent a9d7024f
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#include "WGEManagedRenderNodeCL.h"
//---------------------------------------------------------------------------------------------------------------------
WGEManagedRenderNodeCL::WGEManagedRenderNodeCL( boost::shared_ptr< WBoolFlag > active, bool deactivated ):
WGERenderNodeCL( deactivated ),
m_flag( active )
{}
//---------------------------------------------------------------------------------------------------------------------
WGEManagedRenderNodeCL::WGEManagedRenderNodeCL( const WGEManagedRenderNodeCL& node, const osg::CopyOp& copyop ):
WGERenderNodeCL( node, copyop ),
m_flag( node.m_flag )
{}
//---------------------------------------------------------------------------------------------------------------------
WGEManagedRenderNodeCL::~WGEManagedRenderNodeCL()
{}
//---------------------------------------------------------------------------------------------------------------------
osg::Object* WGEManagedRenderNodeCL::cloneType() const
{
return new WGEManagedRenderNodeCL( *this );
}
//---------------------------------------------------------------------------------------------------------------------
osg::Object* WGEManagedRenderNodeCL::clone( const osg::CopyOp& copyop ) const
{
return new WGEManagedRenderNodeCL( *this, copyop );
}
//---------------------------------------------------------------------------------------------------------------------
bool WGEManagedRenderNodeCL::isSameKindAs( const osg::Object* object ) const
{
return ( dynamic_cast< const WGEManagedRenderNodeCL* >( object ) != 0 );
}
//---------------------------------------------------------------------------------------------------------------------
const char* WGEManagedRenderNodeCL::className() const
{
return "WGEManagedRenderNodeCL";
}
//---------------------------------------------------------------------------------------------------------------------
void WGEManagedRenderNodeCL::accept( osg::NodeVisitor& nv )
{
if ( m_flag->get() )
{
WGERenderNodeCL::accept( nv );
}
}
//---------------------------------------------------------------------------------------------------------------------
\ No newline at end of file
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#include "WGEManagedRenderNodeCL.h"
WGEManagedRenderNodeCL::WGEManagedRenderNodeCL( boost::shared_ptr< WBoolFlag > active, bool deactivated ):
WGERenderNodeCL( deactivated ),
m_flag( active )
{
// initialize
}
WGEManagedRenderNodeCL::WGEManagedRenderNodeCL( const WGEManagedRenderNodeCL& node, const osg::CopyOp& copyop ):
WGERenderNodeCL( node, copyop ),
m_flag( node.m_flag )
{
// initialize
}
WGEManagedRenderNodeCL::~WGEManagedRenderNodeCL()
{
// initialize
}
osg::Object* WGEManagedRenderNodeCL::cloneType() const
{
return new WGEManagedRenderNodeCL( *this );
}
osg::Object* WGEManagedRenderNodeCL::clone( const osg::CopyOp& copyop ) const
{
return new WGEManagedRenderNodeCL( *this, copyop );
}
bool WGEManagedRenderNodeCL::isSameKindAs( const osg::Object* object ) const
{
return ( dynamic_cast< const WGEManagedRenderNodeCL* >( object ) != 0 );
}
const char* WGEManagedRenderNodeCL::className() const
{
return "WGEManagedRenderNodeCL";
}
void WGEManagedRenderNodeCL::accept( osg::NodeVisitor& nv ) // NOLINT // non-const reference
{
if ( m_flag->get() )
{
WGERenderNodeCL::accept( nv );
}
}
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#ifndef WGEMANAGEDRENDERNODECL_H
#define WGEMANAGEDRENDERNODECL_H
//---------------------------------------------------------------------------------------------------------------------
#include <boost/shared_ptr.hpp>
#include "../../common/WFlag.h"
#include "../WExportWGE.h"
#include "WGERenderNodeCL.h"
//---------------------------------------------------------------------------------------------------------------------
/**
* WGEManagedRenderNodeCL extends WGERenderNodeCL by a flag to switch the node on and off.
* This switch is independent of WGERenderNodeCL's activation state.
*
* @ingroup ge
*/
class WGE_EXPORT WGEManagedRenderNodeCL: public WGERenderNodeCL
{
public:
/**
* Constructor.
*
* @param active The flag denoting the node to be online (true) or offline (false).
* @param deactivated Set whether the node should be set to deactivated state.
*/
explicit WGEManagedRenderNodeCL( boost::shared_ptr< WBoolFlag > active, bool deactivated = false );
/**
* Copy construcor.
*
* @param node The node to copy.
* @param copyop The optional OSG copy operator.
*/
WGEManagedRenderNodeCL( const WGEManagedRenderNodeCL& node, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY );
/**
* Overrides osg::Object::cloneType().
*
* @return The cloned node.
*/
virtual osg::Object* cloneType() const;
/**
* Overrides osg::Object::clone().
*
* @param copyop The optional OSG copy operator.
*
* @return The cloned node.
*/
virtual osg::Object* clone( const osg::CopyOp& copyop ) const;
/**
* Overrides osg::Object::isSameKindAs().
*
* @param object The object to compare with.
*
* @return States whether this node and object are of same type.
*/
virtual bool isSameKindAs( const osg::Object* object ) const;
/**
* Overrides osg::Object::className().
*
* @return Gives the node's class name.
*/
virtual const char* className() const;
/**
* Overrides osg::Node::accept().
*
* @param nv The traversal's NodeVisitor.
*/
virtual void accept( osg::NodeVisitor& nv );
protected:
/**
* Destructor.
*/
virtual ~WGEManagedRenderNodeCL();
private:
/**
* The flag to control the node's state.
*/
boost::shared_ptr< WBoolFlag > m_flag;
};
//---------------------------------------------------------------------------------------------------------------------
#endif // WGEMANAGEDRENDERNODECL_H
\ No newline at end of file
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#ifndef WGEMANAGEDRENDERNODECL_H
#define WGEMANAGEDRENDERNODECL_H
#include <boost/shared_ptr.hpp>
#include "../../common/WFlag.h"
#include "../WExportWGE.h"
#include "WGERenderNodeCL.h"
/**
* WGEManagedRenderNodeCL extends WGERenderNodeCL by a flag to switch the node on and off.
* This switch is independent of WGERenderNodeCL's activation state.
*
* \ingroup ge
*/
class WGE_EXPORT WGEManagedRenderNodeCL: public WGERenderNodeCL
{
public:
/**
* Constructor.
*
* \param active The flag denoting the node to be online (true) or offline (false).
* \param deactivated Set whether the node should be set to deactivated state.
*/
explicit WGEManagedRenderNodeCL( boost::shared_ptr< WBoolFlag > active, bool deactivated = false );
/**
* Copy construcor.
*
* \param node The node to copy.
* \param copyop The optional OSG copy operator.
*/
WGEManagedRenderNodeCL( const WGEManagedRenderNodeCL& node, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY );
/**
* Overrides osg::Object::cloneType().
*
* \return The cloned node.
*/
virtual osg::Object* cloneType() const;
/**
* Overrides osg::Object::clone().
*
* \param copyop The optional OSG copy operator.
*
* \return The cloned node.
*/
virtual osg::Object* clone( const osg::CopyOp& copyop ) const;
/**
* Overrides osg::Object::isSameKindAs().
*
* \param object The object to compare with.
*
* \return States whether this node and object are of same type.
*/
virtual bool isSameKindAs( const osg::Object* object ) const;
/**
* Overrides osg::Object::className().
*
* \return Gives the node's class name.
*/
virtual const char* className() const;
/**
* Overrides osg::Node::accept().
*
* \param nv The traversal's NodeVisitor.
*/
virtual void accept( osg::NodeVisitor& nv ); // NOLINT - non const reference. Derived from OSG. We can't change signature.
protected:
/**
* Destructor.
*/
virtual ~WGEManagedRenderNodeCL();
private:
/**
* The flag to control the node's state.
*/
boost::shared_ptr< WBoolFlag > m_flag;
};
#endif // WGEMANAGEDRENDERNODECL_H
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV-Leipzig and CNCF-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#ifndef WMTENSORGLYPHS_H
#define WMTENSORGLYPHS_H
//---------------------------------------------------------------------------------------------------------------------
#include <boost/shared_ptr.hpp>
#include "../../common/WCondition.h"
#include "../../common/WItemSelection.h"
#include "../../common/WPropertyTypes.h"
#include "../../dataHandler/WDataSetSingle.h"
#include "../../kernel/WModule.h"
#include "../../kernel/WModuleInputData.h"
//---------------------------------------------------------------------------------------------------------------------
/**
* Module for rendering of high order tensor glyphs.
*
* @ingroup modules
*/
class WMTensorGlyphs: public WModule
{
public:
/**
* Default constructor.
*/
WMTensorGlyphs();
/**
* Destructor.
*/
virtual ~WMTensorGlyphs();
/**
* Overrides WModule::getName().
*
* @return The module's name.
*/
virtual const std::string getName() const;
/**
* Overrides WModule::getDescription().
*
* @return The module's description.
*/
virtual const std::string getDescription() const;
/**
* Overrides WModule::factory().
*
* @return An instance of this module.
*/
virtual boost::shared_ptr< WModule > factory() const;
/**
* Overrides WModule::getXPMIcon().
*
* @return The module's icon.
*/
virtual const char** getXPMIcon() const;
protected:
/**
* Overrides WModule::moduleMain().
*/
virtual void moduleMain();
/**
* Overrides WModule::connectors().
*/
virtual void connectors();
/**
* Overrides WModule::properties().
*/
virtual void properties();
private:
/**
* A condition used to notify about changes in several properties.
*/
boost::shared_ptr< WCondition > m_changed;
/**
* The input dataset containing the tensor data.
*/
boost::shared_ptr< WModuleInputData< WDataSetSingle> > m_input;
/**
* List containing the coloring modes.
*/
boost::shared_ptr< WItemSelection > m_coloringList;
/**
* The coloring mode.
*/
WPropSelection m_coloring;
/**
* Slice positions.
*/
WPropInt m_slicePosition[ 3 ];
/**
* Slice visibility.
*/
WPropBool m_sliceVisibility[ 3 ];
};
//---------------------------------------------------------------------------------------------------------------------
#endif // WMTENSORGLYPHS_H
\ No newline at end of file
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV-Leipzig and CNCF-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#ifndef WMTENSORGLYPHS_H
#define WMTENSORGLYPHS_H
#include <string>
#include <boost/shared_ptr.hpp>
#include "../../common/WCondition.h"
#include "../../common/WItemSelection.h"
#include "../../common/WPropertyTypes.h"
#include "../../dataHandler/WDataSetSingle.h"
#include "../../kernel/WModule.h"
#include "../../kernel/WModuleInputData.h"
/**
* Module for rendering of high order tensor glyphs.
*
* \ingroup modules
*/
class WMTensorGlyphs: public WModule
{
public:
/**
* Default constructor.
*/
WMTensorGlyphs();
/**
* Destructor.
*/
virtual ~WMTensorGlyphs();
/**
* Overrides WModule::getName().
*
* \return The module's name.
*/
virtual const std::string getName() const;
/**
* Overrides WModule::getDescription().
*
* \return The module's description.
*/