#pragma once #include "Adept.hpp" #include "VideoRenderer.hpp" #include "VideoComponent.hpp" namespace Adept { //######################################################################### //########################## ScalableShapeComponent ############################## //######################################################################### // // When instantiating this class, the following methods must be explicitly // defined: // // void InitializeClass(); // void ReadGeometryFromResource(...) // ScalableShapeComponent* Make(...) // Derivation* CreateFactoryRequest(...) // // The methods having templates in this header file should work fine, but // explicitly define whatever you need. // class ScalableShapeComponent: public VideoComponent { public: static void InitializeClass(); static void TerminateClass(); static ClassData *DefaultData; typedef VideoComponent BaseClass; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Constructor/Destructor // protected: ScalableShapeComponent( ClassData *class_data, MemoryStream *stream, VideoComponentWeb *owning_web ); static Element* ReadShape(MemoryStream *stream); void SkipStreamData(MemoryStream *stream); public: static ScalableShapeComponent* Create( MemoryStream *stream, VideoComponentWeb *owning_web ); protected: void SetScale(Scalar x_scale, Scalar y_scale, Scalar z_scale); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Component support // public: ElementRenderer::ScalableShapeElement* GetElement() { Check_Object(this); return Cast_Pointer( ElementRenderer::ScalableShapeElement*, componentElement ); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Component execution // public: void ChannelChanged(Channel *channel); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Accessors // public: void TestInstance(); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Tool-related Functions // public: static ClassData* CreateFactoryRequest(FactoryRequestParameters *parameters); }; }