Changed build OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION to ON and then fixed all the resulting build errors.
This commit is contained in:
parent
7c4225e574
commit
ad8f2d8974
@ -1710,7 +1710,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterP3DXML::readNode(const std::string&
|
|||||||
input.open(fileName);
|
input.open(fileName);
|
||||||
input.readAllDataIntoBuffer();
|
input.readAllDataIntoBuffer();
|
||||||
|
|
||||||
return readNode(input, local_opt);
|
return readNode(input, local_opt.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
osgDB::ReaderWriter::ReadResult ReaderWriterP3DXML::readNode(std::istream& fin, const Options* options) const
|
osgDB::ReaderWriter::ReadResult ReaderWriterP3DXML::readNode(std::istream& fin, const Options* options) const
|
||||||
@ -1723,7 +1723,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterP3DXML::readNode(std::istream& fin,
|
|||||||
//local_opt->setFindFileCallback(new MyFindFileCallback);
|
//local_opt->setFindFileCallback(new MyFindFileCallback);
|
||||||
local_opt->setReadFileCallback(new MyReadFileCallback);
|
local_opt->setReadFileCallback(new MyReadFileCallback);
|
||||||
|
|
||||||
return readNode(input, local_opt);
|
return readNode(input, local_opt.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
osgDB::ReaderWriter::ReadResult ReaderWriterP3DXML::readNode(osgDB::XmlNode::Input& input, osgDB::ReaderWriter::Options* options) const
|
osgDB::ReaderWriter::ReadResult ReaderWriterP3DXML::readNode(osgDB::XmlNode::Input& input, osgDB::ReaderWriter::Options* options) const
|
||||||
|
@ -93,7 +93,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterPaths::readObject(const std::string&
|
|||||||
|
|
||||||
std::ifstream input(fileName.c_str());
|
std::ifstream input(fileName.c_str());
|
||||||
|
|
||||||
return readObject(input, local_opt);
|
return readObject(input, local_opt.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
osgDB::ReaderWriter::ReadResult ReaderWriterPaths::readObject(std::istream& fin, const osgDB::Options* options) const
|
osgDB::ReaderWriter::ReadResult ReaderWriterPaths::readObject(std::istream& fin, const osgDB::Options* options) const
|
||||||
@ -234,12 +234,12 @@ osgDB::ReaderWriter::ReadResult ReaderWriterPaths::read_rotation_path(std::istre
|
|||||||
localValue.azim = currValue.azim *r + prevValue.azim * (1.0f-r);
|
localValue.azim = currValue.azim *r + prevValue.azim * (1.0f-r);
|
||||||
localValue.elevation = currValue.elevation *r + prevValue.elevation * (1.0f-r);
|
localValue.elevation = currValue.elevation *r + prevValue.elevation * (1.0f-r);
|
||||||
|
|
||||||
localValue.addToPath(animation);
|
localValue.addToPath(animation.get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
currValue.addToPath(animation);
|
currValue.addToPath(animation.get());
|
||||||
}
|
}
|
||||||
prevValue = currValue;
|
prevValue = currValue;
|
||||||
first = false;
|
first = false;
|
||||||
|
@ -68,7 +68,7 @@ osg::Shader * VirtualProgram::setShader
|
|||||||
shaderCurrent = shaderNew;
|
shaderCurrent = shaderNew;
|
||||||
}
|
}
|
||||||
|
|
||||||
return shaderCurrent;
|
return shaderCurrent.release();
|
||||||
}
|
}
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void VirtualProgram::apply( osg::State & state ) const
|
void VirtualProgram::apply( osg::State & state ) const
|
||||||
@ -170,7 +170,7 @@ void VirtualProgram::apply( osg::State & state ) const
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
state.applyAttribute( program );
|
state.applyAttribute( program.get() );
|
||||||
} else {
|
} else {
|
||||||
Program::apply( state );
|
Program::apply( state );
|
||||||
}
|
}
|
||||||
|
@ -93,14 +93,14 @@ public:
|
|||||||
// osg::notify(osg::NOTICE)<<"LoadAndCompileOperation "<<_filename<<std::endl;
|
// osg::notify(osg::NOTICE)<<"LoadAndCompileOperation "<<_filename<<std::endl;
|
||||||
|
|
||||||
_loadedModel = osgDB::readNodeFile(_filename);
|
_loadedModel = osgDB::readNodeFile(_filename);
|
||||||
|
|
||||||
if (_loadedModel.valid() && _incrementalCompileOperation.valid())
|
if (_loadedModel.valid() && _incrementalCompileOperation.valid())
|
||||||
{
|
{
|
||||||
osg::ref_ptr<osgUtil::IncrementalCompileOperation::CompileSet> compileSet =
|
osg::ref_ptr<osgUtil::IncrementalCompileOperation::CompileSet> compileSet =
|
||||||
new osgUtil::IncrementalCompileOperation::CompileSet(_loadedModel);
|
new osgUtil::IncrementalCompileOperation::CompileSet(_loadedModel.get());
|
||||||
|
|
||||||
compileSet->_compileCompletedCallback = new ReleaseBlockOnCompileCompleted(_block.get());
|
compileSet->_compileCompletedCallback = new ReleaseBlockOnCompileCompleted(_block.get());
|
||||||
|
|
||||||
_incrementalCompileOperation->add(compileSet.get());
|
_incrementalCompileOperation->add(compileSet.get());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -36,7 +36,7 @@ namespace osgAnimation
|
|||||||
StatsActionVisitor(osg::Stats* stats, unsigned int frame);
|
StatsActionVisitor(osg::Stats* stats, unsigned int frame);
|
||||||
void reset();
|
void reset();
|
||||||
const std::vector<std::string>& getChannels() const { return _channels; }
|
const std::vector<std::string>& getChannels() const { return _channels; }
|
||||||
osg::Stats* getStats() { return _stats; }
|
osg::Stats* getStats() { return _stats.get(); }
|
||||||
void setStats(osg::Stats* stats) { _stats = stats; }
|
void setStats(osg::Stats* stats) { _stats = stats; }
|
||||||
void setFrame(unsigned int frame) { _frame = frame; }
|
void setFrame(unsigned int frame) { _frame = frame; }
|
||||||
void apply(Timeline& action);
|
void apply(Timeline& action);
|
||||||
|
@ -105,7 +105,7 @@ class OSGDB_EXPORT DatabaseRevisions : public osg::Object
|
|||||||
void addRevision(DatabaseRevision* revision);
|
void addRevision(DatabaseRevision* revision);
|
||||||
void removeRevision(DatabaseRevision* revision);
|
void removeRevision(DatabaseRevision* revision);
|
||||||
|
|
||||||
DatabaseRevision* getDatabaseRevision(unsigned int i) { return i<_revisionList.size() ? _revisionList[i] : 0; }
|
DatabaseRevision* getDatabaseRevision(unsigned int i) { return i<_revisionList.size() ? _revisionList[i].get() : 0; }
|
||||||
|
|
||||||
DatabaseRevisionList& getDatabaseRevisionList() { return _revisionList; }
|
DatabaseRevisionList& getDatabaseRevisionList() { return _revisionList; }
|
||||||
const DatabaseRevisionList& getDatabaseRevisionList() const { return _revisionList; }
|
const DatabaseRevisionList& getDatabaseRevisionList() const { return _revisionList; }
|
||||||
|
@ -26,7 +26,7 @@ osgAnimation::Action::Callback* osgAnimation::Action::getFrameCallback(unsigned
|
|||||||
{
|
{
|
||||||
if (_framesCallback.find(frame) != _framesCallback.end())
|
if (_framesCallback.find(frame) != _framesCallback.end())
|
||||||
{
|
{
|
||||||
return _framesCallback[frame];
|
return _framesCallback[frame].get();
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -146,7 +146,7 @@ void osgAnimation::ClearActionVisitor::apply(Timeline& tm)
|
|||||||
_remove.clear();
|
_remove.clear();
|
||||||
tm.traverse(*this);
|
tm.traverse(*this);
|
||||||
for (int i = 0; i < (int)_remove.size(); i++)
|
for (int i = 0; i < (int)_remove.size(); i++)
|
||||||
tm.removeAction(_remove[i]);
|
tm.removeAction(_remove[i].get());
|
||||||
}
|
}
|
||||||
void osgAnimation::ClearActionVisitor::apply(Action& action)
|
void osgAnimation::ClearActionVisitor::apply(Action& action)
|
||||||
{
|
{
|
||||||
|
@ -377,7 +377,7 @@ struct ValueTextDrawCallback : public virtual osg::Drawable::DrawCallback
|
|||||||
timeLabelValue->setPosition(pos + osg::Vec3(startBlocks, 0,0));
|
timeLabelValue->setPosition(pos + osg::Vec3(startBlocks, 0,0));
|
||||||
timeLabelValue->setText("0.0");
|
timeLabelValue->setText("0.0");
|
||||||
|
|
||||||
timeLabelValue->setDrawCallback(new ValueTextDrawCallback(stats,"Timeline"));
|
timeLabelValue->setDrawCallback(new ValueTextDrawCallback(stats.get(),"Timeline"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -389,11 +389,11 @@ struct ValueTextDrawCallback : public virtual osg::Drawable::DrawCallback
|
|||||||
_statsWidth - 2 * backgroundMargin,
|
_statsWidth - 2 * backgroundMargin,
|
||||||
(3 + 4.5 * 1) * characterSize + 2 * backgroundMargin,
|
(3 + 4.5 * 1) * characterSize + 2 * backgroundMargin,
|
||||||
backgroundColor);
|
backgroundColor);
|
||||||
geode->addDrawable(_background);
|
geode->addDrawable(_background.get());
|
||||||
_group->addChild(geode);
|
_group->addChild(geode);
|
||||||
}
|
}
|
||||||
|
|
||||||
return _group;
|
return _group.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||||
@ -435,7 +435,7 @@ struct ValueTextDrawCallback : public virtual osg::Drawable::DrawCallback
|
|||||||
if (_actions.find(name) == _actions.end()) {
|
if (_actions.find(name) == _actions.end()) {
|
||||||
osg::Vec4 color(getRandomValueinRange(255)/255.0, getRandomValueinRange(255)/255.0, getRandomValueinRange(255)/255.0, 1.0);
|
osg::Vec4 color(getRandomValueinRange(255)/255.0, getRandomValueinRange(255)/255.0, getRandomValueinRange(255)/255.0, 1.0);
|
||||||
_actions[name].init(visitor->getStats(), name, pos, width, height, color);
|
_actions[name].init(visitor->getStats(), name, pos, width, height, color);
|
||||||
_group->addChild(_actions[name]._group);
|
_group->addChild(_actions[name]._group.get());
|
||||||
//_actions[name].touch();
|
//_actions[name].touch();
|
||||||
} else {
|
} else {
|
||||||
_actions[name].setPosition(pos);
|
_actions[name].setPosition(pos);
|
||||||
@ -624,7 +624,7 @@ void StatsHandler::setUpHUDCamera(osgViewer::ViewerBase* viewer)
|
|||||||
_camera->setAllowEventFocus(false);
|
_camera->setAllowEventFocus(false);
|
||||||
_camera->setCullMask(0x1);
|
_camera->setCullMask(0x1);
|
||||||
osgViewer::Viewer* v = dynamic_cast<osgViewer::Viewer*>(viewer);
|
osgViewer::Viewer* v = dynamic_cast<osgViewer::Viewer*>(viewer);
|
||||||
v->getSceneData()->asGroup()->addChild(_camera);
|
v->getSceneData()->asGroup()->addChild(_camera.get());
|
||||||
_initialized = true;
|
_initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -647,11 +647,11 @@ void StatsHandler::setUpScene(osgViewer::Viewer* viewer)
|
|||||||
|
|
||||||
_group = new osg::Group;
|
_group = new osg::Group;
|
||||||
_camera->addChild(_switch.get());
|
_camera->addChild(_switch.get());
|
||||||
_switch->addChild(_group);
|
_switch->addChild(_group.get());
|
||||||
|
|
||||||
for (int i = 0; i < (int)finder._timelines.size(); i++) {
|
for (int i = 0; i < (int)finder._timelines.size(); i++) {
|
||||||
StatsTimeline* s = new StatsTimeline;
|
StatsTimeline* s = new StatsTimeline;
|
||||||
osg::MatrixTransform* m = s->createStatsForTimeline(finder._timelines[i]);
|
osg::MatrixTransform* m = s->createStatsForTimeline(finder._timelines[i].get());
|
||||||
m->setUpdateCallback(s);
|
m->setUpdateCallback(s);
|
||||||
_group->addChild(m);
|
_group->addChild(m);
|
||||||
}
|
}
|
||||||
@ -671,7 +671,7 @@ void StatAction::init(osg::Stats* stats, const std::string& name, const osg::Vec
|
|||||||
|
|
||||||
_label = new osg::Geode;
|
_label = new osg::Geode;
|
||||||
_textLabel = new osgText::Text;
|
_textLabel = new osgText::Text;
|
||||||
_label->addDrawable(_textLabel);
|
_label->addDrawable(_textLabel.get());
|
||||||
_textLabel->setDataVariance(osg::Object::DYNAMIC);
|
_textLabel->setDataVariance(osg::Object::DYNAMIC);
|
||||||
_textLabel->setColor(color);
|
_textLabel->setColor(color);
|
||||||
_textLabel->setFont(font);
|
_textLabel->setFont(font);
|
||||||
@ -684,8 +684,8 @@ void StatAction::init(osg::Stats* stats, const std::string& name, const osg::Vec
|
|||||||
graph->addStatGraph(stats, stats, color, 1.0, name);
|
graph->addStatGraph(stats, stats, color, 1.0, name);
|
||||||
_graph = graph;
|
_graph = graph;
|
||||||
|
|
||||||
_group->addChild(_label);
|
_group->addChild(_label.get());
|
||||||
_group->addChild(_graph);
|
_group->addChild(_graph.get());
|
||||||
}
|
}
|
||||||
void StatAction::setAlpha(float v)
|
void StatAction::setAlpha(float v)
|
||||||
{
|
{
|
||||||
|
@ -71,9 +71,9 @@ void osgAnimation::Timeline::traverse(ActionVisitor& visitor)
|
|||||||
|
|
||||||
|
|
||||||
void osgAnimation::Timeline::setStats(osg::Stats* stats) { _stats = stats;}
|
void osgAnimation::Timeline::setStats(osg::Stats* stats) { _stats = stats;}
|
||||||
osg::Stats* osgAnimation::Timeline::getStats() { return _stats;}
|
osg::Stats* osgAnimation::Timeline::getStats() { return _stats.get();}
|
||||||
void osgAnimation::Timeline::collectStats(bool state) { _collectStats = state;}
|
void osgAnimation::Timeline::collectStats(bool state) { _collectStats = state;}
|
||||||
osgAnimation::StatsActionVisitor* osgAnimation::Timeline::getStatsVisitor() { return _statsVisitor; }
|
osgAnimation::StatsActionVisitor* osgAnimation::Timeline::getStatsVisitor() { return _statsVisitor.get(); }
|
||||||
|
|
||||||
void osgAnimation::Timeline::clearActions()
|
void osgAnimation::Timeline::clearActions()
|
||||||
{
|
{
|
||||||
@ -98,7 +98,7 @@ void osgAnimation::Timeline::update(double simulationTime)
|
|||||||
{
|
{
|
||||||
if (!_statsVisitor)
|
if (!_statsVisitor)
|
||||||
_statsVisitor = new osgAnimation::StatsActionVisitor();
|
_statsVisitor = new osgAnimation::StatsActionVisitor();
|
||||||
_statsVisitor->setStats(_stats);
|
_statsVisitor->setStats(_stats.get());
|
||||||
_statsVisitor->setFrame(_currentFrame);
|
_statsVisitor->setFrame(_currentFrame);
|
||||||
_statsVisitor->reset();
|
_statsVisitor->reset();
|
||||||
accept(*_statsVisitor);
|
accept(*_statsVisitor);
|
||||||
@ -123,7 +123,7 @@ void osgAnimation::Timeline::update(double simulationTime)
|
|||||||
{
|
{
|
||||||
if (!_statsVisitor)
|
if (!_statsVisitor)
|
||||||
_statsVisitor = new StatsActionVisitor;
|
_statsVisitor = new StatsActionVisitor;
|
||||||
_statsVisitor->setStats(_stats);
|
_statsVisitor->setStats(_stats.get());
|
||||||
_statsVisitor->setFrame(_currentFrame);
|
_statsVisitor->setFrame(_currentFrame);
|
||||||
_statsVisitor->reset();
|
_statsVisitor->reset();
|
||||||
accept(*_statsVisitor);
|
accept(*_statsVisitor);
|
||||||
|
@ -161,7 +161,7 @@ osg::Node* daeReader::processVisualScene( domVisual_scene *scene )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
retVal->setStateSet(_rootStateSet);
|
retVal->setStateSet(_rootStateSet.get());
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
@ -1710,7 +1710,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterP3DXML::readNode(const std::string&
|
|||||||
input.open(fileName);
|
input.open(fileName);
|
||||||
input.readAllDataIntoBuffer();
|
input.readAllDataIntoBuffer();
|
||||||
|
|
||||||
return readNode(input, local_opt);
|
return readNode(input, local_opt.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
osgDB::ReaderWriter::ReadResult ReaderWriterP3DXML::readNode(std::istream& fin, const Options* options) const
|
osgDB::ReaderWriter::ReadResult ReaderWriterP3DXML::readNode(std::istream& fin, const Options* options) const
|
||||||
@ -1723,7 +1723,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterP3DXML::readNode(std::istream& fin,
|
|||||||
//local_opt->setFindFileCallback(new MyFindFileCallback);
|
//local_opt->setFindFileCallback(new MyFindFileCallback);
|
||||||
local_opt->setReadFileCallback(new MyReadFileCallback);
|
local_opt->setReadFileCallback(new MyReadFileCallback);
|
||||||
|
|
||||||
return readNode(input, local_opt);
|
return readNode(input, local_opt.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
osgDB::ReaderWriter::ReadResult ReaderWriterP3DXML::readNode(osgDB::XmlNode::Input& input, osgDB::ReaderWriter::Options* options) const
|
osgDB::ReaderWriter::ReadResult ReaderWriterP3DXML::readNode(osgDB::XmlNode::Input& input, osgDB::ReaderWriter::Options* options) const
|
||||||
|
@ -93,7 +93,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterPaths::readObject(const std::string&
|
|||||||
|
|
||||||
std::ifstream input(fileName.c_str());
|
std::ifstream input(fileName.c_str());
|
||||||
|
|
||||||
return readObject(input, local_opt);
|
return readObject(input, local_opt.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
osgDB::ReaderWriter::ReadResult ReaderWriterPaths::readObject(std::istream& fin, const osgDB::Options* options) const
|
osgDB::ReaderWriter::ReadResult ReaderWriterPaths::readObject(std::istream& fin, const osgDB::Options* options) const
|
||||||
@ -234,12 +234,12 @@ osgDB::ReaderWriter::ReadResult ReaderWriterPaths::read_rotation_path(std::istre
|
|||||||
localValue.azim = currValue.azim *r + prevValue.azim * (1.0f-r);
|
localValue.azim = currValue.azim *r + prevValue.azim * (1.0f-r);
|
||||||
localValue.elevation = currValue.elevation *r + prevValue.elevation * (1.0f-r);
|
localValue.elevation = currValue.elevation *r + prevValue.elevation * (1.0f-r);
|
||||||
|
|
||||||
localValue.addToPath(animation);
|
localValue.addToPath(animation.get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
currValue.addToPath(animation);
|
currValue.addToPath(animation.get());
|
||||||
}
|
}
|
||||||
prevValue = currValue;
|
prevValue = currValue;
|
||||||
first = false;
|
first = false;
|
||||||
|
@ -126,15 +126,15 @@ class ReaderWriterFreeType : public osgDB::ReaderWriter
|
|||||||
|
|
||||||
if (ext=="added")
|
if (ext=="added")
|
||||||
{
|
{
|
||||||
dbRevision->setFilesAdded(fileList);
|
dbRevision->setFilesAdded(fileList.get());
|
||||||
}
|
}
|
||||||
else if (ext=="removed")
|
else if (ext=="removed")
|
||||||
{
|
{
|
||||||
dbRevision->setFilesRemoved(fileList);
|
dbRevision->setFilesRemoved(fileList.get());
|
||||||
}
|
}
|
||||||
else if (ext=="modified")
|
else if (ext=="modified")
|
||||||
{
|
{
|
||||||
dbRevision->setFilesModified(fileList);
|
dbRevision->setFilesModified(fileList.get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -144,7 +144,7 @@ class ReaderWriterFreeType : public osgDB::ReaderWriter
|
|||||||
itr != revisionMap.end();
|
itr != revisionMap.end();
|
||||||
++itr)
|
++itr)
|
||||||
{
|
{
|
||||||
revisions->addRevision(itr->second);
|
revisions->addRevision(itr->second.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
return revisions.get();
|
return revisions.get();
|
||||||
|
@ -214,7 +214,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterVRML2::readNode(const std::string &f
|
|||||||
for (unsigned i = 0; i < mfn.size(); i++)
|
for (unsigned i = 0; i < mfn.size(); i++)
|
||||||
{
|
{
|
||||||
openvrml::node *vrml_node = mfn[i].get();
|
openvrml::node *vrml_node = mfn[i].get();
|
||||||
osg_root->addChild(convertFromVRML(vrml_node).get());
|
osg_root->addChild(convertFromVRML(vrml_node));
|
||||||
}
|
}
|
||||||
osgDB::getDataFilePathList().pop_front();
|
osgDB::getDataFilePathList().pop_front();
|
||||||
return osg_root.get();
|
return osg_root.get();
|
||||||
@ -225,7 +225,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterVRML2::readNode(const std::string &f
|
|||||||
catch (std::invalid_argument) { return ReadResult::FILE_NOT_HANDLED; }
|
catch (std::invalid_argument) { return ReadResult::FILE_NOT_HANDLED; }
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::ref_ptr<osg::Node> ReaderWriterVRML2::convertFromVRML(openvrml::node *obj) const
|
osg::Node* ReaderWriterVRML2::convertFromVRML(openvrml::node *obj) const
|
||||||
{
|
{
|
||||||
//static int osgLightNum = 0; //light
|
//static int osgLightNum = 0; //light
|
||||||
|
|
||||||
@ -285,7 +285,7 @@ osg::ref_ptr<osg::Node> ReaderWriterVRML2::convertFromVRML(openvrml::node *obj)
|
|||||||
for (it_npv = node_ptr_vector.begin(); it_npv != node_ptr_vector.end(); it_npv++)
|
for (it_npv = node_ptr_vector.begin(); it_npv != node_ptr_vector.end(); it_npv++)
|
||||||
{
|
{
|
||||||
openvrml::node *node = (*(it_npv)).get();
|
openvrml::node *node = (*(it_npv)).get();
|
||||||
osg_m->addChild(convertFromVRML(node).get());
|
osg_m->addChild(convertFromVRML(node));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -294,7 +294,7 @@ osg::ref_ptr<osg::Node> ReaderWriterVRML2::convertFromVRML(openvrml::node *obj)
|
|||||||
// no children
|
// no children
|
||||||
}
|
}
|
||||||
|
|
||||||
return osg_m.get();
|
return osg_m.release();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -467,7 +467,7 @@ osg::ref_ptr<osg::Node> ReaderWriterVRML2::convertFromVRML(openvrml::node *obj)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return osg_geode.get();
|
return osg_geode.release();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -83,7 +83,7 @@ private:
|
|||||||
typedef std::map<QuadricKey, osg::ref_ptr<osg::Geometry> > ConeLibrary;
|
typedef std::map<QuadricKey, osg::ref_ptr<osg::Geometry> > ConeLibrary;
|
||||||
typedef std::map<QuadricKey, osg::ref_ptr<osg::Geometry> > CylinderLibrary;
|
typedef std::map<QuadricKey, osg::ref_ptr<osg::Geometry> > CylinderLibrary;
|
||||||
|
|
||||||
osg::ref_ptr<osg::Node> convertFromVRML(openvrml::node *obj) const;
|
osg::Node* convertFromVRML(openvrml::node *obj) const;
|
||||||
|
|
||||||
|
|
||||||
osg::ref_ptr<osg::Geometry> convertVRML97IndexedFaceSet(openvrml::node *vrml_ifs) const;
|
osg::ref_ptr<osg::Geometry> convertVRML97IndexedFaceSet(openvrml::node *vrml_ifs) const;
|
||||||
|
@ -71,7 +71,7 @@ class ReaderWriterZIP : public osgDB::ReaderWriter
|
|||||||
local_opt->getDatabasePathList().push_front(osgDB::getFilePath(file));
|
local_opt->getDatabasePathList().push_front(osgDB::getFilePath(file));
|
||||||
|
|
||||||
// Now pass through to memory zip handler
|
// Now pass through to memory zip handler
|
||||||
rresult = readNode(tmpStrmBuffer,local_opt);
|
rresult = readNode(tmpStrmBuffer,local_opt.get());
|
||||||
|
|
||||||
// Clean up options
|
// Clean up options
|
||||||
local_opt->getDatabasePathList().pop_front();
|
local_opt->getDatabasePathList().pop_front();
|
||||||
@ -81,7 +81,7 @@ class ReaderWriterZIP : public osgDB::ReaderWriter
|
|||||||
return rresult;
|
return rresult;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ReadResult readNode(std::istream& fin,const osgDB::Options* options =NULL) const
|
virtual ReadResult readNode(std::istream& fin,const osgDB::Options* options) const
|
||||||
{
|
{
|
||||||
ReadResult result = ReadResult(ReadResult::FILE_NOT_HANDLED);
|
ReadResult result = ReadResult(ReadResult::FILE_NOT_HANDLED);
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ class ReaderWriterZIP : public osgDB::ReaderWriter
|
|||||||
|
|
||||||
local_opt->setPluginStringData("STREAM_FILENAME",osgDB::getSimpleFileName(StreamName));
|
local_opt->setPluginStringData("STREAM_FILENAME",osgDB::getSimpleFileName(StreamName));
|
||||||
|
|
||||||
result = rw->readNode(buffer,local_opt);
|
result = rw->readNode(buffer,local_opt.get());
|
||||||
if (result.validNode())
|
if (result.validNode())
|
||||||
{
|
{
|
||||||
grp->addChild( result.takeNode() );
|
grp->addChild( result.takeNode() );
|
||||||
|
Loading…
Reference in New Issue
Block a user