Added .get()'s to fix compilation when ref_ptr<> type conversion is disabled
This commit is contained in:
parent
f9356603cf
commit
8ed0780967
@ -386,7 +386,7 @@ public:
|
||||
|
||||
osgViewer::View* view = dynamic_cast<osgViewer::View*>(&aa);
|
||||
if (view)
|
||||
view->addEventHandler(new PickHandler(_device));
|
||||
view->addEventHandler(new PickHandler(_device.get()));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -468,7 +468,7 @@ int main( int argc, char **argv )
|
||||
osg::ref_ptr<osgGA::Device> device = osgDB::readFile<osgGA::Device>("0.0.0.0:9000.receiver.osc");
|
||||
if (device.valid() && (device->getCapabilities() & osgGA::Device::RECEIVE_EVENTS))
|
||||
{
|
||||
view->addDevice(device);
|
||||
view->addDevice(device.get());
|
||||
|
||||
// add a zeroconf device, advertising the osc-device
|
||||
if(use_zeroconf)
|
||||
@ -505,7 +505,7 @@ int main( int argc, char **argv )
|
||||
viewer.addView(view);
|
||||
|
||||
osg::Group* g = new osg::Group();
|
||||
g->addChild(scene);
|
||||
g->addChild(scene.get());
|
||||
g->addChild(createHUD());
|
||||
view->setSceneData(g);
|
||||
view->getCamera()->setName("Cam one");
|
||||
@ -535,10 +535,10 @@ int main( int argc, char **argv )
|
||||
if (device.valid() && (device->getCapabilities() & osgGA::Device::SEND_EVENTS))
|
||||
{
|
||||
// add as first event handler, so it gets ALL events ...
|
||||
view->getEventHandlers().push_front(new ForwardToDeviceEventHandler(device));
|
||||
view->getEventHandlers().push_front(new ForwardToDeviceEventHandler(device.get()));
|
||||
|
||||
// add the demo-pick-event-handler
|
||||
view->addEventHandler(new PickHandler(device));
|
||||
view->addEventHandler(new PickHandler(device.get()));
|
||||
}
|
||||
else {
|
||||
OSG_WARN << "could not open osc-device, sending will not work" << std::endl;
|
||||
|
@ -372,7 +372,7 @@ void ImageSequence::update(osg::NodeVisitor* nv)
|
||||
if (image.valid())
|
||||
{
|
||||
OSG_NOTICE<<" Assigning image "<<_imageDataList[i]._filename<<std::endl;
|
||||
_setImage(i, image);
|
||||
_setImage(i, image.get());
|
||||
setImageToChild(i);
|
||||
}
|
||||
else
|
||||
|
@ -1805,9 +1805,9 @@ ReaderWriter* Registry::getReaderWriterForProtocolAndExtension(const std::string
|
||||
{
|
||||
// if we have a readerwriter which supports wildcards, save it as a fallback
|
||||
if ((*i)->acceptsExtension("*"))
|
||||
result = *i;
|
||||
result = i->get();
|
||||
else if ((*i)->acceptsExtension(extension))
|
||||
return *i;
|
||||
return i->get();
|
||||
}
|
||||
|
||||
return result ? result : getReaderWriterForExtension("curl");
|
||||
|
@ -1083,7 +1083,7 @@ bool ReaderWriterP3DXML::parsePropertyAnimation(osgDB::XmlNode* root, osgPresent
|
||||
if (parseProperties(cur, *udc))
|
||||
{
|
||||
OSG_NOTICE<<"Adding keyframe"<<std::endl;
|
||||
pa.addKeyFrame(time, udc);
|
||||
pa.addKeyFrame(time, udc.get());
|
||||
readKeyframes = true;
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ struct AssignDirectionColour
|
||||
if (!colours)
|
||||
{
|
||||
colours = new osg::Vec4Array;
|
||||
geometry->setColorArray(colours);
|
||||
geometry->setColorArray(colours.get());
|
||||
}
|
||||
geometry->setColorBinding(osg::Geometry::BIND_PER_VERTEX);
|
||||
colours->resize(vertices->size(), osg::Vec4(0.0,0.0,0.0,0.0));
|
||||
@ -82,7 +82,7 @@ struct AssignDirectionColour
|
||||
if (!normals)
|
||||
{
|
||||
normals = new osg::Vec3Array;
|
||||
geometry->setNormalArray(normals);
|
||||
geometry->setNormalArray(normals.get());
|
||||
}
|
||||
geometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX);
|
||||
normals->resize(vertices->size(), osg::Vec3(0.0,0.0,0.0));
|
||||
@ -175,7 +175,7 @@ struct AssignDirectionColour
|
||||
vertexShader = new osg::Shader(osg::Shader::VERTEX, vert_shader_str);
|
||||
}
|
||||
|
||||
program->addShader(vertexShader);
|
||||
program->addShader(vertexShader.get());
|
||||
|
||||
stateset->setAttribute(program.get());
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ bool PickEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
|
||||
{
|
||||
if (ea.getEventType()==osgGA::GUIEventAdapter::PUSH)
|
||||
{
|
||||
_drawablesOnPush.insert( hitr->drawable );
|
||||
_drawablesOnPush.insert( hitr->drawable.get() );
|
||||
}
|
||||
else if (ea.getEventType()==osgGA::GUIEventAdapter::MOVE)
|
||||
{
|
||||
@ -110,7 +110,7 @@ bool PickEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
|
||||
}
|
||||
else if (ea.getEventType()==osgGA::GUIEventAdapter::RELEASE)
|
||||
{
|
||||
if (_drawablesOnPush.find(hitr->drawable) != _drawablesOnPush.end())
|
||||
if (_drawablesOnPush.find(hitr->drawable.get()) != _drawablesOnPush.end())
|
||||
doOperation();
|
||||
return true;
|
||||
}
|
||||
|
@ -462,7 +462,7 @@ void SlideShowConstructor::addLayer(bool inheritPreviousLayers, bool defineAsBas
|
||||
osg::Vec3 localPosition = computePositionInModelCoords(_titlePositionData);
|
||||
|
||||
osgText::Text* text = new osgText::Text;
|
||||
text->setFont(osgText::readFontFile(_titleFontData.font, _options));
|
||||
text->setFont(osgText::readFontFile(_titleFontData.font, _options.get()));
|
||||
text->setColor(_titleFontData.color);
|
||||
text->setCharacterSize(_titleFontData.characterSize*_slideHeight);
|
||||
text->setFontResolution(110,120);
|
||||
@ -681,7 +681,7 @@ void SlideShowConstructor::addBullet(const std::string& bullet, PositionData& po
|
||||
|
||||
osg::Vec3 localPosition = computePositionInModelCoords(positionData);
|
||||
|
||||
text->setFont(osgText::readFontFile(fontData.font, _options));
|
||||
text->setFont(osgText::readFontFile(fontData.font, _options.get()));
|
||||
text->setColor(fontData.color);
|
||||
text->setCharacterSize(fontData.characterSize*_slideHeight);
|
||||
text->setCharacterSizeMode(fontData.characterSizeMode);
|
||||
@ -729,7 +729,7 @@ void SlideShowConstructor::addParagraph(const std::string& paragraph, PositionDa
|
||||
|
||||
osgText::Text* text = new osgText::Text;
|
||||
|
||||
text->setFont(osgText::readFontFile(fontData.font, _options));
|
||||
text->setFont(osgText::readFontFile(fontData.font, _options.get()));
|
||||
text->setColor(fontData.color);
|
||||
text->setCharacterSize(fontData.characterSize*_slideHeight);
|
||||
text->setCharacterSizeMode(fontData.characterSizeMode);
|
||||
@ -2572,19 +2572,19 @@ void SlideShowConstructor::addVolume(const std::string& filename, const Position
|
||||
|
||||
|
||||
osgVolume::AlphaFuncProperty* ap = new osgVolume::AlphaFuncProperty(0.1f);
|
||||
setUpVolumeScalarProperty(tile, ap, volumeData.cutoffValue);
|
||||
setUpVolumeScalarProperty(tile.get(), ap, volumeData.cutoffValue);
|
||||
|
||||
osgVolume::TransparencyProperty* tp = new osgVolume::TransparencyProperty(1.0f);
|
||||
setUpVolumeScalarProperty(tile, tp, volumeData.alphaValue);
|
||||
setUpVolumeScalarProperty(tile.get(), tp, volumeData.alphaValue);
|
||||
|
||||
osgVolume::SampleDensityProperty* sd = new osgVolume::SampleDensityProperty(0.005);
|
||||
setUpVolumeScalarProperty(tile, sd, volumeData.sampleDensityValue);
|
||||
setUpVolumeScalarProperty(tile.get(), sd, volumeData.sampleDensityValue);
|
||||
|
||||
osgVolume::SampleDensityWhenMovingProperty* sdm = 0;
|
||||
if (!volumeData.sampleDensityWhenMovingValue.empty())
|
||||
{
|
||||
sdm = new osgVolume::SampleDensityWhenMovingProperty(0.005);
|
||||
setUpVolumeScalarProperty(tile, sdm, volumeData.sampleDensityWhenMovingValue);
|
||||
setUpVolumeScalarProperty(tile.get(), sdm, volumeData.sampleDensityWhenMovingValue);
|
||||
}
|
||||
|
||||
osgVolume::TransferFunctionProperty* tfp = volumeData.transferFunction.valid() ? new osgVolume::TransferFunctionProperty(volumeData.transferFunction.get()) : 0;
|
||||
@ -2622,7 +2622,7 @@ void SlideShowConstructor::addVolume(const std::string& filename, const Position
|
||||
|
||||
|
||||
osgVolume::IsoSurfaceProperty* isp = new osgVolume::IsoSurfaceProperty(0.1);
|
||||
setUpVolumeScalarProperty(tile, isp, volumeData.alphaValue);
|
||||
setUpVolumeScalarProperty(tile.get(), isp, volumeData.alphaValue);
|
||||
cp->addProperty(isp);
|
||||
|
||||
if (sdm) cp->addProperty(sdm);
|
||||
|
@ -4675,7 +4675,7 @@ void Optimizer::FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor::apply(
|
||||
{
|
||||
parent_group->replaceChild(&transform, group.get());
|
||||
// also replace the node in the nodepath
|
||||
_nodePath[nodepathsize-1] = group;
|
||||
_nodePath[nodepathsize-1] = group.get();
|
||||
// traverse the new Group
|
||||
traverse(*(group.get()));
|
||||
}
|
||||
@ -4711,7 +4711,7 @@ void Optimizer::FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor::apply(
|
||||
{
|
||||
parent_group->replaceChild(&lod, new_lod.get());
|
||||
// also replace the node in the nodepath
|
||||
_nodePath[nodepathsize-1] = new_lod;
|
||||
_nodePath[nodepathsize-1] = new_lod.get();
|
||||
// move center point
|
||||
if(!_matrixStack.empty())
|
||||
new_lod->setCenter(new_lod->getCenter() * _matrixStack.back());
|
||||
|
Loading…
Reference in New Issue
Block a user