osgearth 代码 hack(六) groundcover 解析
作者:互联网
GroundCover 翻译为地被植物。
/**
* A Biome is a collection of ground cover objects corresponding
* to a set of land cover classes. For example, the "forest" biome
* might map to three different tree billboards.
*/
GroundCoverObject 代表单个的地表覆盖物
GroundCoverObjects 地表覆盖物的集合。
GroundCoverBillboard 是地表覆盖物的一种。 还有其他种?
GroundCoverBiomes 是什么? 代表了一个种类的地表覆盖物。 例如一个 forest biome 可以映射为3个不同的树 billboard。包含了 GroundCoverObjects
GroundCoverBiomes 实现哪些功能?
GroundCoverLayer 是 visibleLayer 的 subclass
//! Macro to use when defining a Layer class #define META_Layer(LIBRARY, MYCLASS, OPTIONS, SUPERCLASS, SLUG) \ private: \ OPTIONS * _options; \ OPTIONS _optionsConcrete; \ MYCLASS ( const MYCLASS& rhs, const osg::CopyOp& op ) { } \ protected: \ OE_COMMENT("Construct a new layer with default options") \ MYCLASS (OPTIONS* optr) : SUPERCLASS (optr? optr: &_optionsConcrete), _options(optr ? optr : &_optionsConcrete) { } \ public: \ META_Object(LIBRARY, MYCLASS); \ \ OE_COMMENT("Construct a new layer with default options") \ MYCLASS () : SUPERCLASS (&_optionsConcrete), _options(&_optionsConcrete) { MYCLASS::init(); } \ \ OE_COMMENT("Construct a new layer with user-defined options") \ MYCLASS (const OPTIONS& o) : SUPERCLASS (&_optionsConcrete), _options(&_optionsConcrete), _optionsConcrete(o) { MYCLASS::init(); } \ \ OE_COMMENT("Mutable options for this layer") \ OPTIONS& options() { return *_options; } \ \ OE_COMMENT("Immutable options for this layer") \ const OPTIONS& options() const { return *_options; } \ \ OE_COMMENT("Configuration key for this layer (e.g. for earth files)") \ virtual const char* getConfigKey() const { return #SLUG ; }
标签:COMMENT,const,optionsConcrete,groundcover,OPTIONS,osgearth,hack,MYCLASS,options 来源: https://www.cnblogs.com/enigma19971/p/12915988.html