![]() |
Rigs of Rods 2026.01
Soft-body Physics Simulation
|
Definition at line 37 of file RandomTreeLoader.h.
Inheritance diagram for Forests::RandomTreeLoader:Public Member Functions | |
| RandomTreeLoader (PagedGeometry *geom, const TBounds &bounds) | |
| ~RandomTreeLoader () | |
| void | loadPage (PageInfo &page) |
| void | unloadPage (PageInfo &page) |
Public Member Functions inherited from Forests::TreeLoader2D | |
| TreeLoader2D (PagedGeometry *geom, const TBounds &bounds) | |
| ~TreeLoader2D () | |
| void | addTree (Ogre::Entity *entity, const Ogre::Vector3 &position, Ogre::Degree yaw=Ogre::Degree(0), Ogre::Real scale=1.0f, void *userData=NULL) |
| void | deleteTrees (const Ogre::Vector3 &position, Ogre::Real radius=0.001f, Ogre::Entity *type=NULL) |
| void | deleteTrees (TBounds area, Ogre::Entity *type=NULL) |
| void | setHeightFunction (Ogre::Real(*heightFunction)(Ogre::Real x, Ogre::Real z, void *userData), void *userData=NULL) |
| void | setColorMap (const Ogre::String &mapFile, MapChannel channel=CHANNEL_COLOR) |
| void | setColorMap (Ogre::TexturePtr map, MapChannel channel=CHANNEL_COLOR) |
| ColorMap * | getColorMap () |
| void | setColorMapFilter (MapFilter filter) |
| void | setMaximumScale (Ogre::Real maxScale) |
| Ogre::Real | getMaximumScale () const |
| void | setMinimumScale (Ogre::Real minScale) |
| Ogre::Real | getMinimumScale () const |
| const TBounds & | getBounds () const |
| void | loadPage (PageInfo &page) |
Public Member Functions inherited from Forests::PageLoader | |
| virtual void | frameUpdate () |
| virtual | ~PageLoader () |
Additional Inherited Members | |
Protected Member Functions inherited from Forests::PageLoader | |
| void | addEntity (Ogre::Entity *ent, const Ogre::Vector3 &position, const Ogre::Quaternion &rotation, const Ogre::Vector3 &scale=Ogre::Vector3::UNIT_SCALE, const Ogre::ColourValue &color=Ogre::ColourValue::White) |
|
inline |
Definition at line 40 of file RandomTreeLoader.h.
|
inline |
Definition at line 44 of file RandomTreeLoader.h.
|
inlinevirtual |
This should be overridden to load a specified region of entities.
| page | A PageInfo variable which includes boundary information and other useful values. |
Override this function to load entities within the specified boundary. The boundary information is contained in the "page" parameter, along with other useful information as well (see the PageInfo documentation for more info about this).
Simply use the member function addEntity() to add all the entities you want. If you create your own objects inside this function, you are responsible for deleting it appropriately in unloadPage() or somewhere else. The PageInfo::userData member is useful here since you can point it to your data structures for later reference in unloadPage().
Implements Forests::PageLoader.
Definition at line 48 of file RandomTreeLoader.h.
|
inlinevirtual |
This may be overridden (optional) to unload custom data associated with a page.
| page | A PageInfo variable which includes boundary information and other useful values. |
During a PageLoader::loadPage() call, you are supposed to add entities by calling the addEntity() member function. In case you created anything else (particle systems, sound effects, etc.), this function gives you a chance to delete them along with the rest of the entities added with addEntity().
In most cases you won't need to implement this function in your page loader at all, since addEntity() is usually all that is used.
Reimplemented from Forests::PageLoader.
Definition at line 91 of file RandomTreeLoader.h.