Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -185,7 +185,7 @@ class ReaderWriter3DC : public osgDB::ReaderWriter
|
||||
|
||||
}
|
||||
|
||||
virtual WriteResult writeNode(const osg::Node& node,const std::string& fileName,const Options* options =NULL) const
|
||||
virtual WriteResult writeNode(const osg::Node& node,const std::string& fileName,const Options* /*options*/ =NULL) const
|
||||
{
|
||||
std::string ext = osgDB::getLowerCaseFileExtension(fileName);
|
||||
if( !acceptsExtension(ext)) return WriteResult::FILE_NOT_HANDLED;
|
||||
|
||||
@@ -693,7 +693,7 @@ static size_t fileo_write_func(void *self, const void *buffer, size_t size)
|
||||
return f->fail() ? 0 : size;
|
||||
}
|
||||
|
||||
static void fileio_log_func(void *self, Lib3dsLogLevel level, int indent, const char *msg)
|
||||
static void fileio_log_func(void* /*self*/, Lib3dsLogLevel level, int /*indent*/, const char *msg)
|
||||
{
|
||||
osg::NotifySeverity l = osg::INFO;
|
||||
// Intentionally NOT mapping 3DS levels with OSG levels
|
||||
|
||||
@@ -145,14 +145,14 @@ public:
|
||||
|
||||
virtual void setVertexArray(unsigned int,const osg::Vec2*) {}
|
||||
|
||||
virtual void setVertexArray(unsigned int count,const osg::Vec3* vecs) {}
|
||||
virtual void setVertexArray(unsigned int,const osg::Vec3*) {}
|
||||
|
||||
virtual void setVertexArray(unsigned int,const osg::Vec4* ) {}
|
||||
virtual void setVertexArray(unsigned int,const osg::Vec4*) {}
|
||||
|
||||
virtual void setVertexArray(unsigned int,const osg::Vec2d*) {}
|
||||
|
||||
virtual void setVertexArray(unsigned int ,const osg::Vec3d* ) {}
|
||||
virtual void setVertexArray(unsigned int,const osg::Vec4d* ) {}
|
||||
virtual void setVertexArray(unsigned int ,const osg::Vec3d*) {}
|
||||
virtual void setVertexArray(unsigned int,const osg::Vec4d*) {}
|
||||
|
||||
|
||||
// operator for triangles
|
||||
|
||||
@@ -447,7 +447,7 @@ protected:
|
||||
|
||||
virtual ~LightPointSystem() {}
|
||||
|
||||
virtual void readRecord(RecordInputStream& in, Document& document)
|
||||
virtual void readRecord(RecordInputStream& in, Document& /*document*/)
|
||||
{
|
||||
std::string id = in.readString(8);
|
||||
|
||||
@@ -483,7 +483,7 @@ protected:
|
||||
_parent->addChild(*((osg::Group*)_switch.get()));
|
||||
}
|
||||
|
||||
virtual void dispose(Document& document)
|
||||
virtual void dispose(Document& /*document*/)
|
||||
{
|
||||
if (!_switch.valid()) return;
|
||||
|
||||
|
||||
@@ -767,7 +767,7 @@ public:
|
||||
protected:
|
||||
|
||||
virtual ~InstanceDefinition() {}
|
||||
virtual void readRecord(RecordInputStream& in, Document& document)
|
||||
virtual void readRecord(RecordInputStream& in, Document& /*document*/)
|
||||
{
|
||||
in.forward(2);
|
||||
_number = (int)in.readUInt16();
|
||||
|
||||
@@ -185,7 +185,7 @@ ReaderWriter::ReadResult ReaderWriterATTR::readObject(const std::string& file, c
|
||||
|
||||
|
||||
ReaderWriter::WriteResult
|
||||
ReaderWriterATTR::writeObject(const osg::Object& object, const std::string& fileName, const Options* options) const
|
||||
ReaderWriterATTR::writeObject(const osg::Object& object, const std::string& fileName, const Options* /*options*/) const
|
||||
{
|
||||
using std::ios;
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ VertexPaletteManager::write( DataOutputStream& dos ) const
|
||||
|
||||
|
||||
VertexPaletteManager::PaletteRecordType
|
||||
VertexPaletteManager::recordType( const osg::Array* v, const osg::Array* c,
|
||||
VertexPaletteManager::recordType( const osg::Array* /*v*/, const osg::Array* /*c*/,
|
||||
const osg::Array* n, const osg::Array* t )
|
||||
{
|
||||
if (t)
|
||||
|
||||
@@ -50,7 +50,7 @@ static unsigned int LAYER_7( 0x80000000 >> 6 );
|
||||
|
||||
|
||||
bool
|
||||
FltExportVisitor::isLit( const osg::Geometry& geom ) const
|
||||
FltExportVisitor::isLit( const osg::Geometry& /*geom*/ ) const
|
||||
{
|
||||
const osg::StateSet* ss = getCurrentStateSet();
|
||||
if ( ss->getMode( GL_LIGHTING ) & osg::StateAttribute::ON )
|
||||
|
||||
@@ -659,7 +659,7 @@ void Geode::OutputPolygonDelsUInt(const int iCurrentMaterial, const unsigned int
|
||||
}
|
||||
|
||||
|
||||
const int Geode::ProcessMaterial(ostream& fout, const unsigned int igeode)
|
||||
int Geode::ProcessMaterial(ostream& fout, const unsigned int igeode)
|
||||
{
|
||||
// outputs materials from one geode
|
||||
// extended for multiple geode models, GWM 2003.
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace ac3d
|
||||
class Geode : public osg::Geode
|
||||
{
|
||||
public:
|
||||
const int ProcessMaterial(std::ostream& fout, const unsigned int igeode);
|
||||
int ProcessMaterial(std::ostream& fout, const unsigned int igeode);
|
||||
void ProcessGeometry(std::ostream& fout, const unsigned int igeode);
|
||||
private:
|
||||
void OutputTriangle(const int iCurrentMaterial,const unsigned int surfaceFlags,
|
||||
|
||||
@@ -768,7 +768,7 @@ class LineBin : public PrimitiveBin
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual osg::Geode* finalize(const MaterialData& material, const TextureData& textureData)
|
||||
virtual osg::Geode* finalize(const MaterialData& material, const TextureData& /*textureData*/)
|
||||
{
|
||||
_geode->addDrawable(_geometry.get());
|
||||
material.toStateSet(_geode->getOrCreateStateSet());
|
||||
|
||||
@@ -1118,6 +1118,7 @@ yydestruct (yytype, yyvaluep)
|
||||
#endif
|
||||
{
|
||||
/* Pacify ``unused variable'' warnings. */
|
||||
(void) yytype;
|
||||
(void) yyvaluep;
|
||||
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ static osg::GraphicsContext::Traits* buildTrait(RenderSurface& rs)
|
||||
return traits;
|
||||
}
|
||||
|
||||
static osgViewer::View* load(const std::string& file, const osgDB::ReaderWriter::Options* option)
|
||||
static osgViewer::View* load(const std::string& file, const osgDB::ReaderWriter::Options* /*option*/)
|
||||
{
|
||||
osg::ref_ptr<CameraConfig> config = new CameraConfig;
|
||||
//std::cout << "Parse file " << file << std::endl;
|
||||
|
||||
@@ -258,7 +258,7 @@ int RenderSurface::getScreenNum( void ) const
|
||||
return _screen;
|
||||
}
|
||||
|
||||
void RenderSurface::setWindowRectangle( int x, int y, unsigned int width, unsigned int height, bool resize)
|
||||
void RenderSurface::setWindowRectangle( int x, int y, unsigned int width, unsigned int height, bool /*resize*/)
|
||||
{
|
||||
if( _useCustomFullScreen )
|
||||
{
|
||||
|
||||
@@ -378,7 +378,7 @@ ReaderWriterCURL::ReaderWriterCURL()
|
||||
supportsProtocol("https","Read from https port using libcurl.");
|
||||
supportsProtocol("ftp","Read from ftp port using libcurl.");
|
||||
supportsProtocol("ftps","Read from ftps port using libcurl.");
|
||||
|
||||
|
||||
supportsExtension("curl","Pseudo file extension, used to select curl plugin.");
|
||||
supportsExtension("*","Passes all read files to other plugins to handle actual model loading.");
|
||||
supportsOption("OSG_CURL_PROXY","Specify the http proxy.");
|
||||
@@ -706,8 +706,7 @@ bool ReaderWriterCURL::read(std::istream& fin, std::string& destination) const
|
||||
}
|
||||
#endif
|
||||
|
||||
size_t empty_write_data(const char *buffer, size_t size, size_t nmemb, char
|
||||
*userp)
|
||||
size_t empty_write_data(const char* /*buffer*/, size_t size, size_t nmemb, char* /*userp*/)
|
||||
{
|
||||
return size*nmemb;
|
||||
}
|
||||
@@ -726,12 +725,12 @@ bool ReaderWriterCURL::fileExists(const std::string& filename, const osgDB::Opti
|
||||
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, &empty_write_data);
|
||||
|
||||
int result = curl_easy_perform(curl_handle);
|
||||
|
||||
|
||||
long http_return_code(0);
|
||||
curl_easy_getinfo(curl_handle, CURLINFO_RESPONSE_CODE, &http_return_code);
|
||||
|
||||
|
||||
curl_easy_cleanup(curl_handle);
|
||||
|
||||
|
||||
return ((result == 0) && ((http_return_code == 200) || (http_return_code == 0)));
|
||||
}
|
||||
else
|
||||
|
||||
@@ -79,7 +79,7 @@ class EasyCurl : public osg::Referenced
|
||||
virtual ~EasyCurl();
|
||||
|
||||
// disallow copying
|
||||
EasyCurl(const EasyCurl& rhs):_curl(rhs._curl) {}
|
||||
EasyCurl(const EasyCurl& rhs) : osg::Referenced(rhs), _curl(rhs._curl) {}
|
||||
EasyCurl& operator = (const EasyCurl&) { return *this; }
|
||||
|
||||
void setOptions(const std::string& proxyAddress, const std::string& fileName, StreamObject& sp, const osgDB::ReaderWriter::Options *options);
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} ${COLLADA_INCLUDE_DIR}/1.4)
|
||||
|
||||
|
||||
################################################################################
|
||||
## Quieten warnings that a due to dae headers
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
# Remove -Wextra flag as it barfs on ffmoeg headers
|
||||
STRING(REGEX REPLACE "-Wextra" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
ENDIF()
|
||||
|
||||
|
||||
SET(TARGET_SRC
|
||||
daeReader.cpp
|
||||
daeRAnimations.cpp
|
||||
|
||||
@@ -255,7 +255,7 @@ class ReaderWriterDICOM : public osgDB::ReaderWriter
|
||||
}
|
||||
|
||||
|
||||
virtual ReadResult readImage(std::istream& fin,const osgDB::ReaderWriter::Options*) const
|
||||
virtual ReadResult readImage(std::istream&,const osgDB::ReaderWriter::Options*) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -140,17 +140,13 @@ namespace osgDot {
|
||||
|
||||
}
|
||||
|
||||
void BaseDotVisitor::handle(osg::Node& node, int id) {
|
||||
}
|
||||
void BaseDotVisitor::handle(osg::Node&, int) {}
|
||||
|
||||
void BaseDotVisitor::handle(osg::Geode& node, int id) {
|
||||
}
|
||||
void BaseDotVisitor::handle(osg::Geode&, int) {}
|
||||
|
||||
void BaseDotVisitor::handle(osg::Group& node, int id) {
|
||||
}
|
||||
void BaseDotVisitor::handle(osg::Group&, int) {}
|
||||
|
||||
void BaseDotVisitor::handle(osg::Group& parent, osg::Node& child, int parentID, int childID ) {
|
||||
}
|
||||
void BaseDotVisitor::handle(osg::Group&, osg::Node&, int, int) {}
|
||||
|
||||
void BaseDotVisitor::handleNodeAndTraverse(osg::Node& node, int id) {
|
||||
osg::StateSet* ss = node.getStateSet();
|
||||
@@ -164,20 +160,15 @@ namespace osgDot {
|
||||
traverse(node);
|
||||
}
|
||||
|
||||
void BaseDotVisitor::handle(osg::StateSet& stateset, int id) {
|
||||
}
|
||||
void BaseDotVisitor::handle(osg::StateSet&, int) {}
|
||||
|
||||
void BaseDotVisitor::handle(osg::Node& node, osg::StateSet& stateset, int parentID, int childID) {
|
||||
}
|
||||
void BaseDotVisitor::handle(osg::Node&, osg::StateSet&, int, int) {}
|
||||
|
||||
void BaseDotVisitor::handle(osg::Drawable& drawable, int id) {
|
||||
}
|
||||
void BaseDotVisitor::handle(osg::Drawable&, int) {}
|
||||
|
||||
void BaseDotVisitor::handle(osg::Drawable& drawable, osg::StateSet& stateset, int parentID, int childID ) {
|
||||
}
|
||||
void BaseDotVisitor::handle(osg::Drawable&, osg::StateSet&, int, int) {}
|
||||
|
||||
void BaseDotVisitor::handle(osg::Geode& geode, osg::Drawable& drawable, int parentID, int childID ) {
|
||||
}
|
||||
void BaseDotVisitor::handle(osg::Geode&, osg::Drawable&, int, int) {}
|
||||
|
||||
bool BaseDotVisitor::getOrCreateId( osg::Object* object, int &id ) {
|
||||
assert( object );
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace osgDot {
|
||||
drawNode( id, "record", "solid", label.str(), "black", "white" );
|
||||
}
|
||||
|
||||
void SimpleDotVisitor::handle(osg::Group& parent, osg::Node& child, int parentID, int childID ) {
|
||||
void SimpleDotVisitor::handle(osg::Group&, osg::Node&, int parentID, int childID ) {
|
||||
drawEdge( parentID, childID, "setlinewidth(2)" );
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace osgDot {
|
||||
drawNode( id, "Mrecord", "solid", label.str(), "green", "white" );
|
||||
}
|
||||
|
||||
void SimpleDotVisitor::handle(osg::Node& node, osg::StateSet& stateset, int parentID, int childID ) {
|
||||
void SimpleDotVisitor::handle(osg::Node&, osg::StateSet&, int parentID, int childID ) {
|
||||
drawEdge( parentID, childID, "dashed" );
|
||||
}
|
||||
|
||||
@@ -64,11 +64,11 @@ namespace osgDot {
|
||||
drawNode( id, "record", "solid", label.str(), "blue", "white" );
|
||||
}
|
||||
|
||||
void SimpleDotVisitor::handle(osg::Geode& geode, osg::Drawable& drawable, int parentID, int childID ) {
|
||||
void SimpleDotVisitor::handle(osg::Geode&, osg::Drawable&, int parentID, int childID ) {
|
||||
drawEdge( parentID, childID, "dashed" );
|
||||
}
|
||||
|
||||
void SimpleDotVisitor::handle(osg::Drawable& drawable, osg::StateSet& stateset, int parentID, int childID ) {
|
||||
void SimpleDotVisitor::handle(osg::Drawable&, osg::StateSet&, int parentID, int childID ) {
|
||||
drawEdge( parentID, childID, "dashed" );
|
||||
}
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@ public:
|
||||
GLUtesselator *ts, _dwobj *dwob, const RefMatrix *tmat) const;
|
||||
|
||||
void link(const int idop, const _face *f2, const int idop2,const std::vector<Vec3> verts, const dwmaterial *themat) const; // to join up opposed faces of a hole
|
||||
inline const int getidx(int i) const { return idx[i];}
|
||||
inline int getidx(int i) const { return idx[i];}
|
||||
private:
|
||||
void linkholes(const std::vector<Vec3> verts, const dwmaterial *themat, const _face *f2) const;
|
||||
void reverse() { // reverse order of the vertices
|
||||
|
||||
@@ -229,7 +229,7 @@ class DXFWriterNodeVisitor: public osg::NodeVisitor {
|
||||
}
|
||||
}
|
||||
|
||||
int getNodeAcadColor(osg::Geometry *geo,int index=0) { return 0;}
|
||||
int getNodeAcadColor(osg::Geometry* /*geo*/,int /*index*/=0) { return 0;}
|
||||
|
||||
protected:
|
||||
struct CompareStateSet
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
return WriteResult(WriteResult::FILE_SAVED);
|
||||
}
|
||||
|
||||
virtual WriteResult writeNode(const osg::Node& node,const std::string& fileName,const Options* options =NULL) const
|
||||
virtual WriteResult writeNode(const osg::Node& node,const std::string& fileName,const Options* /*options*/ =NULL) const
|
||||
{
|
||||
if (!acceptsExtension(osgDB::getFileExtension(fileName)))
|
||||
return WriteResult(WriteResult::FILE_NOT_HANDLED);
|
||||
|
||||
@@ -186,10 +186,10 @@ public:
|
||||
virtual void assign(dxfFile* dxf, codeValue& cv);
|
||||
void getVertex(double &x, double &y, double &z) { x=_vertex.x();y=_vertex.y();z=_vertex.z(); }
|
||||
const osg::Vec3d& getVertex() const { return _vertex; }
|
||||
const unsigned int getIndice1() const { return _indice1; }
|
||||
const unsigned int getIndice2() const { return _indice2; }
|
||||
const unsigned int getIndice3() const { return _indice3; }
|
||||
const unsigned int getIndice4() const { return _indice4; }
|
||||
unsigned int getIndice1() const { return _indice1; }
|
||||
unsigned int getIndice2() const { return _indice2; }
|
||||
unsigned int getIndice3() const { return _indice3; }
|
||||
unsigned int getIndice4() const { return _indice4; }
|
||||
|
||||
protected:
|
||||
osg::Vec3d _vertex;
|
||||
|
||||
@@ -23,7 +23,7 @@ extern "C"
|
||||
|
||||
# include <libavutil/opt.h>
|
||||
|
||||
inline AVAudioResampleContext * swr_alloc_set_opts_proxy(SwrContext *ctx, int64_t out_ch_layout, enum AVSampleFormat out_sample_format, int out_sample_rate, int64_t in_ch_layout, enum AVSampleFormat in_sample_format, int in_sample_rate, int /*log_offset*/, void * /*log_ctx*/)
|
||||
inline AVAudioResampleContext * swr_alloc_set_opts_proxy(SwrContext* /*ctx*/, int64_t out_ch_layout, enum AVSampleFormat out_sample_format, int out_sample_rate, int64_t in_ch_layout, enum AVSampleFormat in_sample_format, int in_sample_rate, int /*log_offset*/, void * /*log_ctx*/)
|
||||
{
|
||||
AVAudioResampleContext *avr = avresample_alloc_context();
|
||||
av_opt_set_int(avr, "in_channel_layout", in_ch_layout, 0);
|
||||
|
||||
@@ -33,7 +33,8 @@ FFmpegImageStream::FFmpegImageStream() :
|
||||
|
||||
|
||||
FFmpegImageStream::FFmpegImageStream(const FFmpegImageStream & image, const osg::CopyOp & copyop) :
|
||||
osg::ImageStream(image, copyop)
|
||||
osg::ImageStream(image, copyop),
|
||||
OpenThreads::Thread()
|
||||
{
|
||||
// TODO: probably incorrect or incomplete
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
extern "C" {
|
||||
|
||||
static void log_to_osg(void *ptr, int level, const char *fmt, va_list vl)
|
||||
static void log_to_osg(void* /*ptr*/, int level, const char *fmt, va_list vl)
|
||||
{
|
||||
char logbuf[256];
|
||||
vsnprintf(logbuf, sizeof(logbuf), fmt, vl);
|
||||
|
||||
@@ -37,7 +37,7 @@ _dataset(0), _gdalReader(0)
|
||||
}
|
||||
|
||||
DataSetLayer::DataSetLayer(const DataSetLayer& dataSetLayer,const osg::CopyOp& copyop):
|
||||
Layer(dataSetLayer), _gdalReader(dataSetLayer._gdalReader)
|
||||
Layer(dataSetLayer, copyop), _gdalReader(dataSetLayer._gdalReader)
|
||||
{
|
||||
if (dataSetLayer._dataset) open();
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
apply(*geometry);
|
||||
}
|
||||
|
||||
virtual void apply(osg::Geometry& geometry) {} // to be implemented by actual visitors
|
||||
virtual void apply(osg::Geometry& /*geometry*/) {} // to be implemented by actual visitors
|
||||
|
||||
protected:
|
||||
bool isProcessed(osg::Geometry* node) {
|
||||
|
||||
@@ -1843,7 +1843,7 @@ LuaScriptEngine::LuaScriptEngine():
|
||||
initialize();
|
||||
}
|
||||
|
||||
LuaScriptEngine::LuaScriptEngine(const LuaScriptEngine& rhs, const osg::CopyOp&):
|
||||
LuaScriptEngine::LuaScriptEngine(const LuaScriptEngine&, const osg::CopyOp&):
|
||||
osg::ScriptEngine("lua"),
|
||||
_lua(0),
|
||||
_scriptCount(0)
|
||||
|
||||
@@ -160,7 +160,7 @@ class ReaderWriterLua : public osgDB::ReaderWriter
|
||||
return readNode(istream, local_opt.get());
|
||||
}
|
||||
|
||||
virtual ReadResult readScript(std::istream& fin,const osgDB::ReaderWriter::Options* options =NULL) const
|
||||
virtual ReadResult readScript(std::istream& fin,const osgDB::ReaderWriter::Options* /*options*/ =NULL) const
|
||||
{
|
||||
osg::ref_ptr<osg::Script> script = new osg::Script;
|
||||
script->setLanguage("lua");
|
||||
|
||||
@@ -103,8 +103,7 @@ MDLReader::~MDLReader()
|
||||
}
|
||||
|
||||
|
||||
std::string MDLReader::getToken(std::string str, const char * delim,
|
||||
size_t & index)
|
||||
std::string MDLReader::getToken(std::string str, const char * /*delim*/, size_t & index)
|
||||
{
|
||||
size_t start;
|
||||
size_t end = std::string::npos;
|
||||
|
||||
@@ -155,7 +155,7 @@ bool NVTTProcessor::OSGImageOutputHandler::assignImage(osg::Image& image)
|
||||
}
|
||||
|
||||
/// Indicate the start of a new compressed image that's part of the final texture.
|
||||
void NVTTProcessor::OSGImageOutputHandler::beginImage(int size, int width, int height, int depth, int face, int miplevel)
|
||||
void NVTTProcessor::OSGImageOutputHandler::beginImage(int size, int width, int height, int /*depth*/, int /*face*/, int miplevel)
|
||||
{
|
||||
// store the new width/height of the texture
|
||||
if (miplevel == 0)
|
||||
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
return WriteResult(WriteResult::FILE_NOT_HANDLED);
|
||||
}
|
||||
|
||||
virtual WriteResult writeNode(const osg::Node& node,const std::string& fileName,const Options* options =NULL) const
|
||||
virtual WriteResult writeNode(const osg::Node& node,const std::string& fileName,const Options* /*options*/ =NULL) const
|
||||
{
|
||||
if (!acceptsExtension(osgDB::getFileExtension(fileName)))
|
||||
return WriteResult(WriteResult::FILE_NOT_HANDLED);
|
||||
|
||||
@@ -71,7 +71,8 @@ struct TriangulizeFunctor
|
||||
osg::Vec3Array* _vertexes;
|
||||
|
||||
// do nothing
|
||||
void operator ()(const osg::Vec3& v1, const osg::Vec3& v2, const osg::Vec3& v3, bool treatVertexDataAsTemporary) {
|
||||
void operator ()(const osg::Vec3& v1, const osg::Vec3& v2, const osg::Vec3& v3, bool /*treatVertexDataAsTemporary*/)
|
||||
{
|
||||
_vertexes->push_back(v1);
|
||||
_vertexes->push_back(v2);
|
||||
_vertexes->push_back(v3);
|
||||
@@ -145,9 +146,9 @@ public:
|
||||
GDALAllRegister();
|
||||
|
||||
// Try to open data source
|
||||
GDALDataset* file = (GDALDataset*) GDALOpenEx( fileName.c_str(), GDAL_OF_VECTOR, NULL, NULL, NULL );
|
||||
GDALDataset* file = (GDALDataset*) GDALOpenEx( fileName.c_str(), GDAL_OF_VECTOR, NULL, NULL, NULL );
|
||||
#endif
|
||||
|
||||
|
||||
if (!file)
|
||||
return 0;
|
||||
|
||||
@@ -165,7 +166,7 @@ public:
|
||||
|
||||
osg::Group* group = new osg::Group;
|
||||
|
||||
#if GDAL_VERSION_MAJOR<2
|
||||
#if GDAL_VERSION_MAJOR<2
|
||||
for (int i = 0; i < file->GetLayerCount(); i++)
|
||||
{
|
||||
osg::Group* node = readLayer(file->GetLayer(i), file->GetName(), useRandomColorByFeature, addGroupPerFeature);
|
||||
@@ -176,18 +177,18 @@ public:
|
||||
#else
|
||||
for (int i = 0; i < GDALDatasetGetLayerCount(file); i++)
|
||||
{
|
||||
OGRLayer* layer = (OGRLayer *)GDALDatasetGetLayer(file, i);
|
||||
OGRLayer* layer = (OGRLayer *)GDALDatasetGetLayer(file, i);
|
||||
osg::Group* node = readLayer(layer, layer->GetName(), useRandomColorByFeature, addGroupPerFeature);
|
||||
if (node)
|
||||
group->addChild( node );
|
||||
}
|
||||
GDALClose( file );
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
return group;
|
||||
}
|
||||
|
||||
osg::Group* readLayer(OGRLayer* ogrLayer, const std::string& name, bool useRandomColorByFeature, bool addGroupPerFeature) const
|
||||
osg::Group* readLayer(OGRLayer* ogrLayer, const std::string& /*name*/, bool useRandomColorByFeature, bool addGroupPerFeature) const
|
||||
{
|
||||
if (!ogrLayer)
|
||||
return 0;
|
||||
|
||||
@@ -135,7 +135,7 @@ private:
|
||||
|
||||
|
||||
|
||||
bool StandardRequestHandler::operator()(const std::string& request_path, const std::string& full_request_path, const osc::ReceivedMessage& m, const IpEndpointName& remoteEndPoint)
|
||||
bool StandardRequestHandler::operator()(const std::string& /*request_path*/, const std::string& full_request_path, const osc::ReceivedMessage& m, const IpEndpointName& /*remoteEndPoint*/)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -298,7 +298,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool operator()(const std::string& request_path, const std::string& full_request_path, const osc::ReceivedMessage& m, const IpEndpointName& remoteEndPoint)
|
||||
virtual bool operator()(const std::string& /*request_path*/, const std::string& /*full_request_path*/, const osc::ReceivedMessage& m, const IpEndpointName& /*remoteEndPoint*/)
|
||||
{
|
||||
try {
|
||||
float x_min(-1.0f), y_min(-1.0f), x_max(1.0f), y_max(1.0f);
|
||||
@@ -330,7 +330,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool operator()(const std::string& request_path, const std::string& full_request_path, const osc::ReceivedMessage& m, const IpEndpointName& remoteEndPoint)
|
||||
virtual bool operator()(const std::string& /*request_path*/, const std::string& /*full_request_path*/, const osc::ReceivedMessage& m, const IpEndpointName& /*remoteEndPoint*/)
|
||||
{
|
||||
try {
|
||||
bool increasing_upwards(false);
|
||||
@@ -364,7 +364,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool operator()(const std::string& request_path, const std::string& full_request_path, const osc::ReceivedMessage& m, const IpEndpointName& remoteEndPoint)
|
||||
virtual bool operator()(const std::string& /*request_path*/, const std::string& /*full_request_path*/, const osc::ReceivedMessage& m, const IpEndpointName& /*remoteEndPoint*/)
|
||||
{
|
||||
try {
|
||||
osc::int32 keycode(0);
|
||||
@@ -401,7 +401,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool operator()(const std::string& request_path, const std::string& full_request_path, const osc::ReceivedMessage& m, const IpEndpointName& remoteEndPoint)
|
||||
virtual bool operator()(const std::string& /*request_path*/, const std::string& /*full_request_path*/, const osc::ReceivedMessage& m, const IpEndpointName& /*remoteEndPoint*/)
|
||||
{
|
||||
try {
|
||||
osc::int32 keycode(0);
|
||||
@@ -438,7 +438,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool operator()(const std::string& request_path, const std::string& full_request_path, const osc::ReceivedMessage& m, const IpEndpointName& remoteEndPoint)
|
||||
virtual bool operator()(const std::string& /*request_path*/, const std::string& /*full_request_path*/, const osc::ReceivedMessage& m, const IpEndpointName& /*remoteEndPoint*/)
|
||||
{
|
||||
|
||||
try {
|
||||
@@ -473,7 +473,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool operator()(const std::string& request_path, const std::string& full_request_path, const osc::ReceivedMessage& m, const IpEndpointName& remoteEndPoint)
|
||||
virtual bool operator()(const std::string& /*request_path*/, const std::string& /*full_request_path*/, const osc::ReceivedMessage& m, const IpEndpointName& /*remoteEndPoint*/)
|
||||
{
|
||||
|
||||
try {
|
||||
@@ -514,7 +514,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool operator()(const std::string& request_path, const std::string& full_request_path, const osc::ReceivedMessage& m, const IpEndpointName& remoteEndPoint)
|
||||
virtual bool operator()(const std::string& /*request_path*/, const std::string& /*full_request_path*/, const osc::ReceivedMessage& m, const IpEndpointName& /*remoteEndPoint*/)
|
||||
{
|
||||
float down(0.0f);
|
||||
|
||||
@@ -566,7 +566,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual bool operator()(const std::string& request_path, const std::string& full_request_path, const osc::ReceivedMessage& m, const IpEndpointName& remoteEndPoint)
|
||||
virtual bool operator()(const std::string& /*request_path*/, const std::string& /*full_request_path*/, const osc::ReceivedMessage& m, const IpEndpointName& /*remoteEndPoint*/)
|
||||
{
|
||||
float x(0.0f), y(0.0f);
|
||||
osc::int32 btn(0);
|
||||
@@ -619,7 +619,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool operator()(const std::string& request_path, const std::string& full_request_path, const osc::ReceivedMessage& m, const IpEndpointName& remoteEndPoint)
|
||||
virtual bool operator()(const std::string& /*request_path*/, const std::string& /*full_request_path*/, const osc::ReceivedMessage& m, const IpEndpointName& /*remoteEndPoint*/)
|
||||
{
|
||||
try {
|
||||
float pressure(0.0f);
|
||||
@@ -650,7 +650,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool operator()(const std::string& request_path, const std::string& full_request_path, const osc::ReceivedMessage& m, const IpEndpointName& remoteEndPoint)
|
||||
virtual bool operator()(const std::string& /*request_path*/, const std::string& /*full_request_path*/, const osc::ReceivedMessage& m, const IpEndpointName& /*remoteEndPoint*/)
|
||||
{
|
||||
try {
|
||||
osc::int32 pt(osgGA::GUIEventAdapter::UNKNOWN);
|
||||
@@ -684,7 +684,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool operator()(const std::string& request_path, const std::string& full_request_path, const osc::ReceivedMessage& m, const IpEndpointName& remoteEndPoint)
|
||||
virtual bool operator()(const std::string& /*request_path*/, const std::string& /*full_request_path*/, const osc::ReceivedMessage& m, const IpEndpointName& /*remoteEndPoint*/)
|
||||
{
|
||||
try {
|
||||
float rotation(0.0f), tilt_x(0.0f), tilt_y(0.0f);
|
||||
@@ -744,7 +744,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
virtual bool operator()(const std::string& request_path, const std::string& full_request_path, const osc::ReceivedMessage& m, const IpEndpointName& remoteEndPoint)
|
||||
virtual bool operator()(const std::string& /*request_path*/, const std::string& /*full_request_path*/, const osc::ReceivedMessage& m, const IpEndpointName& remoteEndPoint)
|
||||
{
|
||||
// std::cout << m << std::endl;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/**
|
||||
* OscReceivingDevice can be used to receive osg-events via OSC from other hosts/ applications
|
||||
* It can even translate custom osc-message to user-events with attached user-data.
|
||||
*
|
||||
*
|
||||
* It uses the TUIO 1.1 Cursor2D-profile to receive multitouch-events
|
||||
*
|
||||
* This device adds to every message-bundle a message-id, so you can check, if you miss events or similar.
|
||||
@@ -26,20 +26,20 @@
|
||||
* /my_user_event/value_1 23
|
||||
* /my_user_event/value_2 42
|
||||
*
|
||||
* this will result in one osgGA:Event (when both messages are bundled) witht the name "/my_user_event",
|
||||
* this will result in one osgGA:Event (when both messages are bundled) witht the name "/my_user_event",
|
||||
* and two user-values (value_1 and value_2)
|
||||
* To get value_1 you'll do something like event->getUserValue("value_1", my_int);
|
||||
*
|
||||
* Currently osg's user-data can not cast to different types, they have to match, so
|
||||
*
|
||||
* Currently osg's user-data can not cast to different types, they have to match, so
|
||||
* event->getUserValue("value_1", my_string) will fail.
|
||||
*
|
||||
* The receiving device will try to combine multiple osc arguments intelligently, multiple osc-arguments are
|
||||
* bundled into Vec2, Vec3, Vec4 or Matrix, it depends on the number of arguments.
|
||||
|
||||
|
||||
* TUIO-specific notes:
|
||||
* If multiple TUIO-applications are transmitting their touch-points to one oscReceivingDevice, all
|
||||
* touchpoints get multiplexed, so you'll get one event with x touchpoints.
|
||||
* You can differentiate the specific applications by the touch_ids, the upper 16bits
|
||||
* touchpoints get multiplexed, so you'll get one event with x touchpoints.
|
||||
* You can differentiate the specific applications by the touch_ids, the upper 16bits
|
||||
* are specific to an application, the lower 16bits contain the touch-id for that application.
|
||||
* If you need "better" separation, use multiple oscReceivingDevices listening on different ports.
|
||||
*
|
||||
@@ -61,7 +61,7 @@ class OscReceivingDevice : public osgGA::Device, OpenThreads::Thread, osc::OscPa
|
||||
|
||||
public:
|
||||
typedef OscSendingDevice::MsgIdType MsgIdType;
|
||||
|
||||
|
||||
class RequestHandler : public osg::Referenced {
|
||||
public:
|
||||
RequestHandler(const std::string& request_path)
|
||||
@@ -70,58 +70,58 @@ public:
|
||||
, _device(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
virtual bool operator()(const std::string& request_path, const std::string& full_request_path, const osc::ReceivedMessage& m, const IpEndpointName& remoteEndPoint) = 0;
|
||||
virtual void operator()(osgGA::EventQueue* queue) {}
|
||||
|
||||
virtual void operator()(osgGA::EventQueue* /*queue*/) {}
|
||||
|
||||
const std::string& getRequestPath() const { return _requestPath; }
|
||||
|
||||
|
||||
virtual void describeTo(std::ostream& out) const
|
||||
{
|
||||
out << getRequestPath() << ": no description available";
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
virtual void setDevice(OscReceivingDevice* device) { _device = device; }
|
||||
OscReceivingDevice* getDevice() const { return _device; }
|
||||
|
||||
|
||||
/// set the request-path, works only from the constructor
|
||||
void setRequestPath(const std::string& request_path) { _requestPath = request_path; }
|
||||
|
||||
|
||||
void handleException(const osc::Exception& e)
|
||||
{
|
||||
OSG_WARN << "OscDevice :: error while handling " << getRequestPath() << ": " << e.what() << std::endl;
|
||||
}
|
||||
|
||||
|
||||
double getLocalTime() const { return getDevice()->getEventQueue()->getTime(); }
|
||||
private:
|
||||
std::string _requestPath;
|
||||
OscReceivingDevice* _device;
|
||||
friend class OscReceivingDevice;
|
||||
};
|
||||
|
||||
|
||||
typedef std::multimap<std::string, osg::ref_ptr<RequestHandler> > RequestHandlerMap;
|
||||
|
||||
|
||||
OscReceivingDevice(const std::string& server_address, int listening_port);
|
||||
~OscReceivingDevice();
|
||||
|
||||
|
||||
|
||||
|
||||
virtual void run();
|
||||
|
||||
|
||||
|
||||
|
||||
virtual void ProcessMessage( const osc::ReceivedMessage& m, const IpEndpointName& remoteEndpoint );
|
||||
virtual void ProcessPacket( const char *data, int size, const IpEndpointName& remoteEndpoint );
|
||||
virtual void ProcessBundle( const osc::ReceivedBundle& b, const IpEndpointName& remoteEndpoint );
|
||||
void addRequestHandler(RequestHandler* handler);
|
||||
|
||||
|
||||
void describeTo(std::ostream& out) const;
|
||||
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& out, const OscReceivingDevice& device)
|
||||
{
|
||||
device.describeTo(out);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
osgGA::Event* getOrCreateUserDataEvent()
|
||||
{
|
||||
if (!_userDataEvent.valid())
|
||||
@@ -130,20 +130,20 @@ public:
|
||||
}
|
||||
return _userDataEvent.get();
|
||||
}
|
||||
|
||||
|
||||
virtual const char* className() const { return "OSC receiving device"; }
|
||||
|
||||
|
||||
void addHandleOnCheckEvents(RequestHandler* handler) { _handleOnCheckEvents.push_back(handler); }
|
||||
|
||||
|
||||
virtual bool checkEvents() {
|
||||
osgGA::EventQueue* queue = getEventQueue();
|
||||
|
||||
|
||||
for(std::vector<RequestHandler*>::iterator i = _handleOnCheckEvents.begin(); i != _handleOnCheckEvents.end(); ++i) {
|
||||
(*i)->operator()(queue);
|
||||
}
|
||||
return osgGA::Device::checkEvents();
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
std::string _listeningAddress;
|
||||
unsigned int _listeningPort;
|
||||
@@ -160,14 +160,14 @@ private:
|
||||
class SendKeystrokeRequestHandler : public OscReceivingDevice::RequestHandler {
|
||||
public:
|
||||
SendKeystrokeRequestHandler(const std::string& request_path, int key) : OscReceivingDevice::RequestHandler(request_path), _key(key) {}
|
||||
virtual bool operator()(const std::string& request_path, const std::string& full_request_path, const osc::ReceivedMessage& arguments, const IpEndpointName& remoteEndPoint)
|
||||
virtual bool operator()(const std::string& /*request_path*/, const std::string& /*full_request_path*/, const osc::ReceivedMessage& /*arguments*/, const IpEndpointName& /*remoteEndPoint*/)
|
||||
{
|
||||
getDevice()->getEventQueue()->keyPress(_key);
|
||||
getDevice()->getEventQueue()->keyRelease(_key);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
virtual void describeTo(std::ostream& out) const
|
||||
{
|
||||
out << getRequestPath() << ": send KEY_DOWN + KEY_UP, code: 0x" << std::hex << _key << std::dec;
|
||||
|
||||
@@ -144,7 +144,7 @@ private:
|
||||
|
||||
inline bool operator==(const ReceivedBundleElementIterator& lhs,
|
||||
const ReceivedBundleElementIterator& rhs )
|
||||
{
|
||||
{
|
||||
return lhs.IsEqualTo( rhs );
|
||||
}
|
||||
|
||||
@@ -162,8 +162,8 @@ public:
|
||||
, argument_( argument ) {}
|
||||
|
||||
friend class ReceivedMessageArgumentIterator;
|
||||
|
||||
const char TypeTag() const { return *typeTag_; }
|
||||
|
||||
char TypeTag() const { return *typeTag_; }
|
||||
|
||||
// the unchecked methods below don't check whether the argument actually
|
||||
// is of the specified type. they should only be used if you've already
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
bool IsBlob() const { return *typeTag_ == BLOB_TYPE_TAG; }
|
||||
void AsBlob( const void*& data, unsigned long& size ) const;
|
||||
void AsBlobUnchecked( const void*& data, unsigned long& size ) const;
|
||||
|
||||
|
||||
private:
|
||||
const char *typeTag_;
|
||||
const char *argument_;
|
||||
@@ -265,13 +265,13 @@ private:
|
||||
|
||||
inline bool operator==(const ReceivedMessageArgumentIterator& lhs,
|
||||
const ReceivedMessageArgumentIterator& rhs )
|
||||
{
|
||||
{
|
||||
return lhs.IsEqualTo( rhs );
|
||||
}
|
||||
|
||||
inline bool operator!=(const ReceivedMessageArgumentIterator& lhs,
|
||||
const ReceivedMessageArgumentIterator& rhs )
|
||||
{
|
||||
{
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ class ReceivedMessageArgumentStream{
|
||||
, end_( end ) {}
|
||||
|
||||
ReceivedMessageArgumentIterator p_, end_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// end of stream
|
||||
@@ -309,7 +309,7 @@ public:
|
||||
|
||||
rhs = (*p_++).AsInt32();
|
||||
return *this;
|
||||
}
|
||||
}
|
||||
|
||||
ReceivedMessageArgumentStream& operator>>( float& rhs )
|
||||
{
|
||||
@@ -355,7 +355,7 @@ public:
|
||||
rhs = (*p_++).AsInt64();
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
ReceivedMessageArgumentStream& operator>>( TimeTag& rhs )
|
||||
{
|
||||
if( Eos() )
|
||||
@@ -382,7 +382,7 @@ public:
|
||||
(*p_++).AsBlob( rhs.data, rhs.size );
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
ReceivedMessageArgumentStream& operator>>( const char*& rhs )
|
||||
{
|
||||
if( Eos() )
|
||||
@@ -391,7 +391,7 @@ public:
|
||||
rhs = (*p_++).AsString();
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
ReceivedMessageArgumentStream& operator>>( Symbol& rhs )
|
||||
{
|
||||
if( Eos() )
|
||||
@@ -401,7 +401,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
ReceivedMessageArgumentStream& operator>>( MessageTerminator& rhs )
|
||||
ReceivedMessageArgumentStream& operator>>( MessageTerminator& /*rhs*/ )
|
||||
{
|
||||
if( !Eos() )
|
||||
throw ExcessArgumentException();
|
||||
@@ -429,12 +429,12 @@ public:
|
||||
|
||||
|
||||
typedef ReceivedMessageArgumentIterator const_iterator;
|
||||
|
||||
|
||||
ReceivedMessageArgumentIterator ArgumentsBegin() const
|
||||
{
|
||||
return ReceivedMessageArgumentIterator( typeTagsBegin_, arguments_ );
|
||||
}
|
||||
|
||||
|
||||
ReceivedMessageArgumentIterator ArgumentsEnd() const
|
||||
{
|
||||
return ReceivedMessageArgumentIterator( typeTagsEnd_, 0 );
|
||||
@@ -464,12 +464,12 @@ public:
|
||||
unsigned long ElementCount() const { return elementCount_; }
|
||||
|
||||
typedef ReceivedBundleElementIterator const_iterator;
|
||||
|
||||
|
||||
ReceivedBundleElementIterator ElementsBegin() const
|
||||
{
|
||||
return ReceivedBundleElementIterator( timeTag_ + 8 );
|
||||
}
|
||||
|
||||
|
||||
ReceivedBundleElementIterator ElementsEnd() const
|
||||
{
|
||||
return ReceivedBundleElementIterator( end_ );
|
||||
|
||||
@@ -40,7 +40,7 @@ struct JSONObjectBase : public osg::Referenced
|
||||
{
|
||||
static int level;
|
||||
static std::string indent();
|
||||
virtual void write(json_stream& str, WriteVisitor& visitor) {}
|
||||
virtual void write(json_stream& /*str*/, WriteVisitor& /*visitor*/) {}
|
||||
};
|
||||
|
||||
template <class T> struct JSONValue;
|
||||
@@ -144,7 +144,7 @@ struct JSONValue : public JSONObject
|
||||
_value = v;
|
||||
}
|
||||
T& getValue() { return _value; }
|
||||
virtual void write(json_stream& str, WriteVisitor& visitor) {
|
||||
virtual void write(json_stream& str, WriteVisitor& /*visitor*/) {
|
||||
str << _value ;
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ struct JSONValue<double> : public JSONObject
|
||||
JSONValue(const double& v) {
|
||||
_value = v;
|
||||
}
|
||||
void write(json_stream& str, WriteVisitor& visitor) {
|
||||
void write(json_stream& str, WriteVisitor& /*visitor*/) {
|
||||
if (osg::isNaN(_value)) {
|
||||
_value = 0.0;
|
||||
}
|
||||
@@ -174,7 +174,7 @@ struct JSONValue<std::string> : public JSONObject
|
||||
_value = jsonEscape(v);
|
||||
}
|
||||
|
||||
void write(json_stream& str, WriteVisitor& visitor) {
|
||||
void write(json_stream& str, WriteVisitor& /*visitor*/) {
|
||||
str << '"' << _value << '"';
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterPaths::readObject(std::istream& fin,
|
||||
return ReadResult::FILE_NOT_HANDLED;
|
||||
}
|
||||
|
||||
osgDB::ReaderWriter::ReadResult ReaderWriterPaths::read_material(std::istream& fin, const osgDB::Options* options) const
|
||||
osgDB::ReaderWriter::ReadResult ReaderWriterPaths::read_material(std::istream& fin, const osgDB::Options* /*options*/) const
|
||||
{
|
||||
osg::ref_ptr<osgPresentation::AnimationMaterial> animationMaterial = new osgPresentation::AnimationMaterial;
|
||||
animationMaterial->read(fin);
|
||||
@@ -131,14 +131,14 @@ osgDB::ReaderWriter::ReadResult ReaderWriterPaths::read_material(std::istream& f
|
||||
return animationMaterial.get();
|
||||
}
|
||||
|
||||
osgDB::ReaderWriter::ReadResult ReaderWriterPaths::read_path(std::istream& fin, const osgDB::Options* options) const
|
||||
osgDB::ReaderWriter::ReadResult ReaderWriterPaths::read_path(std::istream& fin, const osgDB::Options* /*options*/) const
|
||||
{
|
||||
osg::ref_ptr<osg::AnimationPath> animation = new osg::AnimationPath;
|
||||
animation->read(fin);
|
||||
return animation.get();
|
||||
}
|
||||
|
||||
osgDB::ReaderWriter::ReadResult ReaderWriterPaths::read_pivot_path(std::istream& fin, const osgDB::Options* options) const
|
||||
osgDB::ReaderWriter::ReadResult ReaderWriterPaths::read_pivot_path(std::istream& fin, const osgDB::Options* /*options*/) const
|
||||
{
|
||||
osg::ref_ptr<osg::AnimationPath> animation = new osg::AnimationPath;
|
||||
|
||||
@@ -203,7 +203,7 @@ struct RotationPathData
|
||||
|
||||
};
|
||||
|
||||
osgDB::ReaderWriter::ReadResult ReaderWriterPaths::read_rotation_path(std::istream& fin, const osgDB::Options* options) const
|
||||
osgDB::ReaderWriter::ReadResult ReaderWriterPaths::read_rotation_path(std::istream& fin, const osgDB::Options* /*options*/) const
|
||||
{
|
||||
osg::ref_ptr<osg::AnimationPath> animation = new osg::AnimationPath;
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ private:
|
||||
std::string _message;
|
||||
};
|
||||
|
||||
void user_error_fn(png_structp png_ptr, png_const_charp error_msg)
|
||||
void user_error_fn(png_structp /*png_ptr*/, png_const_charp error_msg)
|
||||
{
|
||||
#ifdef OSG_CPP_EXCEPTIONS_AVAILABLE
|
||||
throw PNGError(error_msg);
|
||||
@@ -58,7 +58,7 @@ void user_error_fn(png_structp png_ptr, png_const_charp error_msg)
|
||||
#endif
|
||||
}
|
||||
|
||||
void user_warning_fn(png_structp png_ptr, png_const_charp warning_msg)
|
||||
void user_warning_fn(png_structp /*png_ptr*/, png_const_charp warning_msg)
|
||||
{
|
||||
OSG_WARN << "PNG lib warning : " << warning_msg << std::endl;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class ReaderQFont : public osgDB::ReaderWriter
|
||||
|
||||
virtual const char* className() const { return "QFont Font Reader"; }
|
||||
|
||||
virtual ReadResult readObject(const std::string& file, const osgDB::ReaderWriter::Options* options) const
|
||||
virtual ReadResult readObject(const std::string& file, const osgDB::ReaderWriter::Options* /*options*/) const
|
||||
{
|
||||
if (!acceptsExtension(osgDB::getLowerCaseFileExtension(file)))
|
||||
return ReadResult::FILE_NOT_HANDLED;
|
||||
|
||||
@@ -48,7 +48,7 @@ class ReaderWriterRevisions : public osgDB::ReaderWriter
|
||||
else return readFileList(fin, fileName, options);
|
||||
}
|
||||
|
||||
ReadResult readFileList(std::istream& fin, const std::string& name, const osgDB::ReaderWriter::Options* options) const
|
||||
ReadResult readFileList(std::istream& fin, const std::string& name, const osgDB::ReaderWriter::Options* /*options*/) const
|
||||
{
|
||||
OSG_INFO<<" readFileList="<<name<<std::endl;
|
||||
|
||||
|
||||
@@ -346,7 +346,7 @@ private:
|
||||
osg::Matrix m_mat;
|
||||
bool m_dontSaveNormals;
|
||||
|
||||
inline void operator () (const osg::Vec3& _v1, const osg::Vec3& _v2, const osg::Vec3& _v3, bool treatVertexDataAsTemporary)
|
||||
inline void operator () (const osg::Vec3& _v1, const osg::Vec3& _v2, const osg::Vec3& _v3, bool /*treatVertexDataAsTemporary*/)
|
||||
{
|
||||
osg::Vec3 v1 = _v1 * m_mat;
|
||||
osg::Vec3 v2 = _v2 * m_mat;
|
||||
|
||||
@@ -180,7 +180,7 @@ public:
|
||||
|
||||
|
||||
// Returns true if we are under billboard subgraph
|
||||
inline const bool underBillboardSubgraph() const
|
||||
inline bool underBillboardSubgraph() const
|
||||
{
|
||||
return _underBillboardSubgraph;
|
||||
}
|
||||
@@ -216,7 +216,7 @@ public:
|
||||
DeferredLightAttribute& getLightAttribute(int ix);
|
||||
|
||||
// Returns if we are under layer subgraph
|
||||
inline const bool underLayerSubgraph() const
|
||||
inline bool underLayerSubgraph() const
|
||||
{
|
||||
return _underLayerSubgraph;
|
||||
}
|
||||
|
||||
@@ -702,7 +702,7 @@ osg::Image* ReadVTFFile(std::istream& _istream)
|
||||
}
|
||||
|
||||
|
||||
bool WriteVTFFile(const osg::Image *img, std::ostream& fout)
|
||||
bool WriteVTFFile(const osg::Image* /*img*/, std::ostream& /*fout*/)
|
||||
{
|
||||
// Not supported
|
||||
return false;
|
||||
|
||||
@@ -20,7 +20,7 @@ class ReaderWriterZIP : public osgDB::ReaderWriter
|
||||
virtual const char* className() const { return "ZIP Database Reader/Writer"; }
|
||||
|
||||
|
||||
virtual ReadResult openArchive(const std::string& file,ArchiveStatus status, unsigned int indexBlockSize = 4096, const Options* options = NULL) const
|
||||
virtual ReadResult openArchive(const std::string& file,ArchiveStatus /*status*/, unsigned int /*indexBlockSize*/ = 4096, const Options* options = NULL) const
|
||||
{
|
||||
|
||||
std::string ext = osgDB::getLowerCaseFileExtension(file);
|
||||
|
||||
@@ -111,7 +111,7 @@ bool ZipArchive::getFileNames(osgDB::Archive::FileNameList& fileNameList) const
|
||||
}
|
||||
}
|
||||
|
||||
bool ZipArchive::open(const std::string& file, ArchiveStatus status, const osgDB::ReaderWriter::Options* options)
|
||||
bool ZipArchive::open(const std::string& file, ArchiveStatus /*status*/, const osgDB::ReaderWriter::Options* options)
|
||||
{
|
||||
if ( !_zipLoaded )
|
||||
{
|
||||
@@ -371,7 +371,7 @@ osgDB::ReaderWriter::WriteResult ZipArchive::writeShader(const osg::Shader& /*sh
|
||||
}
|
||||
|
||||
|
||||
osgDB::ReaderWriter* ZipArchive::ReadFromZipEntry(const ZIPENTRY* ze, const osgDB::ReaderWriter::Options* options, std::stringstream& buffer) const
|
||||
osgDB::ReaderWriter* ZipArchive::ReadFromZipEntry(const ZIPENTRY* ze, const osgDB::ReaderWriter::Options* /*options*/, std::stringstream& buffer) const
|
||||
{
|
||||
if (ze != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user