#ifndef __DEFAULT_EMPTY_SCENE_CONTENT_H__ #define __DEFAULT_EMPTY_SCENE_CONTENT_H__ // Includes Projection Designer headers #include /** * This class implements the contents of the empty scene of the default plugin. * * The empty scene enables the user to have nothing in the scene. * */ class DefaultEmptySceneContent: public SceneContent { public: /** * Default constructor * */ DefaultEmptySceneContent (SceneInterface* plugin); /** * Copy constructor. * * Uses copy_from() to make the copy. * */ DefaultEmptySceneContent (const DefaultEmptySceneContent& data): SceneContent(data) {copy_from(data);} /** * Destructor. * */ ~DefaultEmptySceneContent (); /** * Implements the copy from other contents. * * This method is used by the copy constructor. * For the empty scene contents, it does nothing. * * @param content The source content to copy from. * * @return true if the copy is ok, false otherwise. The copy can fail if * SceneContent is not a DefaultEmptySceneContent. * * @seealso is_equal_to * */ bool copy_from(const SceneContent& data); /** * Implements the egality-test with other contents. * * This could be an operator==. For the empty scene content, the test is not * difficult. * * @param content The content to compare with. * * @return true if the content are equal, false otherwise. The test can * fail if the contents have different parameters, but also it * SceneContent is not a DefaultEmptySceneContent. * * @seealso copy_from * */ bool is_equal_to(const SceneContent& data) const; /** * Draws the empty scene. * * @param glWidget The QGLWidget that own the OpenGL context. * @param cameraMatrix The camera matrix that must be use. * */ void draw(QGLWidget* glWidget, const float* cameraMatrix); /** * Resets the teapot. * * This is a pure virtual method of SceneContent. * This one does nothing. * */ void reset (void) {} /** * Loads the empty scene from a QDomElement. * * This is implemented for convenience, but it does nothing. * * @param element The QDomElement to read from. * */ void initFromDOMElement(const QDomElement& element); /** * Writes the empty scene in a QDomDocument. * * This is implemented for convenience, but it does nothing. * * @param name The name of the element. * @param doc The document whom belongs the element. * * @return The QDomElement to add. * */ QDomElement domElement(const QString& name, QDomDocument& doc) const; /** * Gets the name of empty scene type, stored in g_scene_name. * * @return The name of empty scene type, stored in g_scene_name. * */ const QString& scene_name(void) const {return g_scene_name;} /// Public static const scene name for the empty scene. static const QString g_scene_name; private: // No attribute for the empy scene, of course. }; #endif // __DEFAULT_EMPTY_SCENE_CONTENT_H__