#pragma once #include #include #include #include #include #include "effects/DrawDecorate.h" #include "viewer/UpdateRenderStd.h" class ConeWave : public osg::Geode , public UpdateRenderStd { public: explicit ConeWave(); ~ConeWave(void) override; void Render(double dt) override; void InitGeode(); void Destory(); void SetHeight(float height); float GetHeght() const { return height_; } void SetRadius(float radius); float GetRadius() const { return radius_; } void SetBaseColor(const osg::Vec4& color); const osg::Vec4 GetBaseColor() const { return baseColor_; } void SetLevelCount(int count); int GetLevelCount() const { return levelCount_; } void SetLevelHeight(float height); float GetLevelHeihgt() const { return levelHeight_; } protected: virtual void CreateTexturedCone(osg::Geode* geode); private: osg::ref_ptr cone_; osg::ref_ptr coneDrawable_; osg::ref_ptr baseColorUniform_; osg::Vec4 baseColor_{ 0.0f, 0.2f, 0.5f, 0.2f }; osg::ref_ptr levelCountUniform_; int levelCount_{ 4 }; osg::ref_ptr levelHeightUniform_; float levelHeight_{ 500.0f }; float height_{ 60.0f }; float radius_{ 10.0f }; };