From David Callu, warning fixes and removal of spaces at end of lines.
This commit is contained in:
parent
d82768417d
commit
097aedf23c
@ -39,6 +39,10 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef OT_UNUSED
|
||||
#define OT_UNUSED(var) (void) var
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -696,9 +696,9 @@ class OSG_EXPORT BufferData : public Object
|
||||
|
||||
unsigned int getNumClients() const { return _numClients; }
|
||||
|
||||
void addClient(osg::Object *client) { ++_numClients; }
|
||||
void addClient(osg::Object * /*client*/) { ++_numClients; }
|
||||
|
||||
void removeClient(osg::Object *client) { --_numClients; }
|
||||
void removeClient(osg::Object */*client*/) { --_numClients; }
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -60,6 +60,12 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef OSG_UNUSED
|
||||
#define OSG_UNUSED(var) (void) var
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
\namespace osg
|
||||
|
@ -92,22 +92,22 @@ class OSG_EXPORT ImageStream : public Image
|
||||
|
||||
virtual void setVolume(float) {}
|
||||
virtual float getVolume() const { return 0.0f; }
|
||||
|
||||
|
||||
/// set the balance of the audio: -1 = left, 0 = center, 1 = right
|
||||
virtual float getAudioBalance() { return 0.0f; }
|
||||
virtual void setAudioBalance(float b) {}
|
||||
virtual void setAudioBalance(float /*b*/) {}
|
||||
|
||||
typedef std::vector< osg::ref_ptr<osg::AudioStream> > AudioStreams;
|
||||
void setAudioStreams(const AudioStreams& asl) { _audioStreams = asl; }
|
||||
AudioStreams& getAudioStreams() { return _audioStreams; }
|
||||
const AudioStreams& getAudioStreams() const { return _audioStreams; }
|
||||
|
||||
|
||||
/** create a suitable texture for this imagestream, return NULL, if not supported
|
||||
* implement this method in subclasses to use special technologies like CoreVideo
|
||||
* or similar.
|
||||
*/
|
||||
virtual osg::Texture* createSuitableTexture() { return NULL; }
|
||||
|
||||
|
||||
protected:
|
||||
virtual void applyLoopingMode() {}
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B
|
||||
#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C
|
||||
#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D
|
||||
#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E
|
||||
#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E
|
||||
#endif
|
||||
|
||||
namespace osg {
|
||||
@ -87,15 +87,15 @@ class OSG_EXPORT TextureBuffer : public Texture
|
||||
virtual int getTextureWidth() const { return _textureWidth; }
|
||||
virtual int getTextureHeight() const { return 1; }
|
||||
virtual int getTextureDepth() const { return 1; }
|
||||
|
||||
|
||||
inline void setUsageHint( GLenum usageHint ) { _usageHint=usageHint; }
|
||||
inline GLenum getUsageHint() const { return _usageHint; }
|
||||
|
||||
virtual void allocateMipmap(State& state) const {};
|
||||
virtual void allocateMipmap(State& /*state*/) const {};
|
||||
|
||||
/** Bind the texture buffer.*/
|
||||
virtual void apply(State& state) const;
|
||||
|
||||
|
||||
/** Bind buffer to different target. */
|
||||
void bindBufferAs(unsigned int contextID, GLenum target);
|
||||
void unbindBufferAs(unsigned int contextID, GLenum target);
|
||||
@ -113,11 +113,11 @@ class OSG_EXPORT TextureBuffer : public Texture
|
||||
|
||||
typedef buffered_value<unsigned int> ImageModifiedCount;
|
||||
mutable ImageModifiedCount _modifiedCount;
|
||||
|
||||
|
||||
class TextureBufferObject : public osg::Referenced
|
||||
{
|
||||
public:
|
||||
TextureBufferObject(unsigned int contextID, GLenum usageHint) :
|
||||
TextureBufferObject(unsigned int contextID, GLenum usageHint) :
|
||||
_id(0),
|
||||
_usageHint(usageHint)
|
||||
{
|
||||
@ -126,7 +126,7 @@ class OSG_EXPORT TextureBuffer : public Texture
|
||||
|
||||
void bindBuffer(GLenum target);
|
||||
void unbindBuffer(GLenum target);
|
||||
|
||||
|
||||
void texBuffer(GLenum internalFormat);
|
||||
void bufferData( osg::Image* image );
|
||||
void bufferSubData( osg::Image* image );
|
||||
@ -136,8 +136,8 @@ class OSG_EXPORT TextureBuffer : public Texture
|
||||
GLenum _usageHint;
|
||||
osg::GLBufferObject::Extensions* _extensions;
|
||||
};
|
||||
|
||||
typedef osg::buffered_object<osg::ref_ptr<TextureBufferObject> > TextureBufferObjectList;
|
||||
|
||||
typedef osg::buffered_object<osg::ref_ptr<TextureBufferObject> > TextureBufferObjectList;
|
||||
mutable TextureBufferObjectList _textureBufferObjects;
|
||||
};
|
||||
|
||||
|
@ -44,55 +44,55 @@ class ValueObject : public Object
|
||||
class GetValueVisitor
|
||||
{
|
||||
public:
|
||||
virtual void apply(bool value) {}
|
||||
virtual void apply(char value) {}
|
||||
virtual void apply(unsigned char value) {}
|
||||
virtual void apply(short value) {}
|
||||
virtual void apply(unsigned short value) {}
|
||||
virtual void apply(int value) {}
|
||||
virtual void apply(unsigned int value) {}
|
||||
virtual void apply(float value) {}
|
||||
virtual void apply(double value) {}
|
||||
virtual void apply(const std::string& value) {}
|
||||
virtual void apply(const osg::Vec2f& value) {}
|
||||
virtual void apply(const osg::Vec3f& value) {}
|
||||
virtual void apply(const osg::Vec4f& value) {}
|
||||
virtual void apply(const osg::Vec2d& value) {}
|
||||
virtual void apply(const osg::Vec3d& value) {}
|
||||
virtual void apply(const osg::Vec4d& value) {}
|
||||
virtual void apply(const osg::Quat& value) {}
|
||||
virtual void apply(const osg::Plane& value) {}
|
||||
virtual void apply(const osg::Matrixf& value) {}
|
||||
virtual void apply(const osg::Matrixd& value) {}
|
||||
virtual void apply(bool /*value*/) {}
|
||||
virtual void apply(char /*value*/) {}
|
||||
virtual void apply(unsigned char /*value*/) {}
|
||||
virtual void apply(short /*value*/) {}
|
||||
virtual void apply(unsigned short /*value*/) {}
|
||||
virtual void apply(int /*value*/) {}
|
||||
virtual void apply(unsigned int /*value*/) {}
|
||||
virtual void apply(float /*value*/) {}
|
||||
virtual void apply(double /*value*/) {}
|
||||
virtual void apply(const std::string& /*value*/) {}
|
||||
virtual void apply(const osg::Vec2f& /*value*/) {}
|
||||
virtual void apply(const osg::Vec3f& /*value*/) {}
|
||||
virtual void apply(const osg::Vec4f& /*value*/) {}
|
||||
virtual void apply(const osg::Vec2d& /*value*/) {}
|
||||
virtual void apply(const osg::Vec3d& /*value*/) {}
|
||||
virtual void apply(const osg::Vec4d& /*value*/) {}
|
||||
virtual void apply(const osg::Quat& /*value*/) {}
|
||||
virtual void apply(const osg::Plane& /*value*/) {}
|
||||
virtual void apply(const osg::Matrixf& /*value*/) {}
|
||||
virtual void apply(const osg::Matrixd& /*value*/) {}
|
||||
};
|
||||
|
||||
class SetValueVisitor
|
||||
{
|
||||
public:
|
||||
virtual void apply(bool& value) {}
|
||||
virtual void apply(char& value) {}
|
||||
virtual void apply(unsigned char& value) {}
|
||||
virtual void apply(short& value) {}
|
||||
virtual void apply(unsigned short& value) {}
|
||||
virtual void apply(int& value) {}
|
||||
virtual void apply(unsigned int& value) {}
|
||||
virtual void apply(float& value) {}
|
||||
virtual void apply(double& value) {}
|
||||
virtual void apply(std::string& value) {}
|
||||
virtual void apply(osg::Vec2f& value) {}
|
||||
virtual void apply(osg::Vec3f& value) {}
|
||||
virtual void apply(osg::Vec4f& value) {}
|
||||
virtual void apply(osg::Vec2d& value) {}
|
||||
virtual void apply(osg::Vec3d& value) {}
|
||||
virtual void apply(osg::Vec4d& value) {}
|
||||
virtual void apply(osg::Quat& value) {}
|
||||
virtual void apply(osg::Plane& value) {}
|
||||
virtual void apply(osg::Matrixf& value) {}
|
||||
virtual void apply(osg::Matrixd& value) {}
|
||||
virtual void apply(bool& /*value*/) {}
|
||||
virtual void apply(char& /*value*/) {}
|
||||
virtual void apply(unsigned char& /*value*/) {}
|
||||
virtual void apply(short& /*value*/) {}
|
||||
virtual void apply(unsigned short& /*value*/) {}
|
||||
virtual void apply(int& /*value*/) {}
|
||||
virtual void apply(unsigned int& /*value*/) {}
|
||||
virtual void apply(float& /*value*/) {}
|
||||
virtual void apply(double& /*value*/) {}
|
||||
virtual void apply(std::string& /*value*/) {}
|
||||
virtual void apply(osg::Vec2f& /*value*/) {}
|
||||
virtual void apply(osg::Vec3f& /*value*/) {}
|
||||
virtual void apply(osg::Vec4f& /*value*/) {}
|
||||
virtual void apply(osg::Vec2d& /*value*/) {}
|
||||
virtual void apply(osg::Vec3d& /*value*/) {}
|
||||
virtual void apply(osg::Vec4d& /*value*/) {}
|
||||
virtual void apply(osg::Quat& /*value*/) {}
|
||||
virtual void apply(osg::Plane& /*value*/) {}
|
||||
virtual void apply(osg::Matrixf& /*value*/) {}
|
||||
virtual void apply(osg::Matrixd& /*value*/) {}
|
||||
};
|
||||
|
||||
virtual bool get(GetValueVisitor& gvv) const { return false; }
|
||||
virtual bool set(SetValueVisitor& gvv) { return false; }
|
||||
virtual bool get(GetValueVisitor& /*gvv*/) const { return false; }
|
||||
virtual bool set(SetValueVisitor& /*gvv*/) { return false; }
|
||||
protected:
|
||||
virtual ~ValueObject() {}
|
||||
};
|
||||
|
@ -46,7 +46,7 @@ namespace osgAnimation
|
||||
|
||||
META_Object(osgAnimation,Callback);
|
||||
|
||||
virtual void operator()(Action* action, osgAnimation::ActionVisitor* nv) {}
|
||||
virtual void operator()(Action* /*action*/, osgAnimation::ActionVisitor* /*nv*/) {}
|
||||
|
||||
Callback* getNestedCallback() { return _nestedCallback.get(); }
|
||||
void addNestedCallback(Callback* callback)
|
||||
@ -119,7 +119,7 @@ namespace osgAnimation
|
||||
// get the number of loop, the frame relative to loop.
|
||||
// return true if in range, and false if out of range.
|
||||
bool evaluateFrame(unsigned int frame, unsigned int& resultframe, unsigned int& nbloop );
|
||||
virtual void traverse(ActionVisitor& visitor) {}
|
||||
virtual void traverse(ActionVisitor& /*visitor*/) {}
|
||||
//virtual void evaluate(unsigned int frame);
|
||||
|
||||
protected:
|
||||
|
@ -42,7 +42,7 @@ namespace osgAnimation
|
||||
META_Object(osgAnimation, AnimationUpdateCallback<T>);
|
||||
|
||||
const std::string& getName() const { return T::getName(); }
|
||||
bool link(Channel* channel) { return 0; }
|
||||
bool link(Channel* /*channel*/) { return 0; }
|
||||
int link(Animation* animation)
|
||||
{
|
||||
if (T::getName().empty())
|
||||
|
@ -40,7 +40,7 @@ namespace osgAnimation
|
||||
public:
|
||||
MorphTarget(osg::Geometry* geom, float w = 1.0) : _geom(geom), _weight(w) {}
|
||||
void setWeight(float weight) { _weight = weight; }
|
||||
const float getWeight() const { return _weight; }
|
||||
float getWeight() const { return _weight; }
|
||||
osg::Geometry* getGeometry() { return _geom.get(); }
|
||||
const osg::Geometry* getGeometry() const { return _geom.get(); }
|
||||
void setGeometry(osg::Geometry* geom) { _geom = geom; }
|
||||
|
@ -27,7 +27,7 @@ class OSGDB_EXPORT FileList : public osg::Object
|
||||
public:
|
||||
|
||||
FileList();
|
||||
FileList(const FileList& fileList, const osg::CopyOp=osg::CopyOp::SHALLOW_COPY);
|
||||
FileList(const FileList& fileList, const osg::CopyOp & copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
META_Object(osgDB, FileList)
|
||||
|
||||
@ -58,7 +58,7 @@ class OSGDB_EXPORT DatabaseRevision : public osg::Object
|
||||
public:
|
||||
|
||||
DatabaseRevision();
|
||||
DatabaseRevision(const DatabaseRevision& revision, const osg::CopyOp=osg::CopyOp::SHALLOW_COPY);
|
||||
DatabaseRevision(const DatabaseRevision& revision, const osg::CopyOp & copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
META_Object(osgDB, DatabaseRevision)
|
||||
|
||||
@ -99,7 +99,7 @@ class OSGDB_EXPORT DatabaseRevisions : public osg::Object
|
||||
public:
|
||||
|
||||
DatabaseRevisions();
|
||||
DatabaseRevisions(const DatabaseRevisions& revisions, const osg::CopyOp=osg::CopyOp::SHALLOW_COPY);
|
||||
DatabaseRevisions(const DatabaseRevisions& revisions, const osg::CopyOp & copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
META_Object(osgDB, DatabaseRevisions)
|
||||
|
||||
|
@ -31,7 +31,7 @@ struct PointerData : public osg::Referenced
|
||||
y(0.0f),
|
||||
yMin(-1.0f),
|
||||
yMax(1.0f) {}
|
||||
|
||||
|
||||
PointerData(osg::Object* obj, float in_x, float in_xMin, float in_xMax, float in_y, float in_yMin, float in_yMax):
|
||||
object(obj),
|
||||
x(in_x),
|
||||
@ -40,8 +40,9 @@ struct PointerData : public osg::Referenced
|
||||
y(in_y),
|
||||
yMin(in_yMin),
|
||||
yMax(in_yMax) {}
|
||||
|
||||
|
||||
PointerData(const PointerData& pd):
|
||||
osg::Referenced(),
|
||||
object(pd.object),
|
||||
x(pd.x),
|
||||
xMin(pd.xMin),
|
||||
@ -49,11 +50,11 @@ struct PointerData : public osg::Referenced
|
||||
y(pd.y),
|
||||
yMin(pd.yMin),
|
||||
yMax(pd.yMax) {}
|
||||
|
||||
|
||||
PointerData& operator = (const PointerData& pd)
|
||||
{
|
||||
if (&pd==this) return *this;
|
||||
|
||||
|
||||
object = pd.object;
|
||||
x = pd.x;
|
||||
xMin = pd.xMin;
|
||||
@ -61,19 +62,19 @@ struct PointerData : public osg::Referenced
|
||||
y = pd.y;
|
||||
yMin = pd.yMin;
|
||||
yMax = pd.yMax;
|
||||
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
osg::observer_ptr<osg::Object> object;
|
||||
float x, xMin, xMax;
|
||||
float y, yMin, yMax;
|
||||
|
||||
|
||||
float getXnormalized() const { return (x-xMin)/(xMax-xMin)*2.0f-1.0f; }
|
||||
float getYnormalized() const { return (y-yMin)/(yMax-yMin)*2.0f-1.0f; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
/** Event class for storing Keyboard, mouse and window events.
|
||||
*/
|
||||
class OSGGA_EXPORT GUIEventAdapter : public osg::Object
|
||||
@ -383,7 +384,7 @@ public:
|
||||
|
||||
class TouchData : public osg::Object {
|
||||
public:
|
||||
|
||||
|
||||
struct TouchPoint {
|
||||
unsigned int id;
|
||||
TouchPhase phase;
|
||||
@ -407,14 +408,14 @@ public:
|
||||
typedef TouchSet::const_iterator const_iterator;
|
||||
|
||||
TouchData() : osg::Object() {}
|
||||
|
||||
|
||||
TouchData(const TouchData& td, const osg::CopyOp& copyop):
|
||||
osg::Object(td,copyop),
|
||||
_touches(td._touches) {}
|
||||
|
||||
|
||||
|
||||
META_Object(osgGA, TouchData);
|
||||
|
||||
|
||||
|
||||
unsigned int getNumTouchPoints() const { return static_cast<unsigned int>(_touches.size()); }
|
||||
|
||||
@ -533,7 +534,7 @@ public:
|
||||
|
||||
/** set mouse minimum x. */
|
||||
void setXmin(float v) { _Xmin = v; }
|
||||
|
||||
|
||||
/** get mouse minimum x. */
|
||||
float getXmin() const { return _Xmin; }
|
||||
|
||||
@ -570,7 +571,7 @@ public:
|
||||
#if 1
|
||||
inline float getXnormalized() const
|
||||
{
|
||||
return _pointerDataList.size()>=1 ?
|
||||
return _pointerDataList.size()>=1 ?
|
||||
_pointerDataList[_pointerDataList.size()-1]->getXnormalized():
|
||||
2.0f*(getX()-getXmin())/(getXmax()-getXmin())-1.0f;
|
||||
}
|
||||
@ -685,7 +686,7 @@ public:
|
||||
TouchData* getTouchData() const { return _touchData.get(); }
|
||||
bool isMultiTouchEvent() const { return (_touchData.valid()); }
|
||||
|
||||
|
||||
|
||||
typedef std::vector< osg::ref_ptr<PointerData> > PointerDataList;
|
||||
void setPointerDataList(const PointerDataList& pdl) { _pointerDataList = pdl; }
|
||||
PointerDataList& getPointerDataList() { return _pointerDataList; }
|
||||
@ -698,7 +699,7 @@ public:
|
||||
PointerData* getPointerData(osg::Object* obj) { for(unsigned int i=0;i<_pointerDataList.size(); ++i) { if (_pointerDataList[i]->object==obj) return _pointerDataList[i].get(); } return 0; }
|
||||
const PointerData* getPointerData(osg::Object* obj) const { for(unsigned int i=0;i<_pointerDataList.size(); ++i) { if (_pointerDataList[i]->object==obj) return _pointerDataList[i].get(); } return 0; }
|
||||
void addPointerData(PointerData* pd) { _pointerDataList.push_back(pd); }
|
||||
|
||||
|
||||
void copyPointerDataFrom(const osgGA::GUIEventAdapter& sourceEvent);
|
||||
|
||||
protected:
|
||||
|
@ -38,7 +38,7 @@ class DraggerCallback : virtual public osg::Object
|
||||
DraggerCallback():
|
||||
osg::Object(true) {}
|
||||
|
||||
DraggerCallback(const DraggerCallback&, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY):
|
||||
DraggerCallback(const DraggerCallback&, const osg::CopyOp& /*copyop*/ = osg::CopyOp::SHALLOW_COPY):
|
||||
osg::Object(true) {}
|
||||
|
||||
META_Object(osgManipulator, DraggerCallback);
|
||||
|
@ -120,14 +120,14 @@ protected:
|
||||
virtual ~DomainOperator() {}
|
||||
DomainOperator& operator=( const DomainOperator& ) { return *this; }
|
||||
|
||||
virtual void handlePoint( const Domain& domain, Particle* P, double dt ) { ignore("Point"); }
|
||||
virtual void handleLineSegment( const Domain& domain, Particle* P, double dt ) { ignore("LineSegment"); }
|
||||
virtual void handleTriangle( const Domain& domain, Particle* P, double dt ) { ignore("Triangle"); }
|
||||
virtual void handleRectangle( const Domain& domain, Particle* P, double dt ) { ignore("Rectangle"); }
|
||||
virtual void handlePlane( const Domain& domain, Particle* P, double dt ) { ignore("Plane"); }
|
||||
virtual void handleSphere( const Domain& domain, Particle* P, double dt ) { ignore("Sphere"); }
|
||||
virtual void handleBox( const Domain& domain, Particle* P, double dt ) { ignore("Box"); }
|
||||
virtual void handleDisk( const Domain& domain, Particle* P, double dt ) { ignore("Disk"); }
|
||||
virtual void handlePoint( const Domain& /*domain*/, Particle* /*P*/, double /*dt*/ ) { ignore("Point"); }
|
||||
virtual void handleLineSegment( const Domain& /*domain*/, Particle* /*P*/, double /*dt*/ ) { ignore("LineSegment"); }
|
||||
virtual void handleTriangle( const Domain& /*domain*/, Particle* /*P*/, double /*dt*/ ) { ignore("Triangle"); }
|
||||
virtual void handleRectangle( const Domain& /*domain*/, Particle* /*P*/, double /*dt*/ ) { ignore("Rectangle"); }
|
||||
virtual void handlePlane( const Domain& /*domain*/, Particle* /*P*/, double /*dt*/ ) { ignore("Plane"); }
|
||||
virtual void handleSphere( const Domain& /*domain*/, Particle* /*P*/, double /*dt*/ ) { ignore("Sphere"); }
|
||||
virtual void handleBox( const Domain& /*domain*/, Particle* /*P*/, double /*dt*/ ) { ignore("Box"); }
|
||||
virtual void handleDisk( const Domain& /*domain*/, Particle* /*P*/, double /*dt*/ ) { ignore("Disk"); }
|
||||
|
||||
inline void computeNewBasis( const osg::Vec3&, const osg::Vec3&, osg::Vec3&, osg::Vec3& );
|
||||
inline void ignore( const std::string& func );
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
|
||||
virtual osgText::Glyph* getGlyph(const osgText::FontResolution& fontRes, unsigned int charcode);
|
||||
|
||||
virtual osgText::Glyph3D* getGlyph3D(unsigned int charcode) { return 0; }
|
||||
virtual osgText::Glyph3D* getGlyph3D(unsigned int /*charcode*/) { return 0; }
|
||||
|
||||
virtual osg::Vec2 getKerning(unsigned int leftcharcode, unsigned int rightcharcode, osgText::KerningType kerningType);
|
||||
|
||||
|
@ -62,7 +62,7 @@ class OSGSIM_EXPORT ShapeAttribute
|
||||
void setName(const std::string& name) { _name = name; }
|
||||
|
||||
/// Get the attribute data type.
|
||||
const Type getType() const { return _type; }
|
||||
Type getType() const { return _type; }
|
||||
|
||||
/// Get the attribute data as an int.
|
||||
int getInt() const { return _integer; }
|
||||
|
@ -241,7 +241,7 @@ public:
|
||||
|
||||
Font* _facade;
|
||||
|
||||
virtual bool getVerticalSize(float & ascender, float & descender) const { return false; }
|
||||
virtual bool getVerticalSize(float & /*ascender*/, float & /*descender*/) const { return false; }
|
||||
};
|
||||
|
||||
|
||||
|
@ -73,7 +73,7 @@ class OSGVOLUME_EXPORT Locator : public osg::Object
|
||||
LocatorCallback(const LocatorCallback& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): osg::Object(rhs,copyop) {}
|
||||
META_Object(osgVolume, LocatorCallback);
|
||||
|
||||
virtual void locatorModified(Locator* locator) {};
|
||||
virtual void locatorModified(Locator* /*locator*/) {};
|
||||
|
||||
protected:
|
||||
virtual ~LocatorCallback() {}
|
||||
|
@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library 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
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@ -238,7 +238,8 @@ private:
|
||||
}
|
||||
|
||||
fflush(stdout);
|
||||
|
||||
#else // ] ALLOW_PRIORITY_SCHEDULING
|
||||
OT_UNUSED(thread);
|
||||
#endif // ] ALLOW_PRIORITY_SCHEDULING
|
||||
|
||||
}
|
||||
@ -346,6 +347,8 @@ private:
|
||||
|
||||
}
|
||||
|
||||
#else // ] ALLOW_PRIORITY_SCHEDULING
|
||||
OT_UNUSED(thread);
|
||||
#endif // ] ALLOW_PRIORITY_SCHEDULING
|
||||
|
||||
return status;
|
||||
@ -366,6 +369,7 @@ int Thread::SetConcurrency(int concurrencyLevel)
|
||||
#if defined (HAVE_PTHREAD_SETCONCURRENCY)
|
||||
return pthread_setconcurrency(concurrencyLevel);
|
||||
#else
|
||||
OT_UNUSED(concurrencyLevel);
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
@ -436,7 +440,7 @@ Thread::~Thread()
|
||||
}
|
||||
|
||||
delete pd;
|
||||
|
||||
|
||||
_prvData = 0;
|
||||
}
|
||||
|
||||
@ -550,7 +554,7 @@ int Thread::setProcessorAffinity(unsigned int cpunum)
|
||||
PThreadPrivateData *pd = static_cast<PThreadPrivateData *> (_prvData);
|
||||
pd->cpunum = cpunum;
|
||||
if (pd->cpunum<0) return -1;
|
||||
|
||||
|
||||
#ifdef __sgi
|
||||
|
||||
int status;
|
||||
@ -692,7 +696,7 @@ int Thread::start() {
|
||||
//
|
||||
int Thread::startThread()
|
||||
{
|
||||
if (_prvData) return start();
|
||||
if (_prvData) return start();
|
||||
else return 0;
|
||||
}
|
||||
|
||||
@ -839,6 +843,7 @@ int Thread::setSchedulePriority(ThreadPriority priority) {
|
||||
return 0;
|
||||
|
||||
#else
|
||||
OT_UNUSED(priority);
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
@ -878,6 +883,7 @@ int Thread::setSchedulePolicy(ThreadPolicy policy)
|
||||
else
|
||||
return 0;
|
||||
#else
|
||||
OT_UNUSED(policy);
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
@ -1009,7 +1015,7 @@ int OpenThreads::GetNumberOfProcessors()
|
||||
uint64_t num_cpus = 0;
|
||||
size_t num_cpus_length = sizeof(num_cpus);
|
||||
#if defined(__FreeBSD__)
|
||||
sysctlbyname("hw.ncpu", &num_cpus, &num_cpus_length, NULL, 0);
|
||||
sysctlbyname("hw.ncpu", &num_cpus, &num_cpus_length, NULL, 0);
|
||||
#else
|
||||
sysctlbyname("hw.activecpu", &num_cpus, &num_cpus_length, NULL, 0);
|
||||
#endif
|
||||
@ -1024,7 +1030,7 @@ int OpenThreads::SetProcessorAffinityOfCurrentThread(unsigned int cpunum)
|
||||
Thread::Init();
|
||||
|
||||
Thread* thread = Thread::CurrentThread();
|
||||
if (thread)
|
||||
if (thread)
|
||||
{
|
||||
return thread->setProcessorAffinity(cpunum);
|
||||
}
|
||||
@ -1046,6 +1052,6 @@ int OpenThreads::SetProcessorAffinityOfCurrentThread(unsigned int cpunum)
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
@ -347,7 +347,7 @@ void GLBufferObject::Extensions::setupGLExtensions(unsigned int contextID)
|
||||
setGLExtensionFuncPtr(_glBindBufferRange, "glBindBufferRange");
|
||||
setGLExtensionFuncPtr(_glBindBufferBase, "glBindBufferBase");
|
||||
setGLExtensionFuncPtr(_glTexBuffer, "glTexBuffer","glTexBufferARB" );
|
||||
|
||||
|
||||
_isPBOSupported = OSG_GL3_FEATURES || osg::isGLExtensionSupported(contextID,"GL_ARB_pixel_buffer_object");
|
||||
_isUniformBufferObjectSupported = osg::isGLExtensionSupported(contextID, "GL_ARB_uniform_buffer_object");
|
||||
_isTBOSupported = osg::isGLExtensionSupported(contextID,"GL_ARB_texture_buffer_object");
|
||||
@ -687,7 +687,7 @@ void GLBufferObjectSet::discardAllDeletedGLBufferObjects()
|
||||
_orphanedGLBufferObjects.clear();
|
||||
}
|
||||
|
||||
void GLBufferObjectSet::flushDeletedGLBufferObjects(double currentTime, double& availableTime)
|
||||
void GLBufferObjectSet::flushDeletedGLBufferObjects(double /*currentTime*/, double& availableTime)
|
||||
{
|
||||
{
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
|
||||
|
@ -45,7 +45,7 @@ void GeometryCostEstimator::setDefaults()
|
||||
_displayListCompileFactor = 10.0;
|
||||
}
|
||||
|
||||
void GeometryCostEstimator::calibrate(osg::RenderInfo& renderInfo)
|
||||
void GeometryCostEstimator::calibrate(osg::RenderInfo& /*renderInfo*/)
|
||||
{
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ CostPair GeometryCostEstimator::estimateCompileCost(const osg::Geometry* geometr
|
||||
}
|
||||
}
|
||||
|
||||
CostPair GeometryCostEstimator::estimateDrawCost(const osg::Geometry* geometry) const
|
||||
CostPair GeometryCostEstimator::estimateDrawCost(const osg::Geometry* /*geometry*/) const
|
||||
{
|
||||
return CostPair(0.0,0.0);
|
||||
}
|
||||
@ -114,7 +114,7 @@ void TextureCostEstimator::setDefaults()
|
||||
_drawCost.set(min_time, 1.0/gpu_bandwidth, 256); // min time 1/10th of millisecond, min size 256
|
||||
}
|
||||
|
||||
void TextureCostEstimator::calibrate(osg::RenderInfo& renderInfo)
|
||||
void TextureCostEstimator::calibrate(osg::RenderInfo& /*renderInfo*/)
|
||||
{
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ CostPair TextureCostEstimator::estimateCompileCost(const osg::Texture* texture)
|
||||
return cost;
|
||||
}
|
||||
|
||||
CostPair TextureCostEstimator::estimateDrawCost(const osg::Texture* texture) const
|
||||
CostPair TextureCostEstimator::estimateDrawCost(const osg::Texture* /*texture*/) const
|
||||
{
|
||||
return CostPair(0.0,0.0);
|
||||
}
|
||||
@ -147,16 +147,16 @@ void ProgramCostEstimator::setDefaults()
|
||||
{
|
||||
}
|
||||
|
||||
void ProgramCostEstimator::calibrate(osg::RenderInfo& renderInfo)
|
||||
void ProgramCostEstimator::calibrate(osg::RenderInfo& /*renderInfo*/)
|
||||
{
|
||||
}
|
||||
|
||||
CostPair ProgramCostEstimator::estimateCompileCost(const osg::Program* program) const
|
||||
CostPair ProgramCostEstimator::estimateCompileCost(const osg::Program* /*program*/) const
|
||||
{
|
||||
return CostPair(0.0,0.0);
|
||||
}
|
||||
|
||||
CostPair ProgramCostEstimator::estimateDrawCost(const osg::Program* program) const
|
||||
CostPair ProgramCostEstimator::estimateDrawCost(const osg::Program* /*program*/) const
|
||||
{
|
||||
return CostPair(0.0,0.0);
|
||||
}
|
||||
@ -185,7 +185,7 @@ void GraphicsCostEstimator::setDefaults()
|
||||
}
|
||||
|
||||
|
||||
void GraphicsCostEstimator::calibrate(osg::RenderInfo& renderInfo)
|
||||
void GraphicsCostEstimator::calibrate(osg::RenderInfo& /*renderInfo*/)
|
||||
{
|
||||
OSG_INFO<<"GraphicsCostEstimator::calibrate(..)"<<std::endl;
|
||||
}
|
||||
|
@ -795,6 +795,7 @@ KdTreeBuilder::KdTreeBuilder():
|
||||
}
|
||||
|
||||
KdTreeBuilder::KdTreeBuilder(const KdTreeBuilder& rhs):
|
||||
osg::Referenced(true),
|
||||
osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN),
|
||||
_buildOptions(rhs._buildOptions),
|
||||
_kdTreePrototype(rhs._kdTreePrototype)
|
||||
|
@ -29,7 +29,7 @@ namespace osg
|
||||
class NullStreamBuffer : public std::streambuf
|
||||
{
|
||||
private:
|
||||
std::streamsize xsputn(const std::streambuf::char_type *str, std::streamsize n)
|
||||
std::streamsize xsputn(const std::streambuf::char_type */*str*/, std::streamsize n)
|
||||
{
|
||||
return n;
|
||||
}
|
||||
|
@ -110,6 +110,8 @@ void DrawArrayLengths::draw(State& state, bool) const
|
||||
}
|
||||
if (mode==GL_POLYGON) mode = GL_TRIANGLE_FAN;
|
||||
if (mode==GL_QUAD_STRIP) mode = GL_TRIANGLE_STRIP;
|
||||
#else
|
||||
OSG_UNUSED(state);
|
||||
#endif
|
||||
|
||||
GLint first = _first;
|
||||
|
@ -110,6 +110,8 @@ void Referenced::setThreadSafeReferenceCounting(bool enableThreadSafeReferenceCo
|
||||
{
|
||||
#if !defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS)
|
||||
s_useThreadSafeReferenceCounting = enableThreadSafeReferenceCounting;
|
||||
#else
|
||||
OSG_UNUSED(enableThreadSafeReferenceCounting);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -182,8 +184,12 @@ Referenced::Referenced(bool threadSafeRefUnref):
|
||||
#if !defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS)
|
||||
#ifndef ENFORCE_THREADSAFE
|
||||
if (threadSafeRefUnref)
|
||||
#else
|
||||
OSG_UNUSED(threadSafeRefUnref);
|
||||
#endif
|
||||
_refMutex = new OpenThreads::Mutex;
|
||||
#else
|
||||
OSG_UNUSED(threadSafeRefUnref);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_OBJECT_ALLOCATION_DESTRUCTION
|
||||
@ -347,6 +353,8 @@ void Referenced::setThreadSafeRefUnref(bool threadSafe)
|
||||
delete tmpMutexPtr;
|
||||
}
|
||||
}
|
||||
#else
|
||||
OSG_UNUSED(threadSafe);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,8 @@ ShaderBinary::ShaderBinary()
|
||||
{
|
||||
}
|
||||
|
||||
ShaderBinary::ShaderBinary(const ShaderBinary& rhs, const osg::CopyOp&):
|
||||
ShaderBinary::ShaderBinary(const ShaderBinary& rhs, const osg::CopyOp& copyop):
|
||||
osg::Object(rhs, copyop),
|
||||
_data(rhs._data)
|
||||
{
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ void ShaderAttribute::removeUniform(unsigned int i)
|
||||
_uniforms.erase(_uniforms.begin()+i);
|
||||
}
|
||||
|
||||
bool ShaderAttribute::getModeUsage(StateAttribute::ModeUsage& usage) const
|
||||
bool ShaderAttribute::getModeUsage(StateAttribute::ModeUsage& /*usage*/) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -401,7 +401,7 @@ void Texture::TextureObjectSet::discardAllDeletedTextureObjects()
|
||||
_orphanedTextureObjects.clear();
|
||||
}
|
||||
|
||||
void Texture::TextureObjectSet::flushDeletedTextureObjects(double currentTime, double& availableTime)
|
||||
void Texture::TextureObjectSet::flushDeletedTextureObjects(double /*currentTime*/, double& availableTime)
|
||||
{
|
||||
// OSG_NOTICE<<"Texture::TextureObjectSet::flushDeletedTextureObjects(..)"<<std::endl;
|
||||
|
||||
@ -1075,7 +1075,7 @@ Texture::Texture():
|
||||
_min_filter(LINEAR_MIPMAP_LINEAR), // trilinear
|
||||
_mag_filter(LINEAR),
|
||||
_maxAnisotropy(1.0f),
|
||||
_swizzle(GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA),
|
||||
_swizzle(GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA),
|
||||
_useHardwareMipMapGeneration(true),
|
||||
_unrefImageDataAfterApply(false),
|
||||
_clientStorageHint(false),
|
||||
@ -1102,7 +1102,7 @@ Texture::Texture(const Texture& text,const CopyOp& copyop):
|
||||
_min_filter(text._min_filter),
|
||||
_mag_filter(text._mag_filter),
|
||||
_maxAnisotropy(text._maxAnisotropy),
|
||||
_swizzle(text._swizzle),
|
||||
_swizzle(text._swizzle),
|
||||
_useHardwareMipMapGeneration(text._useHardwareMipMapGeneration),
|
||||
_unrefImageDataAfterApply(text._unrefImageDataAfterApply),
|
||||
_clientStorageHint(text._clientStorageHint),
|
||||
@ -1459,7 +1459,7 @@ void Texture::computeInternalFormatWithImage(const osg::Image& image) const
|
||||
default: break;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
_internalFormat = internalFormat;
|
||||
|
||||
|
||||
|
@ -91,7 +91,7 @@ DictNode *dictInsertBefore( Dict *dict, DictNode *node, DictKey key )
|
||||
}
|
||||
|
||||
/* really __gl_dictListDelete */
|
||||
void dictDelete( Dict *dict, DictNode *node ) /*ARGSUSED*/
|
||||
void dictDelete( Dict */*dict*/, DictNode *node ) /*ARGSUSED*/
|
||||
{
|
||||
node->next->prev = node->prev;
|
||||
node->prev->next = node->next;
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "memalloc.h"
|
||||
#include "string.h"
|
||||
|
||||
int __gl_memInit( size_t maxFast )
|
||||
int __gl_memInit( size_t /*maxFast*/ )
|
||||
{
|
||||
#ifndef NO_MALLOPT
|
||||
/* mallopt( M_MXFAST, maxFast );*/
|
||||
|
@ -3293,7 +3293,7 @@ static void scale_internal_float(GLint components, GLint widthin,
|
||||
}
|
||||
}
|
||||
|
||||
static int checkMipmapArgs(GLenum internalFormat, GLenum format, GLenum type)
|
||||
static int checkMipmapArgs(GLenum /*internalFormat*/, GLenum format, GLenum type)
|
||||
{
|
||||
if (!legalFormat(format) || !legalType(type)) {
|
||||
return GLU_INVALID_ENUM;
|
||||
@ -3344,7 +3344,7 @@ static GLboolean legalType(GLenum type)
|
||||
case GL_UNSIGNED_INT:
|
||||
case GL_FLOAT:
|
||||
case GL_UNSIGNED_BYTE_3_3_2:
|
||||
case GL_UNSIGNED_BYTE_2_3_3_REV:
|
||||
case GL_UNSIGNED_BYTE_2_3_3_REV:
|
||||
case GL_UNSIGNED_SHORT_5_6_5:
|
||||
case GL_UNSIGNED_SHORT_5_6_5_REV:
|
||||
case GL_UNSIGNED_SHORT_4_4_4_4:
|
||||
@ -3442,7 +3442,7 @@ static void closestFit(GLenum target, GLint width, GLint height,
|
||||
if ( (strtod((const char *)glGetString(GL_VERSION),NULL) >= 1.1)
|
||||
) {
|
||||
GLint widthPowerOf2= nearestPower(width);
|
||||
GLint heightPowerOf2= nearestPower(height);
|
||||
GLint heightPowerOf2= nearestPower(height);
|
||||
GLint proxyWidth;
|
||||
|
||||
do {
|
||||
@ -4613,7 +4613,7 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat,
|
||||
}
|
||||
} /* for level */
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
|
||||
|
||||
|
||||
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
|
||||
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
|
||||
glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels);
|
||||
@ -4905,7 +4905,7 @@ static GLfloat bytes_per_element(GLenum type)
|
||||
case GL_FLOAT:
|
||||
return(sizeof(GLfloat));
|
||||
case GL_UNSIGNED_BYTE_3_3_2:
|
||||
case GL_UNSIGNED_BYTE_2_3_3_REV:
|
||||
case GL_UNSIGNED_BYTE_2_3_3_REV:
|
||||
return(sizeof(GLubyte));
|
||||
case GL_UNSIGNED_SHORT_5_6_5:
|
||||
case GL_UNSIGNED_SHORT_5_6_5_REV:
|
||||
@ -6220,7 +6220,7 @@ static void scaleInternalPackedPixel(int components,
|
||||
#endif
|
||||
|
||||
/* calculate the value for pixels in the last row */
|
||||
|
||||
|
||||
y_percent = highy_float;
|
||||
percent = y_percent * (1-lowx_float);
|
||||
temp = (const char *)dataIn + xindex + highy_int * rowSizeInBytes;
|
||||
@ -7427,13 +7427,13 @@ int gluScaleImage3D(GLenum format,
|
||||
|
||||
|
||||
static void closestFit3D(GLTexImage3DProc gluTexImage3D,
|
||||
GLenum target, GLint width, GLint height, GLint depth,
|
||||
GLenum /*target*/, GLint width, GLint height, GLint depth,
|
||||
GLint internalFormat, GLenum format, GLenum type,
|
||||
GLint *newWidth, GLint *newHeight, GLint *newDepth)
|
||||
{
|
||||
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
|
||||
GLint widthPowerOf2= nearestPower(width);
|
||||
GLint heightPowerOf2= nearestPower(height);
|
||||
GLint heightPowerOf2= nearestPower(height);
|
||||
GLint depthPowerOf2= nearestPower(depth);
|
||||
GLint proxyWidth;
|
||||
|
||||
@ -7534,7 +7534,7 @@ static void halveImagePackedPixelSlice(int components,
|
||||
}
|
||||
totals[cc]/= (float)BOX2;
|
||||
} /* for cc */
|
||||
|
||||
|
||||
(*shovePackedPixel)(totals,outIndex,dataOut);
|
||||
outIndex++;
|
||||
/* skip over to next group of 2 */
|
||||
@ -8280,7 +8280,7 @@ static int gluBuild3DMipmapLevelsCore(GLTexImage3DProc gluTexImage3D,
|
||||
}
|
||||
}
|
||||
/* level userLevel is in srcImage; nothing saved yet */
|
||||
level = userLevel;
|
||||
level = userLevel;
|
||||
}
|
||||
|
||||
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
|
||||
|
@ -62,7 +62,7 @@ void AnimationManagerBase::operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||
}
|
||||
|
||||
|
||||
AnimationManagerBase::AnimationManagerBase(const AnimationManagerBase& b, const osg::CopyOp& copyop) : osg::NodeCallback(b,copyop)
|
||||
AnimationManagerBase::AnimationManagerBase(const AnimationManagerBase& b, const osg::CopyOp& copyop) : osg::Object(b, copyop), osg::NodeCallback(b,copyop) // TODO check this
|
||||
{
|
||||
const AnimationList& animationList = b.getAnimationList();
|
||||
for (AnimationList::const_iterator it = animationList.begin();
|
||||
|
@ -41,7 +41,7 @@ class ValidateSkeletonVisitor : public osg::NodeVisitor
|
||||
{
|
||||
public:
|
||||
ValidateSkeletonVisitor(): osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {}
|
||||
void apply(osg::Node& node) { return; }
|
||||
void apply(osg::Node& /*node*/) { return; }
|
||||
void apply(osg::Transform& node)
|
||||
{
|
||||
// the idea is to traverse the skeleton or bone but to stop if other node is found
|
||||
|
@ -33,7 +33,7 @@ Target* StackedMatrixElement::getOrCreateTarget()
|
||||
return _target.get();
|
||||
}
|
||||
|
||||
void StackedMatrixElement::update(float t)
|
||||
void StackedMatrixElement::update(float /*t*/)
|
||||
{
|
||||
if (_target.valid())
|
||||
_matrix = _target->getValue();
|
||||
|
@ -37,7 +37,7 @@ void StackedQuaternionElement::applyToMatrix(osg::Matrix& matrix) const {matrix.
|
||||
osg::Matrix StackedQuaternionElement::getAsMatrix() const { return osg::Matrix(_quaternion); }
|
||||
bool StackedQuaternionElement::isIdentity() const { return (_quaternion[0] == 0 && _quaternion[1] == 0 && _quaternion[2] == 0 && _quaternion[3] == 1.0); }
|
||||
|
||||
void StackedQuaternionElement::update(float t)
|
||||
void StackedQuaternionElement::update(float /*t*/)
|
||||
{
|
||||
if (_target.valid())
|
||||
_quaternion = _target->getValue();
|
||||
|
@ -27,7 +27,7 @@ StackedRotateAxisElement::StackedRotateAxisElement(const StackedRotateAxisElemen
|
||||
|
||||
|
||||
osg::Matrix StackedRotateAxisElement::getAsMatrix() const { return osg::Matrix::rotate(osg::Quat(_angle, _axis)); }
|
||||
void StackedRotateAxisElement::update(float t)
|
||||
void StackedRotateAxisElement::update(float /*t*/)
|
||||
{
|
||||
if (_target.valid())
|
||||
_angle = _target->getValue();
|
||||
|
@ -42,7 +42,7 @@ StackedScaleElement::StackedScaleElement()
|
||||
_scale = osg::Vec3(1,1,1);
|
||||
}
|
||||
|
||||
void StackedScaleElement::update(float t)
|
||||
void StackedScaleElement::update(float /*t*/)
|
||||
{
|
||||
if (_target.valid())
|
||||
_scale = _target->getValue();
|
||||
|
@ -18,7 +18,8 @@ using namespace osgAnimation;
|
||||
|
||||
StackedTransform::StackedTransform() {}
|
||||
|
||||
StackedTransform::StackedTransform(const StackedTransform& rhs, const osg::CopyOp& co)
|
||||
StackedTransform::StackedTransform(const StackedTransform& rhs, const osg::CopyOp& co):
|
||||
osg::MixinVector<osg::ref_ptr<StackedTransformElement> >(rhs)
|
||||
{
|
||||
reserve(rhs.size());
|
||||
for (StackedTransform::const_iterator it = rhs.begin(); it != rhs.end(); ++it)
|
||||
|
@ -43,7 +43,7 @@ Target* StackedTranslateElement::getOrCreateTarget()
|
||||
Target* StackedTranslateElement::getTarget() {return _target.get();}
|
||||
const Target* StackedTranslateElement::getTarget() const {return _target.get();}
|
||||
|
||||
void StackedTranslateElement::update(float t)
|
||||
void StackedTranslateElement::update(float /*t*/)
|
||||
{
|
||||
if (_target.valid())
|
||||
_translate = _target->getValue();
|
||||
|
@ -109,7 +109,7 @@ struct StatsGraph : public osg::MatrixTransform
|
||||
struct NeverCull : public osg::Drawable::CullCallback
|
||||
{
|
||||
NeverCull() {}
|
||||
bool cull(osg::NodeVisitor* nv, osg::Drawable* drawable, osg::RenderInfo* renderInfo) const { return false;}
|
||||
bool cull(osg::NodeVisitor* /*nv*/, osg::Drawable* /*drawable*/, osg::RenderInfo* /*renderInfo*/) const { return false;}
|
||||
};
|
||||
|
||||
|
||||
|
@ -65,6 +65,8 @@ std::string convertUTF16toUTF8(const wchar_t* source, unsigned sourceLength)
|
||||
#else
|
||||
//TODO: Implement for other platforms
|
||||
OSG_WARN << "ConvertUTF16toUTF8 not implemented." << std::endl;
|
||||
OSG_UNUSED(source);
|
||||
OSG_UNUSED(sourceLength);
|
||||
return std::string();
|
||||
#endif
|
||||
}
|
||||
@ -97,6 +99,8 @@ std::wstring convertUTF8toUTF16(const char* source, unsigned sourceLength)
|
||||
#else
|
||||
//TODO: Implement for other platforms
|
||||
OSG_WARN << "ConvertUTF8toUTF16 not implemented." << std::endl;
|
||||
OSG_UNUSED(source);
|
||||
OSG_UNUSED(sourceLength);
|
||||
return std::wstring();
|
||||
#endif
|
||||
}
|
||||
@ -126,6 +130,7 @@ std::string convertStringFromCurrentCodePageToUTF8(const char* source, unsigned
|
||||
|
||||
return convertUTF16toUTF8(sUTF16);
|
||||
#else
|
||||
OSG_UNUSED(sourceLength);
|
||||
return source;
|
||||
#endif
|
||||
}
|
||||
@ -158,6 +163,7 @@ std::string convertStringFromUTF8toCurrentCodePage(const char* source, unsigned
|
||||
|
||||
return sDest;
|
||||
#else
|
||||
OSG_UNUSED(sourceLength);
|
||||
return source;
|
||||
#endif
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ struct DatabasePager::DatabasePagerCompileCompletedCallback : public osgUtil::In
|
||||
_pager(pager),
|
||||
_databaseRequest(databaseRequest) {}
|
||||
|
||||
virtual bool compileCompleted(osgUtil::IncrementalCompileOperation::CompileSet* compileSet)
|
||||
virtual bool compileCompleted(osgUtil::IncrementalCompileOperation::CompileSet* /*compileSet*/)
|
||||
{
|
||||
_pager->compileCompleted(_databaseRequest.get());
|
||||
return true;
|
||||
|
@ -27,7 +27,8 @@ FileList::FileList()
|
||||
{
|
||||
}
|
||||
|
||||
FileList::FileList(const FileList& fileList, const osg::CopyOp):
|
||||
FileList::FileList(const FileList& fileList, const osg::CopyOp & copyop):
|
||||
osg::Object(fileList, copyop),
|
||||
_files(fileList._files)
|
||||
{
|
||||
}
|
||||
@ -64,7 +65,8 @@ DatabaseRevision::DatabaseRevision()
|
||||
{
|
||||
}
|
||||
|
||||
DatabaseRevision::DatabaseRevision(const DatabaseRevision& revision, const osg::CopyOp):
|
||||
DatabaseRevision::DatabaseRevision(const DatabaseRevision& revision, const osg::CopyOp & copyop):
|
||||
osg::Object(revision, copyop),
|
||||
_databasePath(revision._databasePath),
|
||||
_filesAdded(revision._filesAdded),
|
||||
_filesRemoved(revision._filesRemoved),
|
||||
@ -109,7 +111,8 @@ DatabaseRevisions::DatabaseRevisions()
|
||||
{
|
||||
}
|
||||
|
||||
DatabaseRevisions::DatabaseRevisions(const DatabaseRevisions& revisions, const osg::CopyOp):
|
||||
DatabaseRevisions::DatabaseRevisions(const DatabaseRevisions& revisions, const osg::CopyOp & copyop):
|
||||
osg::Object(revisions, copyop),
|
||||
_databasePath(revisions._databasePath),
|
||||
_revisionList(revisions._revisionList)
|
||||
{
|
||||
|
@ -81,7 +81,7 @@ void ImagePager::ReadQueue::clear()
|
||||
void ImagePager::ReadQueue::add(ImagePager::ImageRequest* imageRequest)
|
||||
{
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_requestMutex);
|
||||
|
||||
|
||||
_requestList.push_back(imageRequest);
|
||||
imageRequest->_requestQueue = this;
|
||||
|
||||
@ -221,7 +221,7 @@ void ImagePager::ImageThread::run()
|
||||
if (image.valid())
|
||||
{
|
||||
// OSG_NOTICE<<" successful readImageFile("<<imageRequest->_fileName<<") index to assign = "<<imageRequest->_attachmentIndex<<std::endl;
|
||||
|
||||
|
||||
osg::ImageSequence* is = dynamic_cast<osg::ImageSequence*>(imageRequest->_attachmentPoint.get());
|
||||
if (is)
|
||||
{
|
||||
@ -329,7 +329,7 @@ osg::Image* ImagePager::readImageFile(const std::string& fileName, const osg::Re
|
||||
return osgDB::readImageFile(fileName, readOptions);
|
||||
}
|
||||
|
||||
void ImagePager::requestImageFile(const std::string& fileName, osg::Object* attachmentPoint, int attachmentIndex, double timeToMergeBy, const osg::FrameStamp* framestamp, osg::ref_ptr<osg::Referenced>& imageRequest, const osg::Referenced* options)
|
||||
void ImagePager::requestImageFile(const std::string& fileName, osg::Object* attachmentPoint, int attachmentIndex, double timeToMergeBy, const osg::FrameStamp* /*framestamp*/, osg::ref_ptr<osg::Referenced>& imageRequest, const osg::Referenced* options)
|
||||
{
|
||||
|
||||
osgDB::Options* readOptions = dynamic_cast<osgDB::Options*>(const_cast<osg::Referenced*>(options));
|
||||
|
@ -346,7 +346,7 @@ Registry::Registry()
|
||||
addFileExtensionAlias("tga", "qt");
|
||||
addFileExtensionAlias("flv", "qt");
|
||||
addFileExtensionAlias("dv", "qt");
|
||||
|
||||
|
||||
#if !defined(USE_QTKIT)
|
||||
addFileExtensionAlias("mov", "qt");
|
||||
addFileExtensionAlias("avi", "qt");
|
||||
@ -1062,7 +1062,7 @@ std::string Registry::findDataFileImplementation(const std::string& filename, co
|
||||
return std::string();
|
||||
}
|
||||
|
||||
std::string Registry::findLibraryFileImplementation(const std::string& filename, const Options* options, CaseSensitivity caseSensitivity)
|
||||
std::string Registry::findLibraryFileImplementation(const std::string& filename, const Options* /*options*/, CaseSensitivity caseSensitivity)
|
||||
{
|
||||
if (filename.empty())
|
||||
return filename;
|
||||
@ -1186,7 +1186,7 @@ ReaderWriter::ReadResult Registry::read(const ReadFunctor& readFunctor)
|
||||
osgDB::getServerProtocol(readFunctor._filename),
|
||||
osgDB::getFileExtension(readFunctor._filename)
|
||||
);
|
||||
|
||||
|
||||
if (rw)
|
||||
{
|
||||
return readFunctor.doRead(*rw);
|
||||
@ -1205,7 +1205,7 @@ ReaderWriter::ReadResult Registry::read(const ReadFunctor& readFunctor)
|
||||
// sort the results so the most relevant (i.e. ERROR_IN_READING_FILE is more relevant than FILE_NOT_FOUND) results get placed at the end of the results list.
|
||||
std::sort(results.begin(), results.end());
|
||||
ReaderWriter::ReadResult result = results.back();
|
||||
|
||||
|
||||
if (result.message().empty())
|
||||
{
|
||||
switch(result.status())
|
||||
@ -1327,7 +1327,7 @@ ReaderWriter::WriteResult Registry::writeObjectImplementation(const Object& obj,
|
||||
// sort the results so the most relevant (i.e. ERROR_IN_WRITING_FILE is more relevant than FILE_NOT_FOUND) results get placed at the end of the results list.
|
||||
std::sort(results.begin(), results.end());
|
||||
ReaderWriter::WriteResult result = results.back();
|
||||
|
||||
|
||||
if (result.message().empty())
|
||||
{
|
||||
switch(result.status())
|
||||
@ -1383,7 +1383,7 @@ ReaderWriter::WriteResult Registry::writeImageImplementation(const Image& image,
|
||||
// sort the results so the most relevant (i.e. ERROR_IN_WRITING_FILE is more relevant than FILE_NOT_FOUND) results get placed at the end of the results list.
|
||||
std::sort(results.begin(), results.end());
|
||||
ReaderWriter::WriteResult result = results.back();
|
||||
|
||||
|
||||
if (result.message().empty())
|
||||
{
|
||||
switch(result.status())
|
||||
@ -1434,11 +1434,11 @@ ReaderWriter::WriteResult Registry::writeHeightFieldImplementation(const HeightF
|
||||
{
|
||||
return ReaderWriter::WriteResult("Warning: Could not find plugin to write HeightField to file \""+fileName+"\".");
|
||||
}
|
||||
|
||||
|
||||
// sort the results so the most relevant (i.e. ERROR_IN_WRITING_FILE is more relevant than FILE_NOT_FOUND) results get placed at the end of the results list.
|
||||
std::sort(results.begin(), results.end());
|
||||
ReaderWriter::WriteResult result = results.back();
|
||||
|
||||
|
||||
if (result.message().empty())
|
||||
{
|
||||
switch(result.status())
|
||||
@ -1507,7 +1507,7 @@ ReaderWriter::WriteResult Registry::writeNodeImplementation(const Node& node,con
|
||||
// sort the results so the most relevant (i.e. ERROR_IN_WRITING_FILE is more relevant than FILE_NOT_FOUND) results get placed at the end of the results list.
|
||||
std::sort(results.begin(), results.end());
|
||||
ReaderWriter::WriteResult result = results.back();
|
||||
|
||||
|
||||
if (result.message().empty())
|
||||
{
|
||||
switch(result.status())
|
||||
@ -1563,7 +1563,7 @@ ReaderWriter::WriteResult Registry::writeShaderImplementation(const Shader& shad
|
||||
// sort the results so the most relevant (i.e. ERROR_IN_WRITING_FILE is more relevant than FILE_NOT_FOUND) results get placed at the end of the results list.
|
||||
std::sort(results.begin(), results.end());
|
||||
ReaderWriter::WriteResult result = results.back();
|
||||
|
||||
|
||||
if (result.message().empty())
|
||||
{
|
||||
switch(result.status())
|
||||
@ -1741,11 +1741,11 @@ ReaderWriter* Registry::getReaderWriterForProtocolAndExtension(const std::string
|
||||
ReaderWriter* result = getReaderWriterForExtension(extension);
|
||||
if (result && result->acceptsProtocol(protocol))
|
||||
return result;
|
||||
|
||||
|
||||
result = NULL;
|
||||
ReaderWriterList results;
|
||||
getReaderWriterListForProtocol(protocol, results);
|
||||
|
||||
|
||||
for(ReaderWriterList::const_iterator i = results.begin(); i != results.end(); ++i)
|
||||
{
|
||||
// if we have a readerwriter which supports wildcards, save it as a fallback
|
||||
@ -1754,6 +1754,6 @@ ReaderWriter* Registry::getReaderWriterForProtocolAndExtension(const std::string
|
||||
else if ((*i)->acceptsExtension(extension))
|
||||
return i->get();
|
||||
}
|
||||
|
||||
|
||||
return result ? result : getReaderWriterForExtension("curl");
|
||||
}
|
||||
|
@ -491,7 +491,7 @@ bool XmlNode::writeString(const ControlMap& controlMap, std::ostream& fout, cons
|
||||
return true;
|
||||
}
|
||||
|
||||
bool XmlNode::writeChildren(const ControlMap& controlMap, std::ostream& fout, const std::string& indent) const
|
||||
bool XmlNode::writeChildren(const ControlMap& /*controlMap*/, std::ostream& fout, const std::string& indent) const
|
||||
{
|
||||
for(Children::const_iterator citr = children.begin();
|
||||
citr != children.end();
|
||||
|
@ -21,7 +21,8 @@ CameraManipulator::CameraManipulator()
|
||||
|
||||
|
||||
CameraManipulator::CameraManipulator(const CameraManipulator& mm, const CopyOp& copyOp)
|
||||
: inherited(mm, copyOp),
|
||||
: osg::Object(mm, copyOp),
|
||||
inherited(mm, copyOp),
|
||||
_intersectTraversalMask(mm._intersectTraversalMask),
|
||||
_autoComputeHomePosition(mm._autoComputeHomePosition),
|
||||
_homeEye(mm._homeEye),
|
||||
|
@ -28,7 +28,7 @@ Device::Device(const Device& es, const osg::CopyOp& copyop):
|
||||
setEventQueue(new EventQueue);
|
||||
}
|
||||
|
||||
void Device::sendEvent(const GUIEventAdapter& event)
|
||||
void Device::sendEvent(const GUIEventAdapter& /*event*/)
|
||||
{
|
||||
OSG_WARN << "Device::sendEvent not implemented!" << std::endl;
|
||||
}
|
||||
|
@ -44,7 +44,8 @@ FirstPersonManipulator::FirstPersonManipulator( int flags )
|
||||
|
||||
/// Constructor.
|
||||
FirstPersonManipulator::FirstPersonManipulator( const FirstPersonManipulator& fpm, const CopyOp& copyOp )
|
||||
: inherited( fpm, copyOp ),
|
||||
: osg::Object(fpm, copyOp),
|
||||
inherited( fpm, copyOp ),
|
||||
_eye( fpm._eye ),
|
||||
_rotation( fpm._rotation ),
|
||||
_velocity( fpm._velocity ),
|
||||
@ -294,7 +295,7 @@ bool FirstPersonManipulator::handleMouseWheel( const GUIEventAdapter& ea, GUIAct
|
||||
|
||||
|
||||
// doc in parent
|
||||
bool FirstPersonManipulator::performMovementLeftMouseButton( const double eventTimeDelta, const double dx, const double dy )
|
||||
bool FirstPersonManipulator::performMovementLeftMouseButton( const double /*eventTimeDelta*/, const double dx, const double dy )
|
||||
{
|
||||
// world up vector
|
||||
CoordinateFrame coordinateFrame = getCoordinateFrame( _eye );
|
||||
@ -353,7 +354,7 @@ void FirstPersonManipulator::moveUp( const double distance )
|
||||
}
|
||||
|
||||
|
||||
void FirstPersonManipulator::applyAnimationStep( const double currentProgress, const double prevProgress )
|
||||
void FirstPersonManipulator::applyAnimationStep( const double currentProgress, const double /*prevProgress*/ )
|
||||
{
|
||||
FirstPersonAnimationData *ad = dynamic_cast< FirstPersonAnimationData* >( _animationData.get() );
|
||||
assert( ad );
|
||||
|
@ -28,7 +28,8 @@ FlightManipulator::FlightManipulator( int flags )
|
||||
|
||||
/// Constructor.
|
||||
FlightManipulator::FlightManipulator( const FlightManipulator& fm, const CopyOp& copyOp )
|
||||
: inherited( fm, copyOp ),
|
||||
: osg::Object(fm, copyOp),
|
||||
inherited( fm, copyOp ),
|
||||
_yawMode( fm._yawMode )
|
||||
{
|
||||
}
|
||||
@ -221,7 +222,7 @@ bool FlightManipulator::performMovement()
|
||||
}
|
||||
|
||||
|
||||
bool FlightManipulator::performMovementLeftMouseButton( const double eventTimeDelta, const double dx, const double dy )
|
||||
bool FlightManipulator::performMovementLeftMouseButton( const double eventTimeDelta, const double /*dx*/, const double /*dy*/ )
|
||||
{
|
||||
// pan model
|
||||
_velocity += eventTimeDelta * (_acceleration + _velocity);
|
||||
@ -229,14 +230,14 @@ bool FlightManipulator::performMovementLeftMouseButton( const double eventTimeDe
|
||||
}
|
||||
|
||||
|
||||
bool FlightManipulator::performMovementMiddleMouseButton( const double eventTimeDelta, const double dx, const double dy )
|
||||
bool FlightManipulator::performMovementMiddleMouseButton( const double /*eventTimeDelta*/, const double /*dx*/, const double /*dy*/ )
|
||||
{
|
||||
_velocity = 0.0f;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool FlightManipulator::performMovementRightMouseButton( const double eventTimeDelta, const double dx, const double dy )
|
||||
bool FlightManipulator::performMovementRightMouseButton( const double eventTimeDelta, const double /*dx*/, const double /*dy*/ )
|
||||
{
|
||||
_velocity -= eventTimeDelta * (_acceleration + _velocity);
|
||||
return true;
|
||||
|
@ -30,7 +30,7 @@ MultiTouchTrackballManipulator::MultiTouchTrackballManipulator( int flags )
|
||||
|
||||
/// Constructor.
|
||||
MultiTouchTrackballManipulator::MultiTouchTrackballManipulator( const MultiTouchTrackballManipulator& tm, const CopyOp& copyOp )
|
||||
: inherited( tm, copyOp )
|
||||
: osg::Object(tm, copyOp), inherited( tm, copyOp )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,8 @@ NodeTrackerManipulator::NodeTrackerManipulator( int flags )
|
||||
|
||||
|
||||
NodeTrackerManipulator::NodeTrackerManipulator( const NodeTrackerManipulator& m, const CopyOp& copyOp )
|
||||
: inherited( m, copyOp ),
|
||||
: osg::Object(m, copyOp),
|
||||
inherited( m, copyOp ),
|
||||
_trackNodePath( m._trackNodePath ),
|
||||
_trackerMode( m._trackerMode )
|
||||
{
|
||||
@ -281,7 +282,7 @@ bool NodeTrackerManipulator::performMovementLeftMouseButton( const double eventT
|
||||
|
||||
|
||||
// doc in parent
|
||||
bool NodeTrackerManipulator::performMovementMiddleMouseButton( const double eventTimeDelta, const double dx, const double dy )
|
||||
bool NodeTrackerManipulator::performMovementMiddleMouseButton( const double /*eventTimeDelta*/, const double /*dx*/, const double /*dy*/ )
|
||||
{
|
||||
osg::Vec3d nodeCenter;
|
||||
osg::Quat nodeRotation;
|
||||
|
@ -43,7 +43,8 @@ OrbitManipulator::OrbitManipulator( int flags )
|
||||
|
||||
/// Constructor.
|
||||
OrbitManipulator::OrbitManipulator( const OrbitManipulator& om, const CopyOp& copyOp )
|
||||
: inherited( om, copyOp ),
|
||||
: osg::Object(om, copyOp),
|
||||
inherited( om, copyOp ),
|
||||
_center( om._center ),
|
||||
_rotation( om._rotation ),
|
||||
_distance( om._distance ),
|
||||
@ -297,7 +298,7 @@ bool OrbitManipulator::performMovementMiddleMouseButton( const double eventTimeD
|
||||
|
||||
|
||||
// doc in parent
|
||||
bool OrbitManipulator::performMovementRightMouseButton( const double eventTimeDelta, const double dx, const double dy )
|
||||
bool OrbitManipulator::performMovementRightMouseButton( const double eventTimeDelta, const double /*dx*/, const double dy )
|
||||
{
|
||||
// zoom model
|
||||
zoomModel( dy * getThrowScale( eventTimeDelta ), true );
|
||||
@ -378,7 +379,7 @@ void OrbitManipulator::OrbitAnimationData::start( const osg::Vec3d& movement, co
|
||||
Scale parameter is useful, for example, when manipulator is thrown.
|
||||
It scales the amount of rotation based, for example, on the current frame time.*/
|
||||
void OrbitManipulator::rotateTrackball( const float px0, const float py0,
|
||||
const float px1, const float py1, const float scale )
|
||||
const float px1, const float py1, const float /*scale*/ )
|
||||
{
|
||||
osg::Vec3d axis;
|
||||
float angle;
|
||||
|
@ -48,7 +48,8 @@ StandardManipulator::StandardManipulator( int flags )
|
||||
|
||||
/// Constructor.
|
||||
StandardManipulator::StandardManipulator( const StandardManipulator& uim, const CopyOp& copyOp )
|
||||
: inherited( uim, copyOp ),
|
||||
: osg::Object(uim, copyOp),
|
||||
inherited( uim, copyOp ),
|
||||
_thrown( uim._thrown ),
|
||||
_allowThrow( uim._allowThrow ),
|
||||
_mouseCenterX(0.0f), _mouseCenterY(0.0f),
|
||||
@ -189,7 +190,7 @@ void StandardManipulator::home( double /*currentTime*/ )
|
||||
StandardManipulator implementation only updates its internal data.
|
||||
If home position is expected to be supported by the descendant manipulator,
|
||||
it has to reimplement the method to update manipulator transformation.*/
|
||||
void StandardManipulator::home( const GUIEventAdapter& ea, GUIActionAdapter& us )
|
||||
void StandardManipulator::home( const GUIEventAdapter& /*ea*/, GUIActionAdapter& us )
|
||||
{
|
||||
if( getAutoComputeHomePosition() )
|
||||
{
|
||||
@ -207,7 +208,7 @@ void StandardManipulator::home( const GUIEventAdapter& ea, GUIActionAdapter& us
|
||||
|
||||
|
||||
/** Start/restart the manipulator.*/
|
||||
void StandardManipulator::init( const GUIEventAdapter& ea, GUIActionAdapter& us )
|
||||
void StandardManipulator::init( const GUIEventAdapter& /*ea*/, GUIActionAdapter& us )
|
||||
{
|
||||
flushMouseEventStack();
|
||||
|
||||
@ -300,7 +301,7 @@ bool StandardManipulator::handleResize( const GUIEventAdapter& ea, GUIActionAdap
|
||||
|
||||
|
||||
/// Handles GUIEventAdapter::MOVE event.
|
||||
bool StandardManipulator::handleMouseMove( const GUIEventAdapter& ea, GUIActionAdapter& us )
|
||||
bool StandardManipulator::handleMouseMove( const GUIEventAdapter& /*ea*/, GUIActionAdapter& /*us*/ )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -388,14 +389,14 @@ bool StandardManipulator::handleKeyDown( const GUIEventAdapter& ea, GUIActionAda
|
||||
|
||||
|
||||
/// Handles GUIEventAdapter::KEYUP event.
|
||||
bool StandardManipulator::handleKeyUp( const GUIEventAdapter& ea, GUIActionAdapter& us )
|
||||
bool StandardManipulator::handleKeyUp( const GUIEventAdapter& /*ea*/, GUIActionAdapter& /*us*/ )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/// Handles GUIEventAdapter::SCROLL event.
|
||||
bool StandardManipulator::handleMouseWheel( const GUIEventAdapter& ea, GUIActionAdapter& us )
|
||||
bool StandardManipulator::handleMouseWheel( const GUIEventAdapter& /*ea*/, GUIActionAdapter& /*us*/ )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -454,7 +455,7 @@ bool StandardManipulator::performMovement()
|
||||
|
||||
/** Make movement step of manipulator.
|
||||
This method implements movement for left mouse button.*/
|
||||
bool StandardManipulator::performMovementLeftMouseButton( const double eventTimeDelta, const double dx, const double dy )
|
||||
bool StandardManipulator::performMovementLeftMouseButton( const double /*eventTimeDelta*/, const double /*dx*/, const double /*dy*/ )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -463,7 +464,7 @@ bool StandardManipulator::performMovementLeftMouseButton( const double eventTime
|
||||
/** Make movement step of manipulator.
|
||||
This method implements movement for middle mouse button
|
||||
or combination of left and right mouse button pressed together.*/
|
||||
bool StandardManipulator::performMovementMiddleMouseButton( const double eventTimeDelta, const double dx, const double dy )
|
||||
bool StandardManipulator::performMovementMiddleMouseButton( const double /*eventTimeDelta*/, const double /*dx*/, const double /*dy*/ )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -471,7 +472,7 @@ bool StandardManipulator::performMovementMiddleMouseButton( const double eventTi
|
||||
|
||||
/** Make movement step of manipulator.
|
||||
This method implements movement for right mouse button.*/
|
||||
bool StandardManipulator::performMovementRightMouseButton( const double eventTimeDelta, const double dx, const double dy )
|
||||
bool StandardManipulator::performMovementRightMouseButton( const double /*eventTimeDelta*/, const double /*dx*/, const double /*dy*/ )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -494,7 +495,7 @@ bool StandardManipulator::handleMouseDeltaMovement( const GUIEventAdapter& ea, G
|
||||
|
||||
|
||||
/// The method performs manipulator update based on relative mouse movement (mouse delta).
|
||||
bool StandardManipulator::performMouseDeltaMovement( const float dx, const float dy )
|
||||
bool StandardManipulator::performMouseDeltaMovement( const float /*dx*/, const float /*dy*/ )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -522,7 +523,7 @@ bool StandardManipulator::performAnimationMovement( const GUIEventAdapter& ea, G
|
||||
|
||||
|
||||
/// Updates manipulator by a single animation step
|
||||
void StandardManipulator::applyAnimationStep( const double currentProgress, const double prevProgress )
|
||||
void StandardManipulator::applyAnimationStep( const double /*currentProgress*/, const double /*prevProgress*/ )
|
||||
{
|
||||
}
|
||||
|
||||
@ -719,7 +720,7 @@ void StandardManipulator::fixVerticalAxis( Quat& rotation, const Vec3d& localUp,
|
||||
* right and up camera vectors are negated (changing roll by 180 degrees),
|
||||
* making pitch once again between -90..+90 degrees limits.*/
|
||||
void StandardManipulator::fixVerticalAxis( const osg::Vec3d& forward, const osg::Vec3d& up, osg::Vec3d& newUp,
|
||||
const osg::Vec3d& localUp, bool disallowFlipOver )
|
||||
const osg::Vec3d& localUp, bool /*disallowFlipOver*/ )
|
||||
{
|
||||
// right direction
|
||||
osg::Vec3d right1 = forward ^ localUp;
|
||||
@ -826,7 +827,7 @@ bool StandardManipulator::setCenterByMousePointerIntersection( const GUIEventAda
|
||||
If there is a hit, animation is started and true is returned.
|
||||
Otherwise, the method returns false.*/
|
||||
bool StandardManipulator::startAnimationByMousePointerIntersection(
|
||||
const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us )
|
||||
const osgGA::GUIEventAdapter& /*ea*/, osgGA::GUIActionAdapter& /*us*/ )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -29,7 +29,8 @@ TerrainManipulator::TerrainManipulator( int flags )
|
||||
|
||||
/// Constructor.
|
||||
TerrainManipulator::TerrainManipulator( const TerrainManipulator& tm, const CopyOp& copyOp )
|
||||
: inherited( tm, copyOp ),
|
||||
: osg::Object(tm, copyOp),
|
||||
inherited( tm, copyOp ),
|
||||
_previousUp( tm._previousUp )
|
||||
{
|
||||
}
|
||||
@ -299,7 +300,7 @@ bool TerrainManipulator::performMovementMiddleMouseButton( const double eventTim
|
||||
}
|
||||
|
||||
|
||||
bool TerrainManipulator::performMovementRightMouseButton( const double eventTimeDelta, const double dx, const double dy )
|
||||
bool TerrainManipulator::performMovementRightMouseButton( const double eventTimeDelta, const double /*dx*/, const double dy )
|
||||
{
|
||||
// zoom model
|
||||
zoomModel( dy * getThrowScale( eventTimeDelta ), false );
|
||||
|
@ -28,6 +28,7 @@ TrackballManipulator::TrackballManipulator( int flags )
|
||||
|
||||
/// Constructor.
|
||||
TrackballManipulator::TrackballManipulator( const TrackballManipulator& tm, const CopyOp& copyOp )
|
||||
: inherited( tm, copyOp )
|
||||
: osg::Object(tm, copyOp),
|
||||
inherited( tm, copyOp )
|
||||
{
|
||||
}
|
||||
|
@ -27,13 +27,13 @@ void SinkOperator::beginOperate( Program* prg )
|
||||
DomainOperator::beginOperate(prg );
|
||||
}
|
||||
|
||||
void SinkOperator::handlePoint( const Domain& domain, Particle* P, double dt )
|
||||
void SinkOperator::handlePoint( const Domain& domain, Particle* P, double /*dt*/ )
|
||||
{
|
||||
const osg::Vec3& value = getValue(P);
|
||||
kill( P, (domain.v1==value) );
|
||||
}
|
||||
|
||||
void SinkOperator::handleLineSegment( const Domain& domain, Particle* P, double dt )
|
||||
void SinkOperator::handleLineSegment( const Domain& domain, Particle* P, double /*dt*/ )
|
||||
{
|
||||
const osg::Vec3& value = getValue(P);
|
||||
osg::Vec3 offset = value - domain.v1, normal = domain.v2 - domain.v1;
|
||||
@ -43,7 +43,7 @@ void SinkOperator::handleLineSegment( const Domain& domain, Particle* P, double
|
||||
kill( P, (diff<SINK_EPSILON) );
|
||||
}
|
||||
|
||||
void SinkOperator::handleTriangle( const Domain& domain, Particle* P, double dt )
|
||||
void SinkOperator::handleTriangle( const Domain& domain, Particle* P, double /*dt*/ )
|
||||
{
|
||||
bool insideDomain = false;
|
||||
const osg::Vec3& value = getValue(P);
|
||||
@ -59,7 +59,7 @@ void SinkOperator::handleTriangle( const Domain& domain, Particle* P, double dt
|
||||
kill( P, insideDomain );
|
||||
}
|
||||
|
||||
void SinkOperator::handleRectangle( const Domain& domain, Particle* P, double dt )
|
||||
void SinkOperator::handleRectangle( const Domain& domain, Particle* P, double /*dt*/ )
|
||||
{
|
||||
bool insideDomain = false;
|
||||
const osg::Vec3& value = getValue(P);
|
||||
@ -75,21 +75,21 @@ void SinkOperator::handleRectangle( const Domain& domain, Particle* P, double dt
|
||||
kill( P, insideDomain );
|
||||
}
|
||||
|
||||
void SinkOperator::handlePlane( const Domain& domain, Particle* P, double dt )
|
||||
void SinkOperator::handlePlane( const Domain& domain, Particle* P, double /*dt*/ )
|
||||
{
|
||||
const osg::Vec3& value = getValue(P);
|
||||
bool insideDomain = (domain.plane.getNormal()*value>=-domain.plane[3]);
|
||||
kill( P, insideDomain );
|
||||
}
|
||||
|
||||
void SinkOperator::handleSphere( const Domain& domain, Particle* P, double dt )
|
||||
void SinkOperator::handleSphere( const Domain& domain, Particle* P, double /*dt*/ )
|
||||
{
|
||||
const osg::Vec3& value = getValue(P);
|
||||
float r = (value - domain.v1).length();
|
||||
kill( P, (r<=domain.r1) );
|
||||
}
|
||||
|
||||
void SinkOperator::handleBox( const Domain& domain, Particle* P, double dt )
|
||||
void SinkOperator::handleBox( const Domain& domain, Particle* P, double /*dt*/ )
|
||||
{
|
||||
const osg::Vec3& value = getValue(P);
|
||||
bool insideDomain = !(
|
||||
@ -100,7 +100,7 @@ void SinkOperator::handleBox( const Domain& domain, Particle* P, double dt )
|
||||
kill( P, insideDomain );
|
||||
}
|
||||
|
||||
void SinkOperator::handleDisk( const Domain& domain, Particle* P, double dt )
|
||||
void SinkOperator::handleDisk( const Domain& domain, Particle* P, double /*dt*/ )
|
||||
{
|
||||
bool insideDomain = false;
|
||||
const osg::Vec3& value = getValue(P);
|
||||
|
@ -95,7 +95,7 @@ public:
|
||||
indentIfRequired(); *_out << mark._name;
|
||||
}
|
||||
|
||||
virtual void writeCharArray( const char* s, unsigned int size ) {}
|
||||
virtual void writeCharArray( const char* /*s*/, unsigned int /*size*/ ) {}
|
||||
|
||||
virtual void writeWrappedString( const std::string& str )
|
||||
{
|
||||
@ -240,13 +240,13 @@ public:
|
||||
prop.set( value );
|
||||
}
|
||||
|
||||
virtual void readMark( osgDB::ObjectMark& mark )
|
||||
virtual void readMark( osgDB::ObjectMark& /*mark*/ )
|
||||
{
|
||||
std::string markString;
|
||||
readString( markString );
|
||||
}
|
||||
|
||||
virtual void readCharArray( char* s, unsigned int size ) {}
|
||||
virtual void readCharArray( char* /*s*/, unsigned int /*size*/ ) {}
|
||||
|
||||
virtual void readWrappedString( std::string& str )
|
||||
{
|
||||
|
@ -68,9 +68,9 @@ public:
|
||||
_out->write( s.c_str(), s.size() );
|
||||
}
|
||||
|
||||
virtual void writeStream( std::ostream& (*fn)(std::ostream&) ) {}
|
||||
virtual void writeStream( std::ostream& (*/*fn*/)(std::ostream&) ) {}
|
||||
|
||||
virtual void writeBase( std::ios_base& (*fn)(std::ios_base&) ) {}
|
||||
virtual void writeBase( std::ios_base& (*/*fn*/)(std::ios_base&) ) {}
|
||||
|
||||
virtual void writeGLenum( const osgDB::ObjectGLenum& value )
|
||||
{ GLenum e = value.get(); _out->write((char*)&e, osgDB::GLENUM_SIZE); }
|
||||
@ -208,9 +208,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void readStream( std::istream& (*fn)(std::istream&) ) {}
|
||||
virtual void readStream( std::istream& (*/*fn*/)(std::istream&) ) {}
|
||||
|
||||
virtual void readBase( std::ios_base& (*fn)(std::ios_base&) ) {}
|
||||
virtual void readBase( std::ios_base& (*/*fn*/)(std::ios_base&) ) {}
|
||||
|
||||
virtual void readGLenum( osgDB::ObjectGLenum& value )
|
||||
{
|
||||
|
@ -150,7 +150,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void writeCharArray( const char* s, unsigned int size ) {}
|
||||
virtual void writeCharArray( const char* /*s*/, unsigned int /*size*/ ) {}
|
||||
|
||||
virtual void writeWrappedString( const std::string& str )
|
||||
{
|
||||
@ -429,9 +429,9 @@ public:
|
||||
prop.set( value );
|
||||
}
|
||||
|
||||
virtual void readMark( osgDB::ObjectMark& mark ) {}
|
||||
virtual void readMark( osgDB::ObjectMark& /*mark*/ ) {}
|
||||
|
||||
virtual void readCharArray( char* s, unsigned int size ) {}
|
||||
virtual void readCharArray( char* /*s*/, unsigned int /*size*/ ) {}
|
||||
|
||||
virtual void readWrappedString( std::string& str )
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ KeyEventHandler::KeyEventHandler(int key, const osgPresentation::KeyPosition& ke
|
||||
{
|
||||
}
|
||||
|
||||
bool KeyEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa, osg::Object*, osg::NodeVisitor* nv)
|
||||
bool KeyEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& /*aa*/, osg::Object*, osg::NodeVisitor* /*nv*/)
|
||||
{
|
||||
if (ea.getHandled()) return false;
|
||||
|
||||
|
@ -140,19 +140,19 @@ public:
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void combineRotationUserValue(T& value) const
|
||||
void combineRotationUserValue(T& /*value*/) const
|
||||
{
|
||||
OSG_NOTICE<<"combineRotationUserValue TODO - do slerp"<<std::endl;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void combinePlaneUserValue(T& value) const
|
||||
void combinePlaneUserValue(T& /*value*/) const
|
||||
{
|
||||
OSG_NOTICE<<"combinePlaneUserValue TODO"<<std::endl;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void combineMatrixUserValue(T& value) const
|
||||
void combineMatrixUserValue(T& /*value*/) const
|
||||
{
|
||||
OSG_NOTICE<<"combineMatrixUserValue TODO - decomposs into translate, rotation and scale and then interpolate."<<std::endl;
|
||||
}
|
||||
@ -190,7 +190,7 @@ void PropertyAnimation::update(osg::Node& node)
|
||||
double time = getAnimationTime();
|
||||
|
||||
if (_keyFrameMap.empty()) return;
|
||||
|
||||
|
||||
KeyFrameMap::const_iterator itr = _keyFrameMap.lower_bound(time);
|
||||
if (itr==_keyFrameMap.begin())
|
||||
{
|
||||
@ -223,9 +223,9 @@ void PropertyAnimation::update(osg::Node& node)
|
||||
// clone all the properties from p1;
|
||||
|
||||
osg::ref_ptr<osg::UserDataContainer> destination = node.getOrCreateUserDataContainer();
|
||||
|
||||
|
||||
assign(destination.get(), p1);
|
||||
|
||||
|
||||
for(unsigned int i2=0; i2<p2->getNumUserObjects(); ++i2)
|
||||
{
|
||||
osg::Object* obj_2 = p2->getUserObject(i2);
|
||||
@ -256,7 +256,7 @@ void PropertyAnimation::update(osg::Node& node)
|
||||
// need to insert property;
|
||||
assign(destination.get(), obj_2);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -265,7 +265,7 @@ void PropertyAnimation::update(osg::Node& node)
|
||||
OSG_NOTICE<<"PropertyAnimation::update() : copy last UserDataContainer"<<std::endl;
|
||||
assign(node.getOrCreateUserDataContainer(), _keyFrameMap.rbegin()->second.get());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void PropertyAnimation::assign(osg::UserDataContainer* destination, osg::UserDataContainer* source)
|
||||
@ -282,14 +282,14 @@ void PropertyAnimation::assign(osg::UserDataContainer* destination, osg::UserDat
|
||||
void PropertyAnimation::assign(osg::UserDataContainer* udc, osg::Object* obj)
|
||||
{
|
||||
if (!obj) return;
|
||||
|
||||
|
||||
unsigned int index = udc->getUserObjectIndex(obj);
|
||||
if (index != udc->getNumUserObjects())
|
||||
{
|
||||
OSG_NOTICE<<"Object already assigned to UserDataContainer"<<std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
index = udc->getUserObjectIndex(obj->getName());
|
||||
if (index != udc->getNumUserObjects())
|
||||
{
|
||||
@ -312,14 +312,14 @@ void ImageSequenceUpdateCallback::operator()(osg::Node* node, osg::NodeVisitor*
|
||||
double xMin = -1.0;
|
||||
double xMax = 1.0;
|
||||
double position = ((double)x-xMin)/(xMax-xMin)*_imageSequence->getLength();
|
||||
|
||||
|
||||
_imageSequence->seek(position);
|
||||
}
|
||||
else
|
||||
{
|
||||
OSG_INFO<<"ImageSequenceUpdateCallback::operator() Could not find property : "<<_propertyName<<std::endl;
|
||||
}
|
||||
|
||||
|
||||
// note, callback is responsible for scenegraph traversal so
|
||||
// they must call traverse(node,nv) to ensure that the
|
||||
// scene graph subtree (and associated callbacks) are traversed.
|
||||
@ -335,12 +335,12 @@ bool PropertyEventCallback::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAc
|
||||
ea.getEventType()==osgGA::GUIEventAdapter::PUSH ||
|
||||
ea.getEventType()==osgGA::GUIEventAdapter::RELEASE);
|
||||
if(mouseEvent)
|
||||
{
|
||||
{
|
||||
_propertyManager->setProperty("mouse.x",ea.getX());
|
||||
_propertyManager->setProperty("mouse.x_normalized",ea.getXnormalized());
|
||||
_propertyManager->setProperty("mouse.y",ea.getX());
|
||||
_propertyManager->setProperty("mouse.y_normalized",ea.getYnormalized());
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ bool JumpData::jump(SlideEventHandler* seh) const
|
||||
|
||||
int slideNumToUse = slideNum;
|
||||
int layerNumToUse = layerNum;
|
||||
|
||||
|
||||
if (!slideName.empty())
|
||||
{
|
||||
osg::Switch* presentation = seh->getPresentationSwitch();
|
||||
@ -63,7 +63,7 @@ bool JumpData::jump(SlideEventHandler* seh) const
|
||||
{
|
||||
slideNumToUse = seh->getActiveSlide() + slideNum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!layerName.empty())
|
||||
{
|
||||
@ -98,10 +98,10 @@ bool JumpData::jump(SlideEventHandler* seh) const
|
||||
{
|
||||
layerNumToUse = seh->getActiveLayer() + layerNum;
|
||||
}
|
||||
|
||||
|
||||
if (slideNumToUse<0) slideNumToUse = 0;
|
||||
if (layerNumToUse<0) layerNumToUse = 0;
|
||||
|
||||
|
||||
OSG_INFO<<" jump to "<<slideNumToUse<<", "<<layerNumToUse<<std::endl;
|
||||
return seh->selectSlide(slideNumToUse,layerNumToUse);
|
||||
}
|
||||
@ -142,15 +142,15 @@ struct InteractiveImageSequenceOperator : public ObjectOperator
|
||||
// need to pause till the load has been completed.
|
||||
}
|
||||
|
||||
virtual void maintain(SlideEventHandler* seh)
|
||||
virtual void maintain(SlideEventHandler* /*seh*/)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void leave(SlideEventHandler* seh)
|
||||
virtual void leave(SlideEventHandler* /*seh*/)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void setPause(SlideEventHandler* seh, bool pause)
|
||||
virtual void setPause(SlideEventHandler* /*seh*/, bool /*pause*/)
|
||||
{
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@ struct InteractiveImageSequenceOperator : public ObjectOperator
|
||||
set(seh);
|
||||
}
|
||||
|
||||
void set(SlideEventHandler* seh)
|
||||
void set(SlideEventHandler* /*seh*/)
|
||||
{
|
||||
//OSG_NOTICE<<"InteractiveImageSequenceOperator::set(..)"<<std::endl;
|
||||
}
|
||||
@ -245,7 +245,7 @@ struct ImageStreamOperator : public ObjectOperator
|
||||
|
||||
_timeOfLastReset = seh->getReferenceTime();
|
||||
_stopped = false;
|
||||
|
||||
|
||||
if (_delayTime==0.0)
|
||||
{
|
||||
start(seh);
|
||||
@ -258,7 +258,7 @@ struct ImageStreamOperator : public ObjectOperator
|
||||
|
||||
_started = true;
|
||||
_stopped = false;
|
||||
|
||||
|
||||
if (_startTime!=0.0) _imageStream->seek(_startTime);
|
||||
else _imageStream->rewind();
|
||||
|
||||
@ -271,13 +271,13 @@ struct ImageStreamOperator : public ObjectOperator
|
||||
OpenThreads::Thread::microSleep(static_cast<unsigned int>(microSecondsToDelay));
|
||||
}
|
||||
|
||||
void stop(SlideEventHandler* seh)
|
||||
void stop(SlideEventHandler* /*seh*/)
|
||||
{
|
||||
if (!_started) return;
|
||||
|
||||
_started = false;
|
||||
_stopped = true;
|
||||
|
||||
|
||||
_imageStream->pause();
|
||||
}
|
||||
|
||||
@ -341,7 +341,7 @@ struct CallbackOperator : public ObjectOperator
|
||||
{
|
||||
OSG_NOTICE<<"Need to pause callback : "<<nc->className()<<std::endl;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
virtual void reset(SlideEventHandler*)
|
||||
@ -445,7 +445,7 @@ struct LayerAttributesOperator : public ObjectOperator
|
||||
_layerAttribute->callLeaveCallbacks(_node.get());
|
||||
}
|
||||
|
||||
virtual void setPause(SlideEventHandler*, bool pause)
|
||||
virtual void setPause(SlideEventHandler*, bool /*pause*/)
|
||||
{
|
||||
}
|
||||
|
||||
@ -1001,7 +1001,7 @@ bool SlideEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAction
|
||||
if (ea.getHandled()) return false;
|
||||
|
||||
_referenceTime = ea.getTime();
|
||||
|
||||
|
||||
switch(ea.getEventType())
|
||||
{
|
||||
case(osgGA::GUIEventAdapter::FRAME):
|
||||
@ -1245,7 +1245,7 @@ unsigned int SlideEventHandler::getNumSlides()
|
||||
osg::Switch* SlideEventHandler::getSlide(int slideNum)
|
||||
{
|
||||
if (slideNum<0 || slideNum>static_cast<int>(_presentationSwitch->getNumChildren())) return 0;
|
||||
|
||||
|
||||
FindNamedSwitchVisitor findSlide("Slide");
|
||||
_presentationSwitch->getChild(slideNum)->accept(findSlide);
|
||||
return findSlide._switch;
|
||||
@ -1335,7 +1335,7 @@ bool SlideEventHandler::selectSlide(int slideNum,int layerNum)
|
||||
|
||||
_viewer->computeActiveCoordinateSystemNodePath();
|
||||
}
|
||||
|
||||
|
||||
// resetUpdateCallbacks(ALL_OBJECTS);
|
||||
|
||||
bool _useSlideFilePaths = false;
|
||||
@ -1493,7 +1493,7 @@ bool SlideEventHandler::home(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAd
|
||||
}
|
||||
_viewer->getCameraManipulator()->home(ea,aa);
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -816,7 +816,7 @@ public:
|
||||
texture->setFilter(osg::Texture::MAG_FILTER,osg::Texture::LINEAR);
|
||||
#if USE_CLIENT_STORAGE_HINT
|
||||
texture->setClientStorageHint(true);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -845,13 +845,13 @@ osg::Geometry* SlideShowConstructor::createTexturedQuadGeometry(const osg::Vec3&
|
||||
heightVec = heightVec*rotationMatrix;
|
||||
|
||||
osg::ImageStream* imageStream = dynamic_cast<osg::ImageStream*>(image);
|
||||
|
||||
|
||||
// let the video-plugin create a texture for us, if supported
|
||||
if(imageStream && getenv("P3D_ENABLE_CORE_VIDEO"))
|
||||
{
|
||||
texture = imageStream->createSuitableTexture();
|
||||
}
|
||||
|
||||
|
||||
bool flipYAxis = image->getOrigin()==osg::Image::TOP_LEFT;
|
||||
|
||||
#if 1
|
||||
@ -863,7 +863,7 @@ osg::Geometry* SlideShowConstructor::createTexturedQuadGeometry(const osg::Vec3&
|
||||
bool useTextureRectangle = true;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// pass back info on wether texture 2D is used.
|
||||
usedTextureRectangle = useTextureRectangle;
|
||||
|
||||
@ -880,10 +880,10 @@ osg::Geometry* SlideShowConstructor::createTexturedQuadGeometry(const osg::Vec3&
|
||||
texture->setResizeNonPowerOfTwoHint(false);
|
||||
texture->setFilter(osg::Texture::MIN_FILTER,osg::Texture::LINEAR);
|
||||
texture->setFilter(osg::Texture::MAG_FILTER,osg::Texture::LINEAR);
|
||||
#if USE_CLIENT_STORAGE_HINT
|
||||
#if USE_CLIENT_STORAGE_HINT
|
||||
texture->setClientStorageHint(true);
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
if (texture)
|
||||
@ -891,23 +891,23 @@ osg::Geometry* SlideShowConstructor::createTexturedQuadGeometry(const osg::Vec3&
|
||||
float t(0), l(0);
|
||||
float r = (texture->getTextureTarget() == GL_TEXTURE_RECTANGLE) ? image->s() : 1;
|
||||
float b = (texture->getTextureTarget() == GL_TEXTURE_RECTANGLE) ? image->t() : 1;
|
||||
|
||||
|
||||
if (flipYAxis)
|
||||
std::swap(t,b);
|
||||
|
||||
|
||||
pictureQuad = osg::createTexturedQuadGeometry(positionVec,
|
||||
widthVec,
|
||||
heightVec,
|
||||
l, t, r, b);
|
||||
|
||||
|
||||
stateset = pictureQuad->getOrCreateStateSet();
|
||||
stateset->setTextureAttributeAndModes(0,
|
||||
texture.get(),
|
||||
osg::StateAttribute::ON);
|
||||
}
|
||||
|
||||
|
||||
if (!pictureQuad) return 0;
|
||||
|
||||
|
||||
if (imageStream)
|
||||
{
|
||||
imageStream->pause();
|
||||
@ -916,7 +916,7 @@ osg::Geometry* SlideShowConstructor::createTexturedQuadGeometry(const osg::Vec3&
|
||||
#if USE_CLIENT_STORAGE_HINT
|
||||
// make sure that OSX uses the client storage extension to accelerate peformance where possible.
|
||||
texture->setClientStorageHint(true);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -1003,7 +1003,7 @@ osg::Image* SlideShowConstructor::readImage(const std::string& filename, const I
|
||||
}
|
||||
filenames.push_back(foundFile);
|
||||
}
|
||||
|
||||
|
||||
if (filenames.empty()) return 0;
|
||||
|
||||
if (filenames.size()==1)
|
||||
@ -1044,7 +1044,7 @@ osg::Image* SlideShowConstructor::readImage(const std::string& filename, const I
|
||||
{
|
||||
osg::ref_ptr<osg::Image> loadedImage = osgDB::readImageFile(*itr, options.get());
|
||||
if (loadedImage.valid())
|
||||
{
|
||||
{
|
||||
imageSequence->addImage(loadedImage.get());
|
||||
firstLoad = false;
|
||||
}
|
||||
@ -1065,7 +1065,7 @@ osg::Image* SlideShowConstructor::readImage(const std::string& filename, const I
|
||||
OSG_NOTICE<<"No Object _options assigned"<<std::endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
osg::ref_ptr<osgDB::Options> options = _options.valid() ? _options->cloneOptions() : (new osgDB::Options);
|
||||
if (!imageData.options.empty())
|
||||
{
|
||||
@ -1094,7 +1094,7 @@ osg::Image* SlideShowConstructor::readImage(const std::string& filename, const I
|
||||
{
|
||||
imageSequence->setName("USE_MOUSE_Y_POSITION");
|
||||
}
|
||||
|
||||
|
||||
|
||||
imageSequence->play();
|
||||
|
||||
@ -1205,7 +1205,7 @@ void SlideShowConstructor::addImage(const std::string& filename, const PositionD
|
||||
isImageTranslucent = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
float s = image->s();
|
||||
float t = image->t();
|
||||
|
||||
@ -1265,13 +1265,13 @@ void SlideShowConstructor::addImage(const std::string& filename, const PositionD
|
||||
}
|
||||
|
||||
|
||||
if (imageStream && !imageData.volume.empty())
|
||||
if (imageStream && !imageData.volume.empty())
|
||||
{
|
||||
setUpMovieVolume(subgraph, imageStream, imageData);
|
||||
}
|
||||
|
||||
osg::ImageSequence* imageSequence = dynamic_cast<osg::ImageSequence*>(image.get());
|
||||
if (imageSequence)
|
||||
if (imageSequence)
|
||||
{
|
||||
if (imageData.imageSequenceInteractionMode==ImageData::USE_MOUSE_X_POSITION)
|
||||
{
|
||||
@ -1282,7 +1282,7 @@ void SlideShowConstructor::addImage(const std::string& filename, const PositionD
|
||||
subgraph->setUpdateCallback(new osgPresentation::ImageSequenceUpdateCallback(imageSequence, _propertyManager.get(), "mouse.y_normalized"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// attached any rotation
|
||||
if (positionData.rotation[0]!=0.0)
|
||||
{
|
||||
@ -1339,7 +1339,7 @@ void SlideShowConstructor::addStereoImagePair(const std::string& filenameLeft, c
|
||||
{
|
||||
osg::ref_ptr<osg::Image> imageLeft = readImage(filenameLeft, imageDataLeft);
|
||||
osg::ref_ptr<osg::Image> imageRight = (filenameRight==filenameLeft) ? imageLeft.get() : readImage(filenameRight, imageDataRight);
|
||||
|
||||
|
||||
if (!imageLeft && !imageRight) return;
|
||||
|
||||
bool isImageTranslucent = false;
|
||||
@ -1935,14 +1935,14 @@ void SlideShowConstructor::addModel(const std::string& filename, const PositionD
|
||||
osg::ref_ptr<osg::ClipNode> clipnode = new osg::ClipNode;
|
||||
clipnode->createClipBox(osg::BoundingBox(0.0,0.0,0.0,1.0,1.0,1.0),0);
|
||||
clipnode->setCullingActive(false);
|
||||
|
||||
|
||||
osg::ref_ptr<osg::MatrixTransform> transform = new osg::MatrixTransform;
|
||||
transform->addChild(clipnode.get());
|
||||
|
||||
osg::ref_ptr<osg::Group> group = new osg::Group;
|
||||
group->addChild(subgraph.get());
|
||||
group->addChild(transform.get());
|
||||
|
||||
|
||||
//clipnode->setStateSetModes(*(group->getOrCreateStateSet()), osg::StateAttribute::ON);
|
||||
group->setStateSet(clipnode->getStateSet());
|
||||
|
||||
@ -1975,10 +1975,10 @@ void SlideShowConstructor::addModel(const std::string& filename, const PositionD
|
||||
subgraph = group;
|
||||
|
||||
osgDB::writeNodeFile(*subgraph, "output.osgt");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (subgraph.valid())
|
||||
{
|
||||
addModel(subgraph.get(), positionData, modelData);
|
||||
@ -2237,9 +2237,9 @@ class VolumeTileCallback : public osg::NodeCallback
|
||||
META_Object(osgPresentation, VolumeTileCallback);
|
||||
|
||||
void reset() {}
|
||||
void update(osg::Node* node) {}
|
||||
void setPause(bool pause) {}
|
||||
|
||||
void update(osg::Node* /*node*/) {}
|
||||
void setPause(bool /*pause*/) {}
|
||||
|
||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||
{
|
||||
osgVolume::VolumeTile* tile = dynamic_cast<osgVolume::VolumeTile*>(node);
|
||||
@ -2248,13 +2248,13 @@ class VolumeTileCallback : public osg::NodeCallback
|
||||
{
|
||||
OSG_NOTICE<<"VolumeTileCallback : Have locator matrix "<<locator->getTransform()<<std::endl;
|
||||
}
|
||||
|
||||
|
||||
// note, callback is responsible for scenegraph traversal so
|
||||
// they must call traverse(node,nv) to ensure that the
|
||||
// scene graph subtree (and associated callbacks) are traversed.
|
||||
traverse(node,nv);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -2301,7 +2301,7 @@ public:
|
||||
{
|
||||
OSG_NOTICE<<"VolumeRegionCallback not attached to VolumeTile, unable to update any values."<<std::endl;
|
||||
}
|
||||
|
||||
|
||||
// note, callback is responsible for scenegraph traversal so
|
||||
// they must call traverse(node,nv) to ensure that the
|
||||
// scene graph subtree (and associated callbacks) are traversed.
|
||||
@ -2348,7 +2348,7 @@ protected:
|
||||
|
||||
osgVolume::ScalarProperty* _sp;
|
||||
std::string _source;
|
||||
};
|
||||
};
|
||||
|
||||
void SlideShowConstructor::setUpVolumeScalarProperty(osgVolume::VolumeTile* tile, osgVolume::ScalarProperty* property, const std::string& source)
|
||||
{
|
||||
@ -2459,7 +2459,7 @@ void SlideShowConstructor::addVolume(const std::string& filename, const Position
|
||||
image->swap(*converted_image);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (positionData.scale.x()<0.0)
|
||||
{
|
||||
image->flipHorizontal();
|
||||
@ -2537,7 +2537,7 @@ void SlideShowConstructor::addVolume(const std::string& filename, const Position
|
||||
layer->setLocator(new osgVolume::Locator());
|
||||
tile->setLocator(new osgVolume::Locator());
|
||||
}
|
||||
|
||||
|
||||
if (!volumeData.region.empty())
|
||||
{
|
||||
if (containsPropertyReference(volumeData.region))
|
||||
@ -2563,14 +2563,14 @@ void SlideShowConstructor::addVolume(const std::string& filename, const Position
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tile->setLayer(layer.get());
|
||||
|
||||
osgVolume::SwitchProperty* sp = new osgVolume::SwitchProperty;
|
||||
sp->setActiveProperty(0);
|
||||
|
||||
|
||||
|
||||
|
||||
osgVolume::AlphaFuncProperty* ap = new osgVolume::AlphaFuncProperty(0.1f);
|
||||
setUpVolumeScalarProperty(tile.get(), ap, volumeData.cutoffValue);
|
||||
|
||||
@ -2586,7 +2586,7 @@ void SlideShowConstructor::addVolume(const std::string& filename, const Position
|
||||
sdm = new osgVolume::SampleDensityWhenMovingProperty(0.005);
|
||||
setUpVolumeScalarProperty(tile.get(), sdm, volumeData.sampleDensityWhenMovingValue);
|
||||
}
|
||||
|
||||
|
||||
osgVolume::TransferFunctionProperty* tfp = volumeData.transferFunction.valid() ? new osgVolume::TransferFunctionProperty(volumeData.transferFunction.get()) : 0;
|
||||
|
||||
{
|
||||
@ -2620,7 +2620,7 @@ void SlideShowConstructor::addVolume(const std::string& filename, const Position
|
||||
cp->addProperty(sd);
|
||||
cp->addProperty(tp);
|
||||
|
||||
|
||||
|
||||
osgVolume::IsoSurfaceProperty* isp = new osgVolume::IsoSurfaceProperty(0.1);
|
||||
setUpVolumeScalarProperty(tile.get(), isp, volumeData.alphaValue);
|
||||
cp->addProperty(isp);
|
||||
@ -2659,7 +2659,7 @@ void SlideShowConstructor::addVolume(const std::string& filename, const Position
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
osg::ref_ptr<osg::Node> model = volume.get();
|
||||
|
||||
if (volumeData.useTabbedDragger || volumeData.useTrackballDragger)
|
||||
|
@ -441,7 +441,7 @@ bool GraphicsWindowQt::init( QWidget* parent, const QGLWidget* shareWidget, Qt::
|
||||
|
||||
// make sure the event queue has the correct window rectangle size and input range
|
||||
getEventQueue()->syncWindowRectangleWithGraphcisContext();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -659,7 +659,7 @@ bool GraphicsWindowQt::realizeImplementation()
|
||||
|
||||
// make sure the event queue has the correct window rectangle size and input range
|
||||
getEventQueue()->syncWindowRectangleWithGraphcisContext();
|
||||
|
||||
|
||||
// make this window's context not current
|
||||
// note: this must be done as we will probably make the context current from another thread
|
||||
// and it is not allowed to have one context current in two threads
|
||||
@ -764,7 +764,7 @@ public:
|
||||
}
|
||||
|
||||
// Return the number of screens present in the system
|
||||
virtual unsigned int getNumScreens( const osg::GraphicsContext::ScreenIdentifier& si )
|
||||
virtual unsigned int getNumScreens( const osg::GraphicsContext::ScreenIdentifier& /*si*/ )
|
||||
{
|
||||
OSG_WARN << "osgQt: getNumScreens() not implemented yet." << std::endl;
|
||||
return 0;
|
||||
@ -772,20 +772,20 @@ public:
|
||||
|
||||
// Return the resolution of specified screen
|
||||
// (0,0) is returned if screen is unknown
|
||||
virtual void getScreenSettings( const osg::GraphicsContext::ScreenIdentifier& si, osg::GraphicsContext::ScreenSettings & resolution )
|
||||
virtual void getScreenSettings( const osg::GraphicsContext::ScreenIdentifier& /*si*/, osg::GraphicsContext::ScreenSettings & /*resolution*/ )
|
||||
{
|
||||
OSG_WARN << "osgQt: getScreenSettings() not implemented yet." << std::endl;
|
||||
}
|
||||
|
||||
// Set the resolution for given screen
|
||||
virtual bool setScreenSettings( const osg::GraphicsContext::ScreenIdentifier& si, const osg::GraphicsContext::ScreenSettings & resolution )
|
||||
virtual bool setScreenSettings( const osg::GraphicsContext::ScreenIdentifier& /*si*/, const osg::GraphicsContext::ScreenSettings & /*resolution*/ )
|
||||
{
|
||||
OSG_WARN << "osgQt: setScreenSettings() not implemented yet." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Enumerates available resolutions
|
||||
virtual void enumerateScreenSettings( const osg::GraphicsContext::ScreenIdentifier& screenIdentifier, osg::GraphicsContext::ScreenSettingsList & resolution )
|
||||
virtual void enumerateScreenSettings( const osg::GraphicsContext::ScreenIdentifier& /*screenIdentifier*/, osg::GraphicsContext::ScreenSettingsList & /*resolution*/ )
|
||||
{
|
||||
OSG_WARN << "osgQt: enumerateScreenSettings() not implemented yet." << std::endl;
|
||||
}
|
||||
@ -875,7 +875,7 @@ void HeartBeat::init( osgViewer::ViewerBase *viewer )
|
||||
}
|
||||
|
||||
|
||||
void HeartBeat::timerEvent( QTimerEvent *event )
|
||||
void HeartBeat::timerEvent( QTimerEvent */*event*/ )
|
||||
{
|
||||
osg::ref_ptr< osgViewer::ViewerBase > viewer;
|
||||
if( !_viewer.lock( viewer ) )
|
||||
|
@ -122,7 +122,7 @@ QFontImplementation::getGlyph(const osgText::FontResolution& fontRes, unsigned i
|
||||
}
|
||||
|
||||
osg::Vec2
|
||||
QFontImplementation::getKerning(unsigned int leftcharcode, unsigned int rightcharcode, osgText::KerningType kerningType)
|
||||
QFontImplementation::getKerning(unsigned int /*leftcharcode*/, unsigned int /*rightcharcode*/, osgText::KerningType /*kerningType*/)
|
||||
{
|
||||
return osg::Vec2(0, 0);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ void QWidgetImage::render()
|
||||
_adapter->render();
|
||||
}
|
||||
|
||||
void QWidgetImage::scaleImage(int s,int t,int r, GLenum newDataType)
|
||||
void QWidgetImage::scaleImage(int s,int t,int /*r*/, GLenum /*newDataType*/)
|
||||
{
|
||||
_adapter->resize(s, t);
|
||||
}
|
||||
|
@ -1162,7 +1162,9 @@ bool ConvexPolyhedron::checkCoherency
|
||||
dumpGeometry( );
|
||||
#endif
|
||||
|
||||
|
||||
#else
|
||||
OSG_UNUSED(checkForNonConvexPolys);
|
||||
OSG_UNUSED(errorPrefix);
|
||||
#endif // CONVEX_POLYHEDRON_CHECK_COHERENCY
|
||||
return result && convex;
|
||||
}
|
||||
|
@ -154,6 +154,9 @@ bool DebugShadowMap::ViewData::DebugBoundingBox
|
||||
<< std::endl;
|
||||
|
||||
bb_prev = bb;
|
||||
#else
|
||||
OSG_UNUSED(bb);
|
||||
OSG_UNUSED(name);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
@ -192,6 +195,9 @@ bool DebugShadowMap::ViewData::DebugPolytope
|
||||
}
|
||||
|
||||
p_prev = p;
|
||||
#else
|
||||
OSG_UNUSED(p);
|
||||
OSG_UNUSED(name);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
@ -215,6 +221,9 @@ bool DebugShadowMap::ViewData::DebugMatrix
|
||||
<<"[ " << m(3,0) << " " << m(3,1) << " " << m(3,2) << " " << m(3,3) << " ] " << std::endl;
|
||||
|
||||
m_prev = m;
|
||||
#else
|
||||
OSG_UNUSED(m);
|
||||
OSG_UNUSED(name);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
@ -336,7 +336,7 @@ void MinimalShadowMap::ViewData::init( ThisClass *st, osgUtil::CullVisitor *cv )
|
||||
}
|
||||
|
||||
void MinimalShadowMap::ViewData::cutScenePolytope
|
||||
( const osg::Matrix & transform,
|
||||
( const osg::Matrix & /*transform*/,
|
||||
const osg::Matrix & inverse,
|
||||
const osg::BoundingBox & bb )
|
||||
{
|
||||
|
@ -704,7 +704,7 @@ void ViewDependentShadowMap::cleanSceneGraph()
|
||||
OSG_INFO<<"ViewDependentShadowMap::cleanSceneGraph()"<<std::endl;
|
||||
}
|
||||
|
||||
ViewDependentShadowMap::ViewDependentData* ViewDependentShadowMap::createViewDependentData(osgUtil::CullVisitor* cv)
|
||||
ViewDependentShadowMap::ViewDependentData* ViewDependentShadowMap::createViewDependentData(osgUtil::CullVisitor* /*cv*/)
|
||||
{
|
||||
return new ViewDependentData(this);
|
||||
}
|
||||
@ -804,7 +804,7 @@ void ViewDependentShadowMap::cull(osgUtil::CullVisitor& cv)
|
||||
if (minZNear>maxZFar) minZNear = maxZFar*settings->getMinimumShadowMapNearFarRatio();
|
||||
|
||||
//OSG_NOTICE<<"maxZFar "<<maxZFar<<std::endl;
|
||||
|
||||
|
||||
Frustum frustum(&cv, minZNear, maxZFar);
|
||||
|
||||
// return compute near far mode back to it's original settings
|
||||
@ -1963,7 +1963,7 @@ struct RenderLeafBounds
|
||||
double min_z, max_z;
|
||||
};
|
||||
|
||||
bool ViewDependentShadowMap::adjustPerspectiveShadowMapCameraSettings(osgUtil::RenderStage* renderStage, Frustum& frustum, LightData& positionedLight, osg::Camera* camera)
|
||||
bool ViewDependentShadowMap::adjustPerspectiveShadowMapCameraSettings(osgUtil::RenderStage* renderStage, Frustum& frustum, LightData& /*positionedLight*/, osg::Camera* camera)
|
||||
{
|
||||
const ShadowSettings* settings = getShadowedScene()->getShadowSettings();
|
||||
|
||||
@ -2347,7 +2347,7 @@ osg::StateSet* ViewDependentShadowMap::selectStateSetForRenderingShadow(ViewDepe
|
||||
osg::ref_ptr<osg::StateSet> stateset = vdd.getStateSet();
|
||||
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_accessUnfiromsAndProgramMutex);
|
||||
|
||||
|
||||
vdd.getStateSet()->clear();
|
||||
|
||||
vdd.getStateSet()->setTextureAttributeAndModes(0, _fallbackBaseTexture.get(), osg::StateAttribute::ON);
|
||||
@ -2416,7 +2416,7 @@ osg::StateSet* ViewDependentShadowMap::selectStateSetForRenderingShadow(ViewDepe
|
||||
return vdd.getStateSet();
|
||||
}
|
||||
|
||||
void ViewDependentShadowMap::resizeGLObjectBuffers(unsigned int maxSize)
|
||||
void ViewDependentShadowMap::resizeGLObjectBuffers(unsigned int /*maxSize*/)
|
||||
{
|
||||
// the way that ViewDependentData is mapped shouldn't
|
||||
}
|
||||
|
@ -262,19 +262,19 @@ bool ImageLayer::getValue(unsigned int i, unsigned int j, float& value) const
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ImageLayer::getValue(unsigned int i, unsigned int j, osg::Vec2& value) const
|
||||
bool ImageLayer::getValue(unsigned int /*i*/, unsigned int /*j*/, osg::Vec2& /*value*/) const
|
||||
{
|
||||
OSG_NOTICE<<"Not implemented yet"<<std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ImageLayer::getValue(unsigned int i, unsigned int j, osg::Vec3& value) const
|
||||
bool ImageLayer::getValue(unsigned int /*i*/, unsigned int /*j*/, osg::Vec3& /*value*/) const
|
||||
{
|
||||
OSG_NOTICE<<"Not implemented yet"<<std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ImageLayer::getValue(unsigned int i, unsigned int j, osg::Vec4& value) const
|
||||
bool ImageLayer::getValue(unsigned int /*i*/, unsigned int /*j*/, osg::Vec4& /*value*/) const
|
||||
{
|
||||
OSG_NOTICE<<"Not implemented yet"<<std::endl;
|
||||
return false;
|
||||
@ -345,7 +345,7 @@ bool ContourLayer::transform(float offset, float scale)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ContourLayer::getValue(unsigned int i, unsigned int j, float& value) const
|
||||
bool ContourLayer::getValue(unsigned int i, unsigned int /*j*/, float& value) const
|
||||
{
|
||||
if (!_tf) return false;
|
||||
|
||||
@ -355,7 +355,7 @@ bool ContourLayer::getValue(unsigned int i, unsigned int j, float& value) const
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ContourLayer::getValue(unsigned int i, unsigned int j, osg::Vec2& value) const
|
||||
bool ContourLayer::getValue(unsigned int i, unsigned int /*j*/, osg::Vec2& value) const
|
||||
{
|
||||
if (!_tf) return false;
|
||||
|
||||
@ -366,7 +366,7 @@ bool ContourLayer::getValue(unsigned int i, unsigned int j, osg::Vec2& value) co
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ContourLayer::getValue(unsigned int i, unsigned int j, osg::Vec3& value) const
|
||||
bool ContourLayer::getValue(unsigned int i, unsigned int /*j*/, osg::Vec3& value) const
|
||||
{
|
||||
if (!_tf) return false;
|
||||
|
||||
@ -378,7 +378,7 @@ bool ContourLayer::getValue(unsigned int i, unsigned int j, osg::Vec3& value) co
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ContourLayer::getValue(unsigned int i, unsigned int j, osg::Vec4& value) const
|
||||
bool ContourLayer::getValue(unsigned int i, unsigned int /*j*/, osg::Vec4& value) const
|
||||
{
|
||||
if (!_tf) return false;
|
||||
|
||||
|
@ -83,7 +83,7 @@ void TerrainTechnique::setTerrainTile(TerrainTile* tile)
|
||||
_terrainTile = tile;
|
||||
}
|
||||
|
||||
void TerrainTechnique::init(int dirtyMask, bool assumeMultiThreaded)
|
||||
void TerrainTechnique::init(int /*dirtyMask*/, bool /*assumeMultiThreaded*/)
|
||||
{
|
||||
OSG_NOTICE<<className()<<"::init(..) not implementated yet"<<std::endl;
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library 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
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@ -33,11 +33,11 @@ public:
|
||||
virtual bool supportsMultipleFontResolutions() const { return false; }
|
||||
|
||||
virtual osgText::Glyph* getGlyph(const FontResolution& fontRes, unsigned int charcode);
|
||||
|
||||
virtual osgText::Glyph3D* getGlyph3D(unsigned int charcode) { return 0; }
|
||||
|
||||
virtual osgText::Glyph3D* getGlyph3D(unsigned int /*charcode*/) { return 0; }
|
||||
|
||||
virtual osg::Vec2 getKerning(unsigned int leftcharcode,unsigned int rightcharcode, KerningType kerningType);
|
||||
|
||||
|
||||
virtual bool hasVertical() const;
|
||||
|
||||
virtual float getScale() const { return 1.0; }
|
||||
@ -45,10 +45,10 @@ public:
|
||||
protected:
|
||||
|
||||
virtual ~DefaultFont();
|
||||
|
||||
|
||||
void constructGlyphs();
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ void Bevel::roundedBevel2(float width, unsigned int numSteps)
|
||||
|
||||
}
|
||||
|
||||
void Bevel::print(std::ostream& fout)
|
||||
void Bevel::print(std::ostream& /*fout*/)
|
||||
{
|
||||
OSG_NOTICE<<"print bevel"<<std::endl;
|
||||
for(Vertices::iterator itr = _vertices.begin();
|
||||
|
@ -58,6 +58,7 @@ CullVisitor::CullVisitor():
|
||||
}
|
||||
|
||||
CullVisitor::CullVisitor(const CullVisitor& rhs):
|
||||
Referenced(true),
|
||||
NodeVisitor(rhs),
|
||||
CullStack(rhs),
|
||||
_currentStateGraph(NULL),
|
||||
|
@ -222,7 +222,7 @@ public:
|
||||
// GWM July 2005 add test for triangle intersected by p1-p2.
|
||||
// return true for unused edge
|
||||
|
||||
const bool intersected(const unsigned int ip1,const unsigned int ip2,const osg::Vec2 p1 ,const osg::Vec2 p2,const int iedge, osg::Vec3Array *points) const
|
||||
bool intersected(const unsigned int ip1,const unsigned int ip2,const osg::Vec2 p1 ,const osg::Vec2 p2,const int iedge, osg::Vec3Array *points) const
|
||||
{
|
||||
// return true if edge iedge of triangle is intersected by ip1,ip2
|
||||
Vertex_index ie1,ie2;
|
||||
|
@ -123,7 +123,7 @@ namespace PolytopeIntersectorUtils
|
||||
}
|
||||
|
||||
// handle points
|
||||
void operator()(const Vec3_type v1, bool treatVertexDataAsTemporary)
|
||||
void operator()(const Vec3_type v1, bool /*treatVertexDataAsTemporary*/)
|
||||
{
|
||||
++_index;
|
||||
if ((_dimensionMask & PolytopeIntersector::DimZero) == 0) return;
|
||||
@ -142,7 +142,7 @@ namespace PolytopeIntersectorUtils
|
||||
}
|
||||
|
||||
// handle lines
|
||||
void operator()(const Vec3_type v1, const Vec3_type v2, bool treatVertexDataAsTemporary)
|
||||
void operator()(const Vec3_type v1, const Vec3_type v2, bool /*treatVertexDataAsTemporary*/)
|
||||
{
|
||||
++_index;
|
||||
if ((_dimensionMask & PolytopeIntersector::DimOne) == 0) return;
|
||||
@ -207,7 +207,7 @@ namespace PolytopeIntersectorUtils
|
||||
}
|
||||
|
||||
// handle triangles
|
||||
void operator()(const Vec3_type v1, const Vec3_type v2, const Vec3_type v3, bool treatVertexDataAsTemporary)
|
||||
void operator()(const Vec3_type v1, const Vec3_type v2, const Vec3_type v3, bool /*treatVertexDataAsTemporary*/)
|
||||
{
|
||||
++_index;
|
||||
if ((_dimensionMask & PolytopeIntersector::DimTwo) == 0) return;
|
||||
|
@ -346,7 +346,7 @@ void SceneGraphBuilder::Cylinder(GLfloat aBase,
|
||||
OSG_NOTICE<<"SceneGraphBuilder::Cylinder("<<aBase<<", "<<aTop<<", "<<aHeight<<", "<<aSlices<<", "<<aStacks<<") not implemented yet"<<std::endl;
|
||||
}
|
||||
|
||||
void SceneGraphBuilder::Disk(GLfloat inner,
|
||||
void SceneGraphBuilder::Disk(GLfloat /*inner*/,
|
||||
GLfloat outer,
|
||||
GLint slices,
|
||||
GLint /*loops*/)
|
||||
|
@ -236,6 +236,7 @@ struct FindSharpEdgesFunctor
|
||||
_primitiveSetIndex(primitiveSetIndex), _p1(p1), _p2(p2), _p3(p3) {}
|
||||
|
||||
Triangle(const Triangle& tri):
|
||||
osg::Referenced(true),
|
||||
_primitiveSetIndex(tri._primitiveSetIndex), _p1(tri._p1), _p2(tri._p2), _p3(tri._p3) {}
|
||||
|
||||
Triangle& operator = (const Triangle& tri)
|
||||
|
@ -607,7 +607,7 @@ void Tessellator::reduceArray(osg::Array * cold, const unsigned int nnu)
|
||||
}
|
||||
}
|
||||
|
||||
void Tessellator::collectTessellation(osg::Geometry &geom, unsigned int originalIndex)
|
||||
void Tessellator::collectTessellation(osg::Geometry &geom, unsigned int /*originalIndex*/)
|
||||
{
|
||||
if (geom.containsDeprecatedData()) geom.fixDeprecatedData();
|
||||
|
||||
|
@ -30,7 +30,7 @@ CompositeViewer::CompositeViewer()
|
||||
constructorInit();
|
||||
}
|
||||
|
||||
CompositeViewer::CompositeViewer(const CompositeViewer& cv,const osg::CopyOp& copyop):
|
||||
CompositeViewer::CompositeViewer(const CompositeViewer& cv,const osg::CopyOp& /*copyop*/):
|
||||
osg::Object(true),
|
||||
ViewerBase(cv)
|
||||
{
|
||||
@ -299,7 +299,7 @@ bool CompositeViewer::checkEvents()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// get events from all windows attached to Viewer.
|
||||
Windows windows;
|
||||
getWindows(windows);
|
||||
@ -309,7 +309,7 @@ bool CompositeViewer::checkEvents()
|
||||
{
|
||||
if ((*witr)->checkEvents()) return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -468,7 +468,7 @@ void CompositeViewer::getScenes(Scenes& scenes, bool onlyValid)
|
||||
}
|
||||
}
|
||||
|
||||
void CompositeViewer::getViews(Views& views, bool onlyValid)
|
||||
void CompositeViewer::getViews(Views& views, bool /*onlyValid*/)
|
||||
{
|
||||
views.clear();
|
||||
|
||||
@ -733,11 +733,11 @@ void CompositeViewer::generateSlavePointerData(osg::Camera* camera, osgGA::GUIEv
|
||||
// : project ray into RTT Camera's clip space, and RTT Camera's is Relative RF and sharing same scene graph as master then transform coords.
|
||||
|
||||
// if camera isn't the master it must be a slave and could need reprojecting.
|
||||
|
||||
|
||||
|
||||
|
||||
osgViewer::View* view = dynamic_cast<osgViewer::View*>(camera->getView());
|
||||
if (!view) return;
|
||||
|
||||
|
||||
osg::Camera* view_masterCamera = view->getCamera();
|
||||
if (camera!=view_masterCamera)
|
||||
{
|
||||
@ -751,7 +751,7 @@ void CompositeViewer::generateSlavePointerData(osg::Camera* camera, osgGA::GUIEv
|
||||
double master_max_x = 1.0;
|
||||
double master_min_y = -1.0;
|
||||
double master_max_y = 1.0;
|
||||
|
||||
|
||||
osg::Matrix masterCameraVPW = view_masterCamera->getViewMatrix() * view_masterCamera->getProjectionMatrix();
|
||||
if (view_masterCamera->getViewport())
|
||||
{
|
||||
@ -829,8 +829,8 @@ void CompositeViewer::generateSlavePointerData(osg::Camera* camera, osgGA::GUIEv
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void CompositeViewer::generatePointerData(osgGA::GUIEventAdapter& event)
|
||||
{
|
||||
osgViewer::GraphicsWindow* gw = dynamic_cast<osgViewer::GraphicsWindow*>(event.getGraphicsContext());
|
||||
@ -841,7 +841,7 @@ void CompositeViewer::generatePointerData(osgGA::GUIEventAdapter& event)
|
||||
|
||||
bool invert_y = event.getMouseYOrientation()==osgGA::GUIEventAdapter::Y_INCREASING_DOWNWARDS;
|
||||
if (invert_y && gw->getTraits()) y = gw->getTraits()->height - y;
|
||||
|
||||
|
||||
event.addPointerData(new osgGA::PointerData(gw, x, 0, gw->getTraits()->width,
|
||||
y, 0, gw->getTraits()->height));
|
||||
|
||||
@ -893,7 +893,7 @@ void CompositeViewer::reprojectPointerData(osgGA::GUIEventAdapter& source_event,
|
||||
osg::Viewport* viewport = camera ? camera->getViewport() : 0;
|
||||
|
||||
if (!viewport) return;
|
||||
|
||||
|
||||
dest_event.addPointerData(new osgGA::PointerData(camera, (x-viewport->x())/viewport->width()*2.0f-1.0f, -1.0, 1.0,
|
||||
(y-viewport->y())/viewport->height()*2.0f-1.0f, -1.0, 1.0));
|
||||
|
||||
@ -935,9 +935,9 @@ void CompositeViewer::eventTraversal()
|
||||
// set done if there are no windows
|
||||
checkWindowStatus(contexts);
|
||||
if (_done) return;
|
||||
|
||||
|
||||
osgGA::EventQueue::Events all_events;
|
||||
|
||||
|
||||
for(Contexts::iterator citr = contexts.begin();
|
||||
citr != contexts.end();
|
||||
++citr)
|
||||
@ -963,7 +963,7 @@ void CompositeViewer::eventTraversal()
|
||||
|
||||
// sort all the events in time order so we can make sure we pass them all on in the correct order.
|
||||
all_events.sort(SortEvents());
|
||||
|
||||
|
||||
// pass on pointer data onto non mouse events to keep the position data usable by all recipients of all events.
|
||||
for(osgGA::EventQueue::Events::iterator itr = all_events.begin();
|
||||
itr != all_events.end();
|
||||
@ -991,23 +991,23 @@ void CompositeViewer::eventTraversal()
|
||||
reprojectPointerData(*_previousEvent, *event);
|
||||
}
|
||||
|
||||
#if 0
|
||||
#if 0
|
||||
// assign topmost PointeData settings as the events X,Y and InputRange
|
||||
osgGA::PointerData* pd = event->getPointerData(event->getNumPointerData()-1);
|
||||
event->setX(pd->x);
|
||||
event->setY(pd->y);
|
||||
event->setInputRange(pd->xMin, pd->yMin, pd->xMax, pd->yMax);
|
||||
event->setMouseYOrientation(osgGA::GUIEventAdapter::Y_INCREASING_UPWARDS);
|
||||
#else
|
||||
#else
|
||||
if (event->getMouseYOrientation()!=osgGA::GUIEventAdapter::Y_INCREASING_UPWARDS)
|
||||
{
|
||||
event->setY((event->getYmax()-event->getY())+event->getYmin());
|
||||
event->setMouseYOrientation(osgGA::GUIEventAdapter::Y_INCREASING_UPWARDS);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
_previousEvent = event;
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -1018,28 +1018,28 @@ void CompositeViewer::eventTraversal()
|
||||
osgGA::PointerData* pd = event->getNumPointerData()>0 ? event->getPointerData(event->getNumPointerData()-1) : 0;
|
||||
osg::Camera* camera = pd ? dynamic_cast<osg::Camera*>(pd->object.get()) : 0;
|
||||
osgViewer::View* view = camera ? dynamic_cast<osgViewer::View*>(camera->getView()) : 0;
|
||||
|
||||
if (!view)
|
||||
|
||||
if (!view)
|
||||
{
|
||||
if (_viewWithFocus.valid())
|
||||
if (_viewWithFocus.valid())
|
||||
{
|
||||
// OSG_NOTICE<<"Falling back to using _viewWithFocus"<<std::endl;
|
||||
view = _viewWithFocus.get();
|
||||
}
|
||||
else if (!_views.empty())
|
||||
else if (!_views.empty())
|
||||
{
|
||||
// OSG_NOTICE<<"Falling back to using first view as one with focus"<<std::endl;
|
||||
view = _views[0].get();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// reassign view with focus
|
||||
if (_viewWithFocus != view) _viewWithFocus = view;
|
||||
|
||||
if (view)
|
||||
if (view)
|
||||
{
|
||||
viewEventsMap[view].push_back( event );
|
||||
|
||||
|
||||
osgGA::GUIEventAdapter* eventState = view->getEventQueue()->getCurrentEventState();
|
||||
eventState->copyPointerDataFrom(*event);
|
||||
}
|
||||
@ -1073,7 +1073,7 @@ void CompositeViewer::eventTraversal()
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
for(RefViews::iterator vitr = _views.begin();
|
||||
vitr != _views.end();
|
||||
@ -1327,9 +1327,9 @@ void CompositeViewer::updateTraversal()
|
||||
{
|
||||
view->setFusionDistance( view->getCameraManipulator()->getFusionDistanceMode(),
|
||||
view->getCameraManipulator()->getFusionDistanceValue() );
|
||||
|
||||
|
||||
view->getCameraManipulator()->updateCamera(*(view->getCamera()));
|
||||
|
||||
|
||||
}
|
||||
view->updateSlaves();
|
||||
|
||||
|
@ -36,7 +36,8 @@ Keystone::Keystone():
|
||||
top_left(-1.0,1.0),
|
||||
top_right(1.0,1.0) {}
|
||||
|
||||
Keystone::Keystone(const Keystone& rhs, const osg::CopyOp&):
|
||||
Keystone::Keystone(const Keystone& rhs, const osg::CopyOp & copyop):
|
||||
osg::Object(rhs, copyop),
|
||||
keystoneEditingEnabled(rhs.keystoneEditingEnabled),
|
||||
gridColour(rhs.gridColour),
|
||||
bottom_left(rhs.bottom_left),
|
||||
@ -97,7 +98,7 @@ struct KeystoneCullCallback : public osg::Drawable::CullCallback
|
||||
META_Object(osg,KeystoneCullCallback);
|
||||
|
||||
/** do customized cull code, return true if drawable should be culled.*/
|
||||
virtual bool cull(osg::NodeVisitor* nv, osg::Drawable* drawable, osg::RenderInfo* renderInfo) const
|
||||
virtual bool cull(osg::NodeVisitor* /*nv*/, osg::Drawable* /*drawable*/, osg::RenderInfo* /*renderInfo*/) const
|
||||
{
|
||||
return _keystone.valid() ? !_keystone->getKeystoneEditingEnabled() : true;
|
||||
}
|
||||
@ -413,7 +414,7 @@ osg::Vec2d KeystoneHandler::incrementScale(const osgGA::GUIEventAdapter& ea) con
|
||||
return _defaultIncrement;
|
||||
}
|
||||
|
||||
bool KeystoneHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa, osg::Object* obj, osg::NodeVisitor* nv)
|
||||
bool KeystoneHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& /*aa*/, osg::Object* obj, osg::NodeVisitor* /*nv*/)
|
||||
{
|
||||
osg::Camera* camera = dynamic_cast<osg::Camera*>(obj);
|
||||
osg::Viewport* viewport = camera ? camera->getViewport() : 0;
|
||||
|
@ -439,7 +439,7 @@ bool PixelBufferX11::makeCurrentImplementation()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool PixelBufferX11::makeContextCurrentImplementation(osg::GraphicsContext* readContext)
|
||||
bool PixelBufferX11::makeContextCurrentImplementation(osg::GraphicsContext* /*readContext*/)
|
||||
{
|
||||
// OSG_NOTICE<<"PixelBufferX11::makeContextCurrentImplementation() not implementation yet."<<std::endl;
|
||||
return makeCurrentImplementation();
|
||||
@ -464,7 +464,7 @@ bool PixelBufferX11::releaseContextImplementation()
|
||||
}
|
||||
|
||||
|
||||
void PixelBufferX11::bindPBufferToTextureImplementation(GLenum buffer)
|
||||
void PixelBufferX11::bindPBufferToTextureImplementation(GLenum /*buffer*/)
|
||||
{
|
||||
OSG_NOTICE<<"PixelBufferX11::bindPBufferToTextureImplementation() not implementation yet."<<std::endl;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ EXTQuerySupport::EXTQuerySupport():
|
||||
{
|
||||
}
|
||||
|
||||
void EXTQuerySupport::checkQuery(osg::Stats* stats, osg::State* state,
|
||||
void EXTQuerySupport::checkQuery(osg::Stats* stats, osg::State* /*state*/,
|
||||
osg::Timer_t startTick)
|
||||
{
|
||||
for(QueryFrameNumberList::iterator itr = _queryFrameNumberList.begin();
|
||||
@ -118,19 +118,19 @@ GLuint EXTQuerySupport::createQueryObject()
|
||||
}
|
||||
}
|
||||
|
||||
void EXTQuerySupport::beginQuery(unsigned int frameNumber, osg::State* state)
|
||||
void EXTQuerySupport::beginQuery(unsigned int frameNumber, osg::State* /*state*/)
|
||||
{
|
||||
GLuint query = createQueryObject();
|
||||
_extensions->glBeginQuery(GL_TIME_ELAPSED, query);
|
||||
_queryFrameNumberList.push_back(QueryFrameNumberPair(query, frameNumber));
|
||||
}
|
||||
|
||||
void EXTQuerySupport::endQuery(osg::State* state)
|
||||
void EXTQuerySupport::endQuery(osg::State* /*state*/)
|
||||
{
|
||||
_extensions->glEndQuery(GL_TIME_ELAPSED);
|
||||
}
|
||||
|
||||
void OpenGLQuerySupport::initialize(osg::State* state, osg::Timer_t startTick)
|
||||
void OpenGLQuerySupport::initialize(osg::State* state, osg::Timer_t /*startTick*/)
|
||||
{
|
||||
_extensions = osg::Drawable::getExtensions(state->getContextID(),true);
|
||||
}
|
||||
@ -177,7 +177,7 @@ void ARBQuerySupport::initialize(osg::State* state, osg::Timer_t startTick)
|
||||
OpenGLQuerySupport::initialize(state, startTick);
|
||||
}
|
||||
|
||||
void ARBQuerySupport::beginQuery(unsigned int frameNumber, osg::State* state)
|
||||
void ARBQuerySupport::beginQuery(unsigned int frameNumber, osg::State* /*state*/)
|
||||
{
|
||||
QueryPair query;
|
||||
if (_availableQueryObjects.empty())
|
||||
@ -194,14 +194,14 @@ void ARBQuerySupport::beginQuery(unsigned int frameNumber, osg::State* state)
|
||||
_queryFrameList.push_back(ActiveQuery(query, frameNumber));
|
||||
}
|
||||
|
||||
void ARBQuerySupport::endQuery(osg::State* state)
|
||||
void ARBQuerySupport::endQuery(osg::State* /*state*/)
|
||||
{
|
||||
_extensions->glQueryCounter(_queryFrameList.back().queries.second,
|
||||
GL_TIMESTAMP);
|
||||
}
|
||||
|
||||
void ARBQuerySupport::checkQuery(osg::Stats* stats, osg::State* state,
|
||||
osg::Timer_t startTick)
|
||||
osg::Timer_t /*startTick*/)
|
||||
{
|
||||
for(QueryFrameList::iterator itr = _queryFrameList.begin();
|
||||
itr != _queryFrameList.end();
|
||||
@ -390,7 +390,7 @@ Renderer::Renderer(osg::Camera* camera):
|
||||
((view && view->getDisplaySettings()) ? view->getDisplaySettings() : osg::DisplaySettings::instance().get());
|
||||
|
||||
_serializeDraw = ds ? ds->getSerializeDrawDispatch() : false;
|
||||
|
||||
|
||||
unsigned int sceneViewOptions = osgUtil::SceneView::HEADLIGHT;
|
||||
if (view)
|
||||
{
|
||||
@ -423,7 +423,7 @@ Renderer::Renderer(osg::Camera* camera):
|
||||
_sceneView[0]->setResetColorMaskToAllOn(false);
|
||||
_sceneView[1]->setResetColorMaskToAllOn(false);
|
||||
}
|
||||
|
||||
|
||||
_sceneView[0]->setCamera(_camera.get(), false);
|
||||
_sceneView[1]->setCamera(_camera.get(), false);
|
||||
|
||||
@ -898,7 +898,7 @@ void Renderer::operator () (osg::Object* object)
|
||||
if (camera) cull();
|
||||
}
|
||||
|
||||
void Renderer::operator () (osg::GraphicsContext* context)
|
||||
void Renderer::operator () (osg::GraphicsContext* /*context*/)
|
||||
{
|
||||
if (_graphicsThreadDoesCull)
|
||||
{
|
||||
|
@ -206,7 +206,7 @@ void WindowCaptureCallback::ContextData::updateTimings(osg::Timer_t tick_start,
|
||||
osg::Timer_t tick_afterReadPixels,
|
||||
osg::Timer_t tick_afterMemCpy,
|
||||
osg::Timer_t tick_afterCaptureOperation,
|
||||
unsigned int dataSize)
|
||||
unsigned int /*dataSize*/)
|
||||
{
|
||||
_timeForReadPixels = osg::Timer::instance()->delta_s(tick_start, tick_afterReadPixels);
|
||||
_timeForMemCpy = osg::Timer::instance()->delta_s(tick_afterReadPixels, tick_afterMemCpy);
|
||||
@ -770,7 +770,7 @@ bool ScreenCaptureHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIAc
|
||||
{
|
||||
_stopCapture = false;
|
||||
removeCallbackFromViewer(*viewer);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -295,18 +295,18 @@ bool Viewer::readConfiguration(const std::string& filename)
|
||||
//OSG_NOTICE<<"Error: Unable to load configuration file \""<<filename<<"\""<<std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
ViewConfig* config = dynamic_cast<ViewConfig*>(object.get());
|
||||
if (config)
|
||||
{
|
||||
OSG_NOTICE<<"Using osgViewer::Config : "<<config->className()<<std::endl;
|
||||
config->configure(*this);
|
||||
|
||||
|
||||
osgDB::writeObjectFile(*config,"test.osgt");
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
CompositeViewer* compositeViewer = dynamic_cast<CompositeViewer*>(object.get());
|
||||
if (compositeViewer)
|
||||
@ -363,7 +363,7 @@ bool Viewer::checkNeedToDoFrame()
|
||||
|
||||
// check if events are available and need processing
|
||||
if (checkEvents()) return true;
|
||||
|
||||
|
||||
// now check if any of the event handles have prompted a redraw.
|
||||
if (_requestRedraw) return true;
|
||||
if (_requestContinousUpdate) return true;
|
||||
@ -395,7 +395,7 @@ bool Viewer::checkEvents()
|
||||
{
|
||||
if ((*witr)->checkEvents()) return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -678,7 +678,7 @@ void Viewer::generateSlavePointerData(osg::Camera* camera, osgGA::GUIEventAdapte
|
||||
double master_max_x = 1.0;
|
||||
double master_min_y = -1.0;
|
||||
double master_max_y = 1.0;
|
||||
|
||||
|
||||
osg::Matrix masterCameraVPW = getCamera()->getViewMatrix() * getCamera()->getProjectionMatrix();
|
||||
if (getCamera()->getViewport())
|
||||
{
|
||||
@ -758,8 +758,8 @@ void Viewer::generateSlavePointerData(osg::Camera* camera, osgGA::GUIEventAdapte
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void Viewer::generatePointerData(osgGA::GUIEventAdapter& event)
|
||||
{
|
||||
osgViewer::GraphicsWindow* gw = dynamic_cast<osgViewer::GraphicsWindow*>(event.getGraphicsContext());
|
||||
@ -770,7 +770,7 @@ void Viewer::generatePointerData(osgGA::GUIEventAdapter& event)
|
||||
|
||||
bool invert_y = event.getMouseYOrientation()==osgGA::GUIEventAdapter::Y_INCREASING_DOWNWARDS;
|
||||
if (invert_y && gw->getTraits()) y = gw->getTraits()->height - y;
|
||||
|
||||
|
||||
event.addPointerData(new osgGA::PointerData(gw, x, 0, gw->getTraits()->width,
|
||||
y, 0, gw->getTraits()->height));
|
||||
|
||||
@ -822,7 +822,7 @@ void Viewer::reprojectPointerData(osgGA::GUIEventAdapter& source_event, osgGA::G
|
||||
osg::Viewport* viewport = camera ? camera->getViewport() : 0;
|
||||
|
||||
if (!viewport) return;
|
||||
|
||||
|
||||
dest_event.addPointerData(new osgGA::PointerData(camera, (x-viewport->x())/viewport->width()*2.0f-1.0f, -1.0, 1.0,
|
||||
(y-viewport->y())/viewport->height()*2.0f-1.0f, -1.0, 1.0));
|
||||
|
||||
@ -838,7 +838,7 @@ void Viewer::eventTraversal()
|
||||
if (_done) return;
|
||||
|
||||
double cutOffTime = _frameStamp->getReferenceTime();
|
||||
|
||||
|
||||
double beginEventTraversal = osg::Timer::instance()->delta_s(_startTick, osg::Timer::instance()->tick());
|
||||
|
||||
// OSG_NOTICE<<"Viewer::frameEventTraversal()."<<std::endl;
|
||||
@ -926,17 +926,17 @@ void Viewer::eventTraversal()
|
||||
#endif
|
||||
|
||||
eventState->copyPointerDataFrom(*event);
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
event->copyPointerDataFrom(*eventState);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
events.push_back(event);
|
||||
}
|
||||
|
||||
|
||||
for(itr = gw_events.begin();
|
||||
itr != gw_events.end();
|
||||
++itr)
|
||||
@ -1174,13 +1174,13 @@ void Viewer::updateTraversal()
|
||||
}
|
||||
}
|
||||
|
||||
void Viewer::getScenes(Scenes& scenes, bool onlyValid)
|
||||
void Viewer::getScenes(Scenes& scenes, bool /*onlyValid*/)
|
||||
{
|
||||
scenes.clear();
|
||||
scenes.push_back(_scene.get());
|
||||
}
|
||||
|
||||
void Viewer::getViews(Views& views, bool onlyValid)
|
||||
void Viewer::getViews(Views& views, bool /*onlyValid*/)
|
||||
{
|
||||
views.clear();
|
||||
views.push_back(this);
|
||||
|
@ -247,7 +247,7 @@ void FixedFunctionTechnique::init()
|
||||
_node = texgenNode_0;
|
||||
}
|
||||
|
||||
void FixedFunctionTechnique::update(osgUtil::UpdateVisitor* uv)
|
||||
void FixedFunctionTechnique::update(osgUtil::UpdateVisitor* /*uv*/)
|
||||
{
|
||||
// OSG_NOTICE<<"FixedFunctionTechnique:update(osgUtil::UpdateVisitor* nv):"<<std::endl;
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ ImageDetails::ImageDetails():
|
||||
}
|
||||
|
||||
ImageDetails::ImageDetails(const ImageDetails& rhs,const osg::CopyOp& copyop):
|
||||
osg::Object(rhs, copyop),
|
||||
_texelOffset(rhs._texelOffset),
|
||||
_texelScale(rhs._texelScale),
|
||||
_matrix(rhs._matrix)
|
||||
@ -511,7 +512,7 @@ struct ApplyTransferFunctionOperator
|
||||
luminance(a);
|
||||
}
|
||||
|
||||
inline void luminance_alpha(float l,float a) const
|
||||
inline void luminance_alpha(float l,float /*a*/) const
|
||||
{
|
||||
luminance(l);
|
||||
}
|
||||
@ -521,7 +522,7 @@ struct ApplyTransferFunctionOperator
|
||||
luminance((r+g+b)*0.3333333);
|
||||
}
|
||||
|
||||
inline void rgba(float r,float g,float b,float a) const
|
||||
inline void rgba(float /*r*/,float /*g*/,float /*b*/,float a) const
|
||||
{
|
||||
luminance(a);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ bool Locator::convertModelToLocal(const osg::Vec3d& world, osg::Vec3d& local) co
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Locator::computeLocalBounds(Locator& source, osg::Vec3d& bottomLeft, osg::Vec3d& topRight) const
|
||||
bool Locator::computeLocalBounds(Locator& /*source*/, osg::Vec3d& bottomLeft, osg::Vec3d& topRight) const
|
||||
{
|
||||
typedef std::list<osg::Vec3d> Corners;
|
||||
Corners corners;
|
||||
|
@ -532,7 +532,7 @@ void RayTracedTechnique::init()
|
||||
}
|
||||
}
|
||||
|
||||
void RayTracedTechnique::update(osgUtil::UpdateVisitor* uv)
|
||||
void RayTracedTechnique::update(osgUtil::UpdateVisitor* /*uv*/)
|
||||
{
|
||||
// OSG_NOTICE<<"RayTracedTechnique:update(osgUtil::UpdateVisitor* nv):"<<std::endl;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ void BrowserManager::init(const std::string& application)
|
||||
_application = application;
|
||||
}
|
||||
|
||||
BrowserImage* BrowserManager::createBrowserImage(const std::string& url, int width, int height)
|
||||
BrowserImage* BrowserManager::createBrowserImage(const std::string& /*url*/, int /*width*/, int /*height*/)
|
||||
{
|
||||
OSG_NOTICE<<"Cannot create browser"<<std::endl;
|
||||
return 0;
|
||||
|
@ -12,7 +12,7 @@ Canvas::Canvas(const Canvas& canvas, const osg::CopyOp& co):
|
||||
Window(canvas, co) {
|
||||
}
|
||||
|
||||
void Canvas::_resizeImplementation(point_type w, point_type h) {
|
||||
void Canvas::_resizeImplementation(point_type /*w*/, point_type /*h*/) {
|
||||
// A Canvas has no layout, so it doesn't really know how to honor a resize
|
||||
// request. :) The best I could do here is store the differences and add them
|
||||
// later to the calls to getWidth/getHeight.
|
||||
|
@ -42,7 +42,7 @@ _corner (corner._corner)
|
||||
{
|
||||
}
|
||||
|
||||
void Frame::Corner::parented(Window* window) {
|
||||
void Frame::Corner::parented(Window* /*window*/) {
|
||||
Frame* parent = dynamic_cast<Frame*>(getParent());
|
||||
|
||||
if(!parent) return;
|
||||
@ -50,7 +50,7 @@ void Frame::Corner::parented(Window* window) {
|
||||
if(parent->canResize()) setEventMask(EVENT_MASK_MOUSE_DRAG);
|
||||
}
|
||||
|
||||
bool Frame::Corner::mouseDrag(double x, double y, const WindowManager* wm)
|
||||
bool Frame::Corner::mouseDrag(double x, double y, const WindowManager* /*wm*/)
|
||||
{
|
||||
Frame* parent = dynamic_cast<Frame*>(getParent());
|
||||
|
||||
@ -88,7 +88,7 @@ _border (border._border)
|
||||
{
|
||||
}
|
||||
|
||||
void Frame::Border::parented(Window* window) {
|
||||
void Frame::Border::parented(Window* /*window*/) {
|
||||
Frame* parent = dynamic_cast<Frame*>(getParent());
|
||||
|
||||
if(!parent) return;
|
||||
@ -137,7 +137,7 @@ void Frame::Border::positioned()
|
||||
}
|
||||
}
|
||||
|
||||
bool Frame::Border::mouseDrag(double x, double y, const WindowManager* wm)
|
||||
bool Frame::Border::mouseDrag(double x, double y, const WindowManager* /*wm*/)
|
||||
{
|
||||
Frame* parent = dynamic_cast<Frame*>(getParent());
|
||||
|
||||
|
@ -94,6 +94,8 @@ void Input::_calculateSize(const XYCoord& size) {
|
||||
if(width > getWidth()) setWidth(osg::round(width));
|
||||
|
||||
if(height > getHeight()) setHeight(osg::round(height));
|
||||
#else
|
||||
OSG_UNUSED(size);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -281,11 +283,11 @@ void Input::positioned()
|
||||
}
|
||||
}
|
||||
|
||||
bool Input::keyUp(int key, int mask, const WindowManager*) {
|
||||
bool Input::keyUp(int /*key*/, int /*mask*/, const WindowManager*) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Input::mouseDrag (double x, double y, const WindowManager*)
|
||||
bool Input::mouseDrag (double x, double /*y*/, const WindowManager*)
|
||||
{
|
||||
_mouseClickX += x;
|
||||
x = _mouseClickX;
|
||||
@ -306,7 +308,7 @@ bool Input::mouseDrag (double x, double y, const WindowManager*)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Input::mousePush (double x, double y, const WindowManager* wm)
|
||||
bool Input::mousePush (double x, double /*y*/, const WindowManager* /*wm*/)
|
||||
{
|
||||
double offset = getOrigin().x();
|
||||
Window* window = getParent();
|
||||
|
@ -142,6 +142,7 @@ bool LuaEngine::eval(const std::string& code) {
|
||||
return true;
|
||||
|
||||
#else
|
||||
OSG_UNUSED(code);
|
||||
return noLuaFail("Can't evaluate code in LuaEngine");
|
||||
#endif
|
||||
}
|
||||
@ -163,6 +164,7 @@ bool LuaEngine::runFile(const std::string& filePath) {
|
||||
return true;
|
||||
|
||||
#else
|
||||
OSG_UNUSED(filePath);
|
||||
return noLuaFail("Can't run file in LuaEngine");
|
||||
#endif
|
||||
}
|
||||
|
@ -156,6 +156,7 @@ bool PythonEngine::eval(const std::string& code) {
|
||||
return true;
|
||||
|
||||
#else
|
||||
OSG_UNUSED(code);
|
||||
return noPythonFail("Can't evaluate code in PythonEngine");
|
||||
#endif
|
||||
}
|
||||
@ -207,6 +208,7 @@ bool PythonEngine::runFile(const std::string& filePath) {
|
||||
return true;
|
||||
|
||||
#else
|
||||
OSG_UNUSED(filePath);
|
||||
return noPythonFail("Can't evaluate code in PythonEngine");
|
||||
#endif
|
||||
}
|
||||
|
@ -164,11 +164,11 @@ bool Style::applyStyle(Widget* widget, Reader r) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Style::applyStyle(Label* label, Reader r) {
|
||||
bool Style::applyStyle(Label* /*label*/, Reader /*r*/) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Style::applyStyle(Input* input, Reader r) {
|
||||
bool Style::applyStyle(Input* /*input*/, Reader /*r*/) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -217,12 +217,12 @@ bool Style::applyStyle(Window* window, Reader r) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Style::applyStyle(Canvas* label, Reader r) {
|
||||
bool Style::applyStyle(Canvas* /*label*/, Reader /*r*/) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool Style::applyStyle(Window::EmbeddedWindow*, Reader r) {
|
||||
bool Style::applyStyle(Window::EmbeddedWindow*, Reader /*r*/) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -232,11 +232,11 @@ bool Style::applyStyle(Box* box, Reader r) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Style::applyStyle(Frame::Corner*, Reader r) {
|
||||
bool Style::applyStyle(Frame::Corner*, Reader /*r*/) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Style::applyStyle(Frame::Border*, Reader r) {
|
||||
bool Style::applyStyle(Frame::Border*, Reader /*r*/) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -10,9 +10,9 @@ _wm(wm) {
|
||||
|
||||
bool MouseHandler::handle(
|
||||
const osgGA::GUIEventAdapter& gea,
|
||||
osgGA::GUIActionAdapter& gaa,
|
||||
osg::Object* obj,
|
||||
osg::NodeVisitor* nv
|
||||
osgGA::GUIActionAdapter& /*gaa*/,
|
||||
osg::Object* /*obj*/,
|
||||
osg::NodeVisitor* /*nv*/
|
||||
) {
|
||||
osgGA::GUIEventAdapter::EventType ev = gea.getEventType();
|
||||
MouseAction ma = _isMouseEvent(ev);
|
||||
@ -78,15 +78,15 @@ bool MouseHandler::_handleMouseRelease(float x, float y, int button) {
|
||||
else return false;
|
||||
}
|
||||
|
||||
bool MouseHandler::_handleMouseDoubleClick(float x, float y, int button) {
|
||||
bool MouseHandler::_handleMouseDoubleClick(float /*x*/, float /*y*/, int /*button*/) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MouseHandler::_handleMouseDrag(float x, float y, int button) {
|
||||
bool MouseHandler::_handleMouseDrag(float x, float y, int /*button*/) {
|
||||
return _doMouseEvent(x, y, &WindowManager::pointerDrag);
|
||||
}
|
||||
|
||||
bool MouseHandler::_handleMouseMove(float x, float y, int button) {
|
||||
bool MouseHandler::_handleMouseMove(float x, float y, int /*button*/) {
|
||||
return _doMouseEvent(x, y, &WindowManager::pointerMove);
|
||||
}
|
||||
|
||||
@ -139,9 +139,9 @@ _wm(wm) {
|
||||
|
||||
bool KeyboardHandler::handle(
|
||||
const osgGA::GUIEventAdapter& gea,
|
||||
osgGA::GUIActionAdapter& gaa,
|
||||
osg::Object* obj,
|
||||
osg::NodeVisitor* nv
|
||||
osgGA::GUIActionAdapter& /*gaa*/,
|
||||
osg::Object* /*obj*/,
|
||||
osg::NodeVisitor* /*nv*/
|
||||
) {
|
||||
osgGA::GUIEventAdapter::EventType ev = gea.getEventType();
|
||||
|
||||
@ -170,9 +170,9 @@ _camera (camera) {
|
||||
|
||||
bool ResizeHandler::handle(
|
||||
const osgGA::GUIEventAdapter& gea,
|
||||
osgGA::GUIActionAdapter& gaa,
|
||||
osg::Object* obj,
|
||||
osg::NodeVisitor* nv
|
||||
osgGA::GUIActionAdapter& /*gaa*/,
|
||||
osg::Object* /*obj*/,
|
||||
osg::NodeVisitor* /*nv*/
|
||||
) {
|
||||
osgGA::GUIEventAdapter::EventType ev = gea.getEventType();
|
||||
|
||||
@ -201,8 +201,8 @@ _camera (camera) {
|
||||
bool CameraSwitchHandler::handle(
|
||||
const osgGA::GUIEventAdapter& gea,
|
||||
osgGA::GUIActionAdapter& gaa,
|
||||
osg::Object* obj,
|
||||
osg::NodeVisitor* nv
|
||||
osg::Object* /*obj*/,
|
||||
osg::NodeVisitor* /*nv*/
|
||||
) {
|
||||
if(
|
||||
gea.getEventType() != osgGA::GUIEventAdapter::KEYDOWN ||
|
||||
|
@ -883,7 +883,7 @@ void Window::managed(WindowManager* wm) {
|
||||
update();
|
||||
}
|
||||
|
||||
void Window::unmanaged(WindowManager* wm) {
|
||||
void Window::unmanaged(WindowManager* /*wm*/) {
|
||||
for(Iterator i = begin(); i != end(); i++) _setManaged(i->get(), true);
|
||||
|
||||
_wm = 0;
|
||||
@ -911,7 +911,7 @@ bool Window::removeWidget(Widget* widget) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Window::replaceWidget(Widget* oldWidget, Widget* newWidget) {
|
||||
bool Window::replaceWidget(Widget* /*oldWidget*/, Widget* /*newWidget*/) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ bool WindowManager::_handleMousePushed(float x, float y, bool& down) {
|
||||
return _lastPush->callMethodAndCallbacks(ev);
|
||||
}
|
||||
|
||||
bool WindowManager::_handleMouseReleased(float x, float y, bool& down) {
|
||||
bool WindowManager::_handleMouseReleased(float /*x*/, float /*y*/, bool& down) {
|
||||
down = false;
|
||||
|
||||
// If were were in a drag state, reset our boolean flag.
|
||||
@ -300,14 +300,14 @@ bool WindowManager::pickAtXY(float x, float y, WidgetList& wl)
|
||||
{
|
||||
Intersections intr;
|
||||
|
||||
|
||||
|
||||
osg::Camera* camera = _view->getCamera();
|
||||
osgViewer::GraphicsWindow* gw = dynamic_cast<osgViewer::GraphicsWindow*>(camera->getGraphicsContext());
|
||||
if (gw)
|
||||
{
|
||||
_view->computeIntersections(camera, osgUtil::Intersector::WINDOW, x, y, intr, _nodeMask);
|
||||
}
|
||||
|
||||
|
||||
if (!intr.empty())
|
||||
{
|
||||
// Get the first Window at the XY coordinates; if you want a Window to be
|
||||
|
Loading…
Reference in New Issue
Block a user