Fixed warnings

This commit is contained in:
Robert Osfield
2009-01-09 15:55:25 +00:00
parent 2287f1190b
commit b5a2dc4cfb
6 changed files with 30 additions and 24 deletions

View File

@@ -181,7 +181,8 @@ osg::Geode *daeReader::processGeometry( domGeometry *geo )
// 1 <vertices>
// 0..* <lines>, <linestrips>, <polygons>, <polylist>, <triangles>, <trifans>, <tristrips>
// 0..* <extra>
size_t count = mesh->getContents().getCount();
// size_t count = mesh->getContents().getCount();
// 1..* <source>
SourceMap sources;

View File

@@ -145,7 +145,7 @@ osg::Node* daeReader::processOsgSequence(domTechnique* teq)
osg::notify(osg::WARN) << "Expected element 'LastFrameTime' not found" << std::endl;
}
osg::Sequence::LoopMode loopmode;
osg::Sequence::LoopMode loopmode = osg::Sequence::LOOP;
any = daeSafeCast< domAny >(teq->getChild("LoopMode"));
if (any)
{
@@ -558,8 +558,8 @@ osg::Node* daeReader::processCamera( domCamera * dcamera )
osg::notify(osg::WARN) << "Expected <xfov> or <yfov> in <camera> '" << dcamera->getId() << "'" << std::endl;
}
domTargetableFloat *pZnear = daeSafeCast< domTargetableFloat >(pDomPerspective->getZnear());
domTargetableFloat *pZfar = daeSafeCast< domTargetableFloat >(pDomPerspective->getZfar());
//domTargetableFloat *pZnear = daeSafeCast< domTargetableFloat >(pDomPerspective->getZnear());
//domTargetableFloat *pZfar = daeSafeCast< domTargetableFloat >(pDomPerspective->getZfar());
// TODO The current osg::CameraView does not support storage of near far
}
@@ -569,15 +569,16 @@ osg::Node* daeReader::processCamera( domCamera * dcamera )
// 1 <xmag>, <ymag>, <xmag> and <ymag>, <xmag> and <aspect_ratio>, <ymag> and <aspect_ratio>
// 1 <znear>
// 1 <zfar>
domTargetableFloat *pXmag = daeSafeCast< domTargetableFloat >(pDomOrthographic->getXmag());
domTargetableFloat *pYmag = daeSafeCast< domTargetableFloat >(pDomOrthographic->getYmag());
domTargetableFloat *pAspectRatio = daeSafeCast< domTargetableFloat >(pDomOrthographic->getAspect_ratio());
//domTargetableFloat *pXmag = daeSafeCast< domTargetableFloat >(pDomOrthographic->getXmag());
//domTargetableFloat *pYmag = daeSafeCast< domTargetableFloat >(pDomOrthographic->getYmag());
//domTargetableFloat *pAspectRatio = daeSafeCast< domTargetableFloat >(pDomOrthographic->getAspect_ratio());
// TODO The current osg::CameraView does not support an orthographic view
osg::notify(osg::WARN) << "Orthographic in <camera> '" << dcamera->getId() << "' not supported" << std::endl;
domTargetableFloat *pZnear = daeSafeCast< domTargetableFloat >(pDomOrthographic->getZnear());
domTargetableFloat *pZfar = daeSafeCast< domTargetableFloat >(pDomOrthographic->getZfar());
//domTargetableFloat *pZnear = daeSafeCast< domTargetableFloat >(pDomOrthographic->getZnear());
//domTargetableFloat *pZfar = daeSafeCast< domTargetableFloat >(pDomOrthographic->getZfar());
// TODO The current osg::CameraView does not support storage of near far
}

View File

@@ -21,17 +21,16 @@
using namespace osgdae;
daeReader::daeReader(DAE *dae_) : dae(dae_),
rootNode(NULL),
m_numlights(0),
currentEffect(NULL),
currentInstance_effect(NULL),
geometryMap(),
materialMap(),
m_AuthoringTool(UNKNOWN),
daeReader::daeReader(DAE *dae_) :
m_AssetUnitName("meter"),
m_AssetUnitMeter(1.0),
m_AssetUp_axis(UPAXISTYPE_Y_UP)
m_AssetUp_axis(UPAXISTYPE_Y_UP),
dae(dae_),
rootNode(NULL),
m_numlights(0),
currentInstance_effect(NULL),
currentEffect(NULL),
m_AuthoringTool(UNKNOWN)
{
}

View File

@@ -220,11 +220,11 @@ protected:
typedef std::map< std::string, osg::StateSet*> MaterialStateSetMap;
/// Maps geometry to a Geode
domGeometryGeodeMap geometryMap;
domGeometryGeodeMap geometryMap;
// Maps material target to stateset
domMaterialStateSetMap materialMap;
domMaterialStateSetMap materialMap;
// Maps material symbol to stateset
MaterialStateSetMap materialMap2;
MaterialStateSetMap materialMap2;
enum AuthoringTool
{

View File

@@ -111,17 +111,21 @@ void daeWriter::appendGeometryIndices(osg::Geometry *geom,
p->getValue().append( verts.inds!=NULL?verts.inds->index( vindex ):vindex );
if ( norm != NULL )
{
if ( geom->getNormalBinding() == osg::Geometry::BIND_PER_VERTEX )
p->getValue().append( normals.inds!=NULL?normals.inds->index( vindex ):vindex );
else
p->getValue().append( normals.inds!=NULL?normals.inds->index( ncount ):ncount );
}
if ( color != NULL )
{
if ( geom->getColorBinding() == osg::Geometry::BIND_PER_VERTEX )
p->getValue().append( colors.inds!=NULL?colors.inds->index( vindex ):vindex );
else
p->getValue().append( colors.inds!=NULL?colors.inds->index( ccount ):ccount );
}
for ( unsigned int ti = 0; ti < texcoords.size(); ti++ )
{
//ArrayNIndices &tc = texcoords[ti];

View File

@@ -43,10 +43,11 @@ std::string toString(osg::Matrix value)
daeWriter::daeWriter( DAE *dae_, const std::string &fileURI, bool _usePolygons, bool GoogleMode, TraversalMode tm, bool _writeExtras) : osg::NodeVisitor( tm ),
dae(dae_),
writeExtras(_writeExtras),
rootName(*dae_),
usePolygons (_usePolygons),
m_GoogleMode(GoogleMode),
writeExtras(_writeExtras)
m_CurrentRenderingHint(osg::StateSet::DEFAULT_BIN)
{
success = true;