Build fixes for build without ref_ptr<> automatic type conversion
This commit is contained in:
parent
079b7653bd
commit
380fb17fa9
@ -866,7 +866,7 @@ public:
|
||||
serializer->add(#VALUE, MyClass::VALUE)
|
||||
|
||||
#define END_ENUM_SERIALIZER() \
|
||||
wrapper->addSerializer(serializer); }
|
||||
wrapper->addSerializer(serializer.get()); }
|
||||
|
||||
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ StackedTransform::StackedTransform(const StackedTransform& rhs, const osg::CopyO
|
||||
reserve(rhs.size());
|
||||
for (StackedTransform::const_iterator it = rhs.begin(); it != rhs.end(); ++it)
|
||||
{
|
||||
const StackedTransformElement* element = *it;
|
||||
const StackedTransformElement* element = it->get();
|
||||
if (element)
|
||||
push_back(osg::clone(element,co));
|
||||
}
|
||||
@ -36,7 +36,7 @@ void StackedTransform::update()
|
||||
for (StackedTransform::iterator it = begin(); it != end(); ++it)
|
||||
{
|
||||
|
||||
StackedTransformElement* element = *it;
|
||||
StackedTransformElement* element = it->get();
|
||||
if (!element)
|
||||
continue;
|
||||
// update and check if there are changes
|
||||
@ -53,7 +53,7 @@ void StackedTransform::update()
|
||||
_matrix.makeIdentity();
|
||||
for (StackedTransform::iterator it = begin(); it != end(); ++it)
|
||||
{
|
||||
StackedTransformElement* element = *it;
|
||||
StackedTransformElement* element = it->get();
|
||||
if (!element || element->isIdentity())
|
||||
continue;
|
||||
element->applyToMatrix(_matrix);
|
||||
|
@ -52,7 +52,7 @@ bool UpdateMatrixTransform::link(osgAnimation::Channel* channel)
|
||||
// check if we can link a StackedTransformElement to the current Channel
|
||||
for (StackedTransform::iterator it = _transforms.begin(); it != _transforms.end(); ++it)
|
||||
{
|
||||
StackedTransformElement* element = *it;
|
||||
StackedTransformElement* element = it->get();
|
||||
if (element && !element->getName().empty() && channelName == element->getName())
|
||||
{
|
||||
Target* target = element->getOrCreateTarget();
|
||||
|
@ -280,7 +280,7 @@ ConvertFromInventor::convert(SoNode* ivRootNode)
|
||||
// Initialize Inventor state stack
|
||||
// (ivStateStack is used to track the state that is not accessible by
|
||||
// SoCallbackAction functions)
|
||||
ivStateStack.push(IvStateItem(ivRootNode, osgRootNode));
|
||||
ivStateStack.push(IvStateItem(ivRootNode, osgRootNode.get()));
|
||||
|
||||
// Create callback actions for the inventor nodes
|
||||
// These callback functions perform the conversion
|
||||
@ -511,18 +511,7 @@ ConvertFromInventor::ivPopState(const SoCallbackAction *action,
|
||||
"ivStateStack push was initiated by different node.");
|
||||
|
||||
// Get osgStateRoot (note: we HAVE TO reference it)
|
||||
osg::Group *stateRoot = ivState.osgStateRoot;
|
||||
osg::ref_ptr<osg::Group> r = stateRoot;
|
||||
/* assert(strcmp(stateRoot->className(), "Group") == 0 &&
|
||||
"IvStateStack osg graph is expected to be "
|
||||
"headed by osg::Group");
|
||||
if (stateRoot->getNumChildren() == 1) {
|
||||
r = stateRoot->getChild(0)->asGroup();
|
||||
osg::notify(osg::FATAL) << stateRoot->className() << std::endl;
|
||||
osg::notify(osg::FATAL) << stateRoot->getChild(0)->className() << std::endl;
|
||||
exit(0);
|
||||
assert(r != NULL && "Node must be group.");
|
||||
}*/
|
||||
osg::ref_ptr<osg::Group> r = ivState.osgStateRoot;
|
||||
|
||||
// Pop state
|
||||
ivStateStack.pop();
|
||||
@ -538,7 +527,7 @@ ConvertFromInventor::ivPopState(const SoCallbackAction *action,
|
||||
|
||||
// APPEND_AT_PUSH
|
||||
if (!(ivState.flags & IvStateItem::APPEND_AT_PUSH))
|
||||
appendNode(r, action);
|
||||
appendNode(r.get(), action);
|
||||
|
||||
} while (multipop);
|
||||
|
||||
@ -1228,7 +1217,7 @@ convertShader(osg::Shader::Type osgShaderType,
|
||||
return false;
|
||||
}
|
||||
|
||||
return osgProgram->addShader(osgShader);
|
||||
return osgProgram->addShader(osgShader.get());
|
||||
}
|
||||
#endif // INVENTOR_SHADERS_AVAILABLE
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
@ -50,7 +50,7 @@ bool UpdateMatrixTransform_writeLocalData(const Object& obj, Output& fw)
|
||||
const osgAnimation::StackedTransform& transforms = uc->getStackedTransforms();
|
||||
for (osgAnimation::StackedTransform::const_iterator it = transforms.begin(); it != transforms.end(); ++it)
|
||||
{
|
||||
osgAnimation::StackedTransformElement* element = *it;
|
||||
osgAnimation::StackedTransformElement* element = it->get();
|
||||
if (element)
|
||||
fw.writeObject(*element);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user