![]() |
VR-Forces 4.3.1 Class Documentation
|

Classes | |
| struct | TXPBillboardInfo |
| TXP Billboard info. More... | |
Public Member Functions | |
| TXPParser () | |
| void | setArchive (TXPArchive *archive) |
| Sets the archive to be parsed. | |
| TXPArchive * | getArchive () |
| Gets the archive. | |
| osg::Group * | parseScene (trpgReadBuffer &buf, std::map< int, osg::ref_ptr< osg::StateSet > > &materials, std::map< int, osg::ref_ptr< osg::Node > > &models, double realMinRange, double realMaxRange, double usedMaxRange) |
| Scene parser. | |
| osg::Group * | getCurrTop () |
| Returns the current Top Group. | |
| void | setPotentionalTileGroup (osg::Group *grp) |
| Sets the group as potentional tile group. | |
| std::map< int, osg::ref_ptr < osg::StateSet > > * | getMaterials () |
| Return the current material list (passed in to ParseScene()) | |
| void | loadMaterial (int ix) |
| Ensure material is loaded. | |
| std::vector< osg::ref_ptr < osg::StateSet > > * | getLocalMaterials () |
| New to TerraPage 2.0 - local materials. | |
| void | loadLocalMaterials () |
| Load local materials. | |
| std::map< int, osg::ref_ptr < osg::Node > > * | getModels () |
| Return the current model list. | |
| bool | requestModel (int ix) |
| Request a model to be load. | |
| trpgTileHeader * | getTileHeaderRef () |
| Return a reference to the tile header (after a tile has been read) | |
| const bool | underBillboardSubgraph () const |
| Returns true if we are under billboard subgraph. | |
| void | setUnderBillboardSubgraph (bool b) |
| Sets if we are under billboard subgraph. | |
| void | setLastBillboardInfo (TXPBillboardInfo &info) |
| Sets info for the last billboard parsed. | |
| void | getLastBillboardInfo (TXPBillboardInfo &info) |
| Gets info for the last billboard parsed. | |
| DeferredLightAttribute & | getLightAttribute (int ix) |
| Gets light attrib. | |
| const bool | underLayerSubgraph () const |
| Returns if we are under layer subgraph. | |
| void | setUnderLayerSubgraph (bool b) |
| Sets if we are under layer subgraph. | |
| void | setLayerGeode (osg::Geode *layer) |
| Set the current layer geode. | |
| osg::Geode * | getLayerGeode () const |
| Returns the current layer geode. | |
| unsigned int | getNumLayerLavels () const |
| void | setMaxAnisotropy (float anisotropy) |
| default value to use when setting up textures. | |
| float | getMaxAnisotropy () const |
| double | checkAndGetMinRange (double range) |
| We need to change the LOD ranges within tiles since we have done it for the PagedLODs representing tiles. | |
| double | checkAndGetMaxRange (double range) |
| const osg::Vec3 | getTileCenter () const |
| gets tile center, from the top lod node | |
| void | setCurrentNode (osg::Node *node) |
| unsigned int | GetNbChildrenRef () const |
| After parsing this will return the number of trpgChildRef node found. | |
| const trpgChildRef * | GetChildRef (unsigned int idx) const |
| This will return the trpgChildRef node pointer associated with the index. | |
Public Member Functions inherited from trpgSceneParser | |
| trpgSceneParser (void) | |
| virtual | ~trpgSceneParser (void) |
Public Member Functions inherited from trpgr_Parser | |
| trpgr_Parser (void) | |
| virtual | ~trpgr_Parser (void) |
| bool | isValid (void) const |
| virtual void | AddCallback (trpgToken, trpgr_Callback *, bool destroy=true) |
| Add and remove token callbacks. | |
| virtual void | AddCallback (trpgToken, trpgReadWriteable *) |
| virtual const trpgr_Callback * | GetCallback (trpgToken tok) const |
| virtual trpgr_Callback * | GetCallback (trpgToken tok) |
| virtual void | RemoveCallback (trpgToken) |
| virtual void | SetDefaultCallback (trpgr_Callback *, bool destroy=true) |
| virtual bool | Parse (trpgReadBuffer &) |
| Parse a read buffer. | |
| virtual bool | TokenIsValid (trpgToken) |
Protected Types | |
| typedef std::map< int, osg::ref_ptr< osg::StateSet > > * | MaterialMapType |
| Materials. | |
| typedef std::map< int, osg::ref_ptr< osg::Node > > | OSGModelsMapType |
| Model list. | |
Protected Member Functions | |
| virtual | ~TXPParser () |
| void | removeEmptyGroups () |
| Removes any empty groups and LODs. | |
| bool | StartChildren (void *) |
| Called on start children. | |
| bool | EndChildren (void *) |
| Called on end children. | |
| void | replaceTileLod (osg::Group *) |
| Replace the tile lod to regular group. | |
| osg::Geode * | createBoundingBox (int x, int y, int lod) |
| TEMP. | |
Protected Attributes | |
| TXPArchive * | _archive |
| THE archive. | |
| osg::Group * | _currentTop |
| Current parent. | |
| osg::Node * | _currentNode |
| Current node. | |
| osg::ref_ptr< osg::Group > | _root |
| The root of the tile. | |
| std::stack< osg::Group * > | _parents |
| Parents list. | |
| std::map< osg::Group *, int > | _tileGroups |
| Potentional Tile groups. | |
| MaterialMapType | _materialMap |
| std::vector< osg::ref_ptr < osg::StateSet > > | _localMaterials |
| Local materials. | |
| OSGModelsMapType * | _models |
| trpgTileHeader | _tileHeader |
| Tile header. | |
| bool | _underBillboardSubgraph |
| true if we are under billboard subgraph | |
| int | _numBillboardLevels |
| Number of levels below the billboard node. | |
| TXPBillboardInfo | _lastBillboardInfo |
| Last billboard we parsed. | |
| bool | _underLayerSubgraph |
| true if we are under layer subgraph | |
| int | _numLayerLevels |
| Numbers of levels below layer subgraph. | |
| osg::Geode * | _layerGeode |
| Our Layer Geode. | |
| float | _defaultMaxAnisotropy |
| default value to use when setting up textures. | |
| double | _realMinRange |
| LOD ranges to be used when parsing tiles. | |
| double | _realMaxRange |
| double | _usedMaxRange |
| osg::Vec3 | _tileCenter |
| tile center | |
Protected Attributes inherited from trpgSceneParser | |
| std::vector< void * > | parents |
| List of objects whose children we're working on. | |
Protected Attributes inherited from trpgr_Parser | |
| void * | lastObject |
| Check token validity. | |
Private Attributes | |
| childRefRead * | _childRefCB |
|
protected |
Materials.
|
protected |
Model list.
| txp::TXPParser::TXPParser | ( | ) |
|
protectedvirtual |
|
inline |
Sets the archive to be parsed.
References _archive.
|
inline |
Gets the archive.
References _archive.
| osg::Group* txp::TXPParser::parseScene | ( | trpgReadBuffer & | buf, |
| std::map< int, osg::ref_ptr< osg::StateSet > > & | materials, | ||
| std::map< int, osg::ref_ptr< osg::Node > > & | models, | ||
| double | realMinRange, | ||
| double | realMaxRange, | ||
| double | usedMaxRange | ||
| ) |
Scene parser.
|
inline |
Returns the current Top Group.
References _currentTop, and _root.
|
inline |
Sets the group as potentional tile group.
References _tileGroups.
|
inline |
Return the current material list (passed in to ParseScene())
References _materialMap.
|
inline |
Ensure material is loaded.
References _archive, and txp::TXPArchive::loadMaterial().
|
inline |
New to TerraPage 2.0 - local materials.
References _localMaterials.
| void txp::TXPParser::loadLocalMaterials | ( | ) |
Load local materials.
|
inline |
Return the current model list.
References _models.
|
inline |
Return a reference to the tile header (after a tile has been read)
References _tileHeader.
|
inline |
Returns true if we are under billboard subgraph.
References _underBillboardSubgraph.
|
inline |
Sets if we are under billboard subgraph.
References _underBillboardSubgraph.
|
inline |
Sets info for the last billboard parsed.
References _lastBillboardInfo.
|
inline |
Gets info for the last billboard parsed.
References _lastBillboardInfo.
| DeferredLightAttribute& txp::TXPParser::getLightAttribute | ( | int | ix | ) |
Gets light attrib.
|
inline |
Returns if we are under layer subgraph.
References _underLayerSubgraph.
|
inline |
Sets if we are under layer subgraph.
References _underLayerSubgraph.
|
inline |
Set the current layer geode.
References _layerGeode.
|
inline |
Returns the current layer geode.
References _layerGeode.
|
inline |
References _numLayerLevels.
|
inline |
default value to use when setting up textures.
References _defaultMaxAnisotropy.
|
inline |
References _defaultMaxAnisotropy.
|
inline |
We need to change the LOD ranges within tiles since we have done it for the PagedLODs representing tiles.
References _realMinRange.
|
inline |
References _realMaxRange, and _usedMaxRange.
|
inline |
gets tile center, from the top lod node
References _tileCenter.
|
inline |
References _currentNode.
| unsigned int txp::TXPParser::GetNbChildrenRef | ( | ) | const |
After parsing this will return the number of trpgChildRef node found.
| const trpgChildRef* txp::TXPParser::GetChildRef | ( | unsigned int | idx | ) | const |
This will return the trpgChildRef node pointer associated with the index.
Will return 0 if index is out of bound
|
protected |
Removes any empty groups and LODs.
|
protectedvirtual |
Called on start children.
Reimplemented from trpgSceneParser.
|
protectedvirtual |
Called on end children.
Reimplemented from trpgSceneParser.
|
protected |
Replace the tile lod to regular group.
|
protected |
THE archive.
Referenced by getArchive(), loadMaterial(), and setArchive().
|
protected |
Current parent.
Referenced by getCurrTop().
|
protected |
Current node.
Referenced by setCurrentNode().
|
protected |
The root of the tile.
Referenced by getCurrTop().
|
protected |
Parents list.
|
protected |
Potentional Tile groups.
Referenced by setPotentionalTileGroup().
|
protected |
Referenced by getMaterials().
|
protected |
Local materials.
Referenced by getLocalMaterials().
|
protected |
Referenced by getModels().
|
protected |
Tile header.
Referenced by getTileHeaderRef().
|
protected |
true if we are under billboard subgraph
Referenced by setUnderBillboardSubgraph(), and underBillboardSubgraph().
|
protected |
Number of levels below the billboard node.
|
protected |
Last billboard we parsed.
Referenced by getLastBillboardInfo(), and setLastBillboardInfo().
|
protected |
true if we are under layer subgraph
Referenced by setUnderLayerSubgraph(), and underLayerSubgraph().
|
protected |
Numbers of levels below layer subgraph.
Referenced by getNumLayerLavels().
|
protected |
Our Layer Geode.
Referenced by getLayerGeode(), and setLayerGeode().
|
protected |
default value to use when setting up textures.
Referenced by getMaxAnisotropy(), and setMaxAnisotropy().
|
protected |
LOD ranges to be used when parsing tiles.
Referenced by checkAndGetMinRange().
|
protected |
Referenced by checkAndGetMaxRange().
|
protected |
Referenced by checkAndGetMaxRange().
|
protected |
tile center
Referenced by getTileCenter().
|
private |