From Don Tidrow, "I added some code to assign the archive pointer in TXPnode

with the archive that ReaderWriterTXP actually loads.  I also added a
function in TXPArchive to help in manipulating the lightpoints."
This commit is contained in:
Robert Osfield 2005-05-11 19:34:03 +00:00
parent 679c44f4ae
commit bdc7e8b4a9
3 changed files with 11 additions and 7 deletions

View File

@ -44,7 +44,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterTXP::local_readNode(const std::strin
{
int id = _archiveId++;
archive->setId(id);
getArchive(id,osgDB::getFilePath(fileName));
txpNode->setArchive(getArchive(id,osgDB::getFilePath(fileName)));
}
return txpNode.get();
}

View File

@ -89,6 +89,8 @@ public:
// Add light attrib
void addLightAttribute(osgSim::LightPointNode* lpn, osg::StateSet* fallback , const osg::Vec3& attitude);
int getNumLightAttributes() { return _lights.size(); }
// Get light attrib
inline DeferredLightAttribute& getLightAttribute(unsigned int i)
{

View File

@ -67,6 +67,8 @@ public:
TXPArchive* getArchive();
void setArchive(TXPArchive* archive) { _archive = archive; }
protected:
virtual ~TXPNode();