Cleaned up warning generated when compiling osgocculusviewer
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14695 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
parent
6bddbdf074
commit
53198f2e9b
@ -26,7 +26,8 @@ class OSG_EXPORT Callback : public virtual Object {
|
|||||||
|
|
||||||
Callback(){}
|
Callback(){}
|
||||||
|
|
||||||
Callback(const Callback& cb,const CopyOp&):
|
Callback(const Callback& cb,const CopyOp& copyop):
|
||||||
|
osg::Object(cb, copyop),
|
||||||
_nestedCallback(cb._nestedCallback) {}
|
_nestedCallback(cb._nestedCallback) {}
|
||||||
|
|
||||||
META_Object(osg, Callback);
|
META_Object(osg, Callback);
|
||||||
@ -96,7 +97,10 @@ class OSG_EXPORT CallbackObject : public virtual osg::Callback
|
|||||||
public:
|
public:
|
||||||
CallbackObject() {}
|
CallbackObject() {}
|
||||||
CallbackObject(const std::string& name) { setName(name); }
|
CallbackObject(const std::string& name) { setName(name); }
|
||||||
CallbackObject(const CallbackObject& rhs, const osg::CopyOp copyop=osg::CopyOp::SHALLOW_COPY):osg::Callback(rhs,copyop) {}
|
CallbackObject(const CallbackObject& co, const osg::CopyOp copyop=osg::CopyOp::SHALLOW_COPY):
|
||||||
|
osg::Object(co, copyop),
|
||||||
|
osg::Callback(co,copyop) {}
|
||||||
|
|
||||||
META_Object(osg, CallbackObject);
|
META_Object(osg, CallbackObject);
|
||||||
|
|
||||||
virtual CallbackObject* asCallbackObject() { return this; }
|
virtual CallbackObject* asCallbackObject() { return this; }
|
||||||
|
@ -274,7 +274,7 @@ class DummyObject : public osg::Object
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DummyObject() {}
|
DummyObject() {}
|
||||||
DummyObject(const DummyObject& dummy, const osg::CopyOp& copyop) {}
|
DummyObject(const DummyObject&, const osg::CopyOp&) {}
|
||||||
META_Object(osg, DummyObject)
|
META_Object(osg, DummyObject)
|
||||||
protected:
|
protected:
|
||||||
virtual ~DummyObject() {}
|
virtual ~DummyObject() {}
|
||||||
|
@ -31,7 +31,7 @@ class Script : public osg::Object
|
|||||||
public:
|
public:
|
||||||
Script():_modifiedCount(0) {}
|
Script():_modifiedCount(0) {}
|
||||||
Script(const std::string& language, const std::string& str): _language(language), _script(str), _modifiedCount(0) {}
|
Script(const std::string& language, const std::string& str): _language(language), _script(str), _modifiedCount(0) {}
|
||||||
Script(const Script& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): _language(rhs._language), _script(rhs._script), _modifiedCount(0) {}
|
Script(const Script& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): osg::Object(rhs,copyop), _language(rhs._language), _script(rhs._script), _modifiedCount(0) {}
|
||||||
|
|
||||||
META_Object(osg, Script)
|
META_Object(osg, Script)
|
||||||
|
|
||||||
@ -59,7 +59,10 @@ class OSG_EXPORT ScriptNodeCallback : public osg::NodeCallback
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScriptNodeCallback(Script* script=0, const std::string& entryPoint="") : _script(script), _entryPoint(entryPoint) {}
|
ScriptNodeCallback(Script* script=0, const std::string& entryPoint="") : _script(script), _entryPoint(entryPoint) {}
|
||||||
ScriptNodeCallback(const ScriptNodeCallback& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): osg::NodeCallback(rhs,copyop), _script(rhs._script) {}
|
ScriptNodeCallback(const ScriptNodeCallback& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
|
||||||
|
osg::Object(rhs,copyop),
|
||||||
|
osg::Callback(rhs,copyop),
|
||||||
|
osg::NodeCallback(rhs,copyop), _script(rhs._script) {}
|
||||||
|
|
||||||
META_Object(osg, ScriptNodeCallback)
|
META_Object(osg, ScriptNodeCallback)
|
||||||
|
|
||||||
|
@ -839,15 +839,15 @@ public:
|
|||||||
Type getElementType() const { return _elementType; }
|
Type getElementType() const { return _elementType; }
|
||||||
unsigned int getElementSize() const { return _elementSize; }
|
unsigned int getElementSize() const { return _elementSize; }
|
||||||
|
|
||||||
virtual unsigned int size(const osg::Object& obj) const { return 0; }
|
virtual unsigned int size(const osg::Object& /*obj*/) const { return 0; }
|
||||||
virtual void resize(osg::Object& obj, unsigned int numElements) const {}
|
virtual void resize(osg::Object& /*obj*/, unsigned int /*numElements*/) const {}
|
||||||
virtual void reserve(osg::Object& obj, unsigned int numElements) const {}
|
virtual void reserve(osg::Object& /*obj*/, unsigned int /*numElements*/) const {}
|
||||||
virtual void clear(osg::Object& obj) const {}
|
virtual void clear(osg::Object& /*obj*/) const {}
|
||||||
virtual void addElement(osg::Object& obj, void* ptr) const {}
|
virtual void addElement(osg::Object& /*obj*/, void* /*ptr*/) const {}
|
||||||
virtual void insertElement(osg::Object& obj, unsigned int index, void* ptr) const {}
|
virtual void insertElement(osg::Object& /*obj*/, unsigned int /*index*/, void* /*ptr*/) const {}
|
||||||
virtual void setElement(osg::Object& obj, unsigned int index, void* ptr) const {}
|
virtual void setElement(osg::Object& /*obj*/, unsigned int /*index*/, void* /*ptr*/) const {}
|
||||||
virtual void* getElement(osg::Object& obj, unsigned int index) const { return 0; }
|
virtual void* getElement(osg::Object& /*obj*/, unsigned int /*index*/) const { return 0; }
|
||||||
virtual const void* getElement(const osg::Object& obj, unsigned int index) const { return 0; }
|
virtual const void* getElement(const osg::Object& /*obj*/, unsigned int /*index*/) const { return 0; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Type _elementType;
|
Type _elementType;
|
||||||
@ -1199,7 +1199,7 @@ public:
|
|||||||
virtual bool valid() const { return false; }
|
virtual bool valid() const { return false; }
|
||||||
virtual const void* getKey() const { return 0; }
|
virtual const void* getKey() const { return 0; }
|
||||||
virtual void* getElement() const { return 0; }
|
virtual void* getElement() const { return 0; }
|
||||||
virtual void setElement(void* ptr) const {}
|
virtual void setElement(void* /*ptr*/) const {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
BaseSerializer::Type _keyType;
|
BaseSerializer::Type _keyType;
|
||||||
@ -1224,14 +1224,14 @@ public:
|
|||||||
Type getElementType() const { return _elementType; }
|
Type getElementType() const { return _elementType; }
|
||||||
unsigned int getElementSize() const { return _elementSize; }
|
unsigned int getElementSize() const { return _elementSize; }
|
||||||
|
|
||||||
virtual void clear(osg::Object& obj) const {}
|
virtual void clear(osg::Object& /*obj*/) const {}
|
||||||
virtual void setElement(osg::Object& obj, void* ptrKey, void* ptrValue) const {}
|
virtual void setElement(osg::Object& /*obj*/, void* /*ptrKey*/, void* /*ptrValue*/) const {}
|
||||||
virtual void* getElement(osg::Object& obj, void* ptrKey) const { return 0; }
|
virtual void* getElement(osg::Object& /*obj*/, void* /*ptrKey*/) const { return 0; }
|
||||||
virtual const void* getElement(const osg::Object& obj, void* ptrKey) const { return 0; }
|
virtual const void* getElement(const osg::Object& /*obj*/, void* /*ptrKey*/) const { return 0; }
|
||||||
virtual unsigned int size(const osg::Object& obj) const { return 0; }
|
virtual unsigned int size(const osg::Object& /*obj*/) const { return 0; }
|
||||||
|
|
||||||
virtual MapIteratorObject* createIterator(osg::Object& obj) const { return 0; }
|
virtual MapIteratorObject* createIterator(osg::Object& /*obj*/) const { return 0; }
|
||||||
virtual MapIteratorObject* createReverseIterator(osg::Object& obj) const { return 0; }
|
virtual MapIteratorObject* createReverseIterator(osg::Object& /*obj*/) const { return 0; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Type _keyType;
|
Type _keyType;
|
||||||
|
@ -36,7 +36,8 @@ public:
|
|||||||
|
|
||||||
EventHandler() {}
|
EventHandler() {}
|
||||||
EventHandler(const EventHandler& eh,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
|
EventHandler(const EventHandler& eh,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
|
||||||
osg::Callback(eh,copyop),
|
osg::Object(eh, copyop),
|
||||||
|
osg::Callback(eh, copyop),
|
||||||
osg::NodeCallback(eh, copyop),
|
osg::NodeCallback(eh, copyop),
|
||||||
osg::Drawable::EventCallback(eh, copyop) {}
|
osg::Drawable::EventCallback(eh, copyop) {}
|
||||||
|
|
||||||
|
@ -50,16 +50,11 @@ class OSGGA_EXPORT GUIEventHandler : public EventHandler
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
#if 1
|
|
||||||
GUIEventHandler() {}
|
GUIEventHandler() {}
|
||||||
GUIEventHandler(const GUIEventHandler& eh,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
|
GUIEventHandler(const GUIEventHandler& eh,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
|
||||||
osg::Callback(eh, copyop), EventHandler(eh, copyop) {}
|
osg::Object(eh, copyop),
|
||||||
#else
|
osg::Callback(eh, copyop),
|
||||||
GUIEventHandler() : _ignoreHandledEventsMask(GUIEventAdapter::NONE) {}
|
EventHandler(eh, copyop) {}
|
||||||
GUIEventHandler(const GUIEventHandler& eh,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
|
|
||||||
EventHandler(eh, copyop)
|
|
||||||
_ignoreHandledEventsMask(eh._ignoreHandledEventsMask) {}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
META_Object(osgGA,GUIEventHandler);
|
META_Object(osgGA,GUIEventHandler);
|
||||||
|
|
||||||
@ -69,59 +64,9 @@ public:
|
|||||||
/** Handle events, return true if handled, false otherwise. */
|
/** Handle events, return true if handled, false otherwise. */
|
||||||
virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& aa, osg::Object*, osg::NodeVisitor*) { return handle(ea,aa); }
|
virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& aa, osg::Object*, osg::NodeVisitor*) { return handle(ea,aa); }
|
||||||
|
|
||||||
#if 0
|
|
||||||
/** Convenience method that only passes on to the handle(,,,) method events that either haven't been
|
|
||||||
* handled yet, or have been handled but haven't be set to be ignored by the IgnoreHandledEventsMask.
|
|
||||||
* Note, this method is an inline method, and not appropriate for users to override, override the handle(,,,)
|
|
||||||
* method instead.*/
|
|
||||||
inline bool handleWithCheckAgainstIgnoreHandledEventsMask(const GUIEventAdapter& ea,GUIActionAdapter& aa, osg::Object* object, osg::NodeVisitor* nv)
|
|
||||||
{
|
|
||||||
if (!ea.getHandled() ||
|
|
||||||
(ea.getEventType() & _ignoreHandledEventsMask)==0)
|
|
||||||
{
|
|
||||||
bool handled = handle(ea,aa,object,nv);
|
|
||||||
if (handled) ea.setHandled(true);
|
|
||||||
return handled;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
/** Deprecated, Handle events, return true if handled, false otherwise. */
|
/** Deprecated, Handle events, return true if handled, false otherwise. */
|
||||||
virtual bool handle(const GUIEventAdapter&,GUIActionAdapter&) { return false; }
|
virtual bool handle(const GUIEventAdapter&,GUIActionAdapter&) { return false; }
|
||||||
|
|
||||||
#if 0
|
|
||||||
/** Convenience method that only passes on to the handle(,) method events that either haven't been
|
|
||||||
* handled yet, or have been handled but haven't be set to be ignored by the IgnoreHandledEventsMask.
|
|
||||||
* Note, this method is an inline method, and not appropriate for users to override, override the handle(,)
|
|
||||||
* method instead.*/
|
|
||||||
inline bool handleWithCheckAgainstIgnoreHandledEventsMask(const GUIEventAdapter& ea,GUIActionAdapter& aa)
|
|
||||||
{
|
|
||||||
if (!ea.getHandled() ||
|
|
||||||
(ea.getEventType() & _ignoreHandledEventsMask)==0)
|
|
||||||
{
|
|
||||||
bool handled = handle(ea,aa);
|
|
||||||
if (handled) ea.setHandled(true);
|
|
||||||
return handled;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Set a mask of osgGA::GUIEeventAdapter::Event to be ignored if marked as handled */
|
|
||||||
void setIgnoreHandledEventsMask(unsigned int mask) { _ignoreHandledEventsMask = mask; }
|
|
||||||
|
|
||||||
/** Get the event mask of the osgGA::GUIEeventAdapter::Event to be ignored if marked as handled */
|
|
||||||
unsigned int getIgnoreHandledEventsMask() const { return _ignoreHandledEventsMask; };
|
|
||||||
|
|
||||||
protected:
|
|
||||||
unsigned int _ignoreHandledEventsMask;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~GUIEventHandler();
|
virtual ~GUIEventHandler();
|
||||||
|
|
||||||
|
@ -528,7 +528,7 @@ protected:
|
|||||||
InteractiveImageHandler() {}
|
InteractiveImageHandler() {}
|
||||||
|
|
||||||
InteractiveImageHandler(const InteractiveImageHandler&,const osg::CopyOp& = osg::CopyOp::SHALLOW_COPY):
|
InteractiveImageHandler(const InteractiveImageHandler&,const osg::CopyOp& = osg::CopyOp::SHALLOW_COPY):
|
||||||
osg::Callback(), osgGA::GUIEventHandler(), osg::Drawable::CullCallback(), _fullscreen(false) {}
|
osg::Object(), osg::Callback(), osgGA::GUIEventHandler(), osg::Drawable::CullCallback(), _fullscreen(false) {}
|
||||||
|
|
||||||
bool mousePosition(osgViewer::View* view, osg::NodeVisitor* nv, const osgGA::GUIEventAdapter& ea, int& x, int &y) const;
|
bool mousePosition(osgViewer::View* view, osg::NodeVisitor* nv, const osgGA::GUIEventAdapter& ea, int& x, int &y) const;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user