#ifndef __GEOMORPH_H__ #define __GEOMORPH_H__ #include #include #include #include "gwtypes.h" namespace geoworld { class GeoMorph { public: // Called first to establish first state virtual void init (SynthesisSession & manager, const IGeoWorldAccessor & accessor, const unsigned short nMaxWidth, const unsigned short nMaxHeight) = 0; inline std::string getTypeName () const { return typeid(*this).name(); } }; class BoundedGeoMorph { public: // Called to index this bounded morpho virtual mars::BBox< long > getBBox () const = 0; }; class HeightMapGeoMorph : public GeoMorph { public: // Called to perform CPU-intensive rasterization task virtual void doMorph (LockedGWSection & section) const = 0; }; class PersistentGeoMorph { public: class State { public: virtual mars::ObjectStream & operator >> (mars::ObjectStream & outs) const = 0; virtual mars::ObjectStream & operator << (mars::ObjectStream & ins) = 0; }; // Called by its factory to save/restore GeoMorph state virtual mars::ptr< State > createState () const = 0; }; class MineralSpawnGeoMorph { public: virtual void doSpawnMinerals (const IMineralQuery * pQMin, MineralsContainer & container) = 0; }; class MetaFieldSpawnGeoMorph { public: virtual void getRequestedFields (std::set< FieldType > & setOut) const = 0; //virtual void doPopulateMetaField (const FieldType enftFieldType) }; } #endif