Removed 'using namespace' from header

This commit is contained in:
Fernando García Liñán
2019-12-24 03:31:28 +01:00
parent d5957b8c5f
commit 120328eb2b
2 changed files with 10 additions and 13 deletions

View File

@@ -53,9 +53,6 @@ class Technique;
class Effect;
class SGReaderWriterOptions;
using namespace osg;
using namespace std;
/**
* Object to be initialized at some point after an effect -- and its
* containing effect geode -- are hooked into the scene graph. Some
@@ -179,9 +176,9 @@ void mergePropertyTrees(SGPropertyNode* resultNode,
class UniformFactoryImpl {
public:
ref_ptr<Uniform> getUniform( Effect * effect,
osg::ref_ptr<osg::Uniform> getUniform( Effect * effect,
const string & name,
Uniform::Type uniformType,
osg::Uniform::Type uniformType,
SGConstPropertyNode_ptr valProp,
const SGReaderWriterOptions* options );
void updateListeners( SGPropertyNode* propRoot );
@@ -194,9 +191,9 @@ private:
SGMutex _mutex;
typedef boost::tuple<std::string, Uniform::Type, std::string, std::string> UniformCacheKey;
typedef boost::tuple<ref_ptr<Uniform>, SGPropertyChangeListener*> UniformCacheValue;
std::map<UniformCacheKey,ref_ptr<Uniform> > uniformCache;
typedef boost::tuple<std::string, osg::Uniform::Type, std::string, std::string> UniformCacheKey;
typedef boost::tuple<osg::ref_ptr<osg::Uniform>, SGPropertyChangeListener*> UniformCacheValue;
std::map<UniformCacheKey,osg::ref_ptr<osg::Uniform> > uniformCache;
typedef std::queue<DeferredPropertyListener*> DeferredListenerList;
DeferredListenerList deferredListenerList;

View File

@@ -89,7 +89,7 @@ PassBuilder::build(Compositor *compositor, const SGPropertyNode *root,
pass->type = root->getStringValue("type");
pass->effect_scheme = root->getStringValue("effect-scheme");
osg::Camera *camera = new Camera;
osg::Camera *camera = new osg::Camera;
pass->camera = camera;
camera->setName(pass->name);
@@ -107,8 +107,8 @@ PassBuilder::build(Compositor *compositor, const SGPropertyNode *root,
camera->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
// XXX: Should we make this configurable?
camera->setCullingMode(CullSettings::SMALL_FEATURE_CULLING
| CullSettings::VIEW_FRUSTUM_CULLING);
camera->setCullingMode(osg::CullSettings::SMALL_FEATURE_CULLING
| osg::CullSettings::VIEW_FRUSTUM_CULLING);
osg::Node::NodeMask cull_mask =
std::stoul(root->getStringValue("cull-mask", "0xffffffff"), nullptr, 0);
@@ -639,8 +639,8 @@ public:
protected:
// Given a projection matrix, return a new one with the same frustum
// sides and new near / far values.
void makeNewProjMat(Matrixd& oldProj, double znear,
double zfar, Matrixd& projection) {
void makeNewProjMat(osg::Matrixd& oldProj, double znear,
double zfar, osg::Matrixd& projection) {
projection = oldProj;
// Slightly inflate the near & far planes to avoid objects at the
// extremes being clipped out.