mirror of https://github.com/mosra/magnum.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
2.6 KiB
58 lines
2.6 KiB
#ifndef Magnum_SceneGraph_Scene_h |
|
#define Magnum_SceneGraph_Scene_h |
|
/* |
|
Copyright © 2010, 2011, 2012 Vladimír Vondruš <mosra@centrum.cz> |
|
|
|
This file is part of Magnum. |
|
|
|
Magnum is free software: you can redistribute it and/or modify |
|
it under the terms of the GNU Lesser General Public License version 3 |
|
only, as published by the Free Software Foundation. |
|
|
|
Magnum is distributed in the hope that it will be useful, |
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
GNU Lesser General Public License version 3 for more details. |
|
*/ |
|
|
|
/** @file |
|
* @brief Class Magnum::SceneGraph::Scene, typedef Magnum::SceneGraph::Scene2D, Magnum::SceneGraph::Scene3D |
|
*/ |
|
|
|
#include "Object.h" |
|
|
|
namespace Magnum { namespace SceneGraph { |
|
|
|
/** |
|
@brief %Scene |
|
|
|
@see Scene2D, Scene3D |
|
*/ |
|
template<std::uint8_t dimensions> class SCENEGRAPH_EXPORT Scene: public AbstractObject<dimensions>::ObjectType { |
|
public: |
|
/** @copydoc AbstractObject::isScene() */ |
|
inline bool isScene() const { return true; } |
|
|
|
/** @todo Some deleted functions belong only to Scene2D, some only to Scene3D - what to do? */ |
|
#ifndef DOXYGEN_GENERATING_OUTPUT |
|
void setParent(typename AbstractObject<dimensions>::ObjectType* parent) = delete; |
|
void setTransformation(const typename DimensionTraits<dimensions, GLfloat>::MatrixType& transformation) = delete; |
|
void multiplyTransformation(const typename DimensionTraits<dimensions, GLfloat>::MatrixType& transformation, typename AbstractObject<dimensions>::Transformation type = (DimensionTraits<dimensions, GLfloat>::Transformation::Global)) = delete; |
|
void translate(const typename DimensionTraits<dimensions, GLfloat>::VectorType& vec, typename AbstractObject<dimensions>::Transformation type = AbstractObject<dimensions>::Transformation::Global) = delete; |
|
void scale(const typename DimensionTraits<dimensions, GLfloat>::VectorType& vec, typename AbstractObject<dimensions>::Transformation type = AbstractObject<dimensions>::Transformation::Global) = delete; |
|
void rotate(GLfloat angle, const typename DimensionTraits<dimensions, GLfloat>::VectorType& vec, typename AbstractObject<dimensions>::Transformation type = AbstractObject<dimensions>::Transformation::Global) = delete; |
|
#endif |
|
|
|
private: |
|
inline void draw(const typename DimensionTraits<dimensions, GLfloat>::MatrixType&, typename AbstractObject<dimensions>::CameraType*) {} |
|
}; |
|
|
|
/** @brief Two-dimensional scene */ |
|
typedef Scene<2> Scene2D; |
|
|
|
/** @brief Three-dimensional scene */ |
|
typedef Scene<3> Scene3D; |
|
|
|
}} |
|
|
|
#endif
|
|
|