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:
parent
679c44f4ae
commit
bdc7e8b4a9
@ -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();
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -67,6 +67,8 @@ public:
|
||||
|
||||
TXPArchive* getArchive();
|
||||
|
||||
void setArchive(TXPArchive* archive) { _archive = archive; }
|
||||
|
||||
protected:
|
||||
|
||||
virtual ~TXPNode();
|
||||
|
Loading…
Reference in New Issue
Block a user