Browse Source

SceneGraph: disallow instantiation of Object and Camera base classes.

Renamed them to AbstractObject and AbstractCamera to make this more
evident to end user.
pull/279/head
Vladimír Vondruš 14 years ago
parent
commit
dfe566886a
  1. 28
      src/SceneGraph/Camera.cpp
  2. 44
      src/SceneGraph/Camera.h
  3. 2
      src/SceneGraph/Light.cpp
  4. 16
      src/SceneGraph/Object.cpp
  5. 38
      src/SceneGraph/Object.h
  6. 18
      src/SceneGraph/Scene.h

28
src/SceneGraph/Camera.cpp

@ -45,40 +45,40 @@ template Matrix4 aspectRatioFix<Matrix4>(AspectRatioPolicy, const Vector2&, cons
} }
#endif #endif
template<size_t dimensions> Camera<dimensions>::Camera(typename Object<dimensions>::ObjectType* parent): Object<dimensions>::ObjectType(parent), _aspectRatioPolicy(AspectRatioPolicy::NotPreserved) {} template<size_t dimensions> AbstractCamera<dimensions>::AbstractCamera(typename AbstractObject<dimensions>::ObjectType* parent): AbstractObject<dimensions>::ObjectType(parent), _aspectRatioPolicy(AspectRatioPolicy::NotPreserved) {}
template<size_t dimensions> typename Object<dimensions>::CameraType* Camera<dimensions>::setAspectRatioPolicy(AspectRatioPolicy policy) { template<size_t dimensions> typename AbstractObject<dimensions>::CameraType* AbstractCamera<dimensions>::setAspectRatioPolicy(AspectRatioPolicy policy) {
_aspectRatioPolicy = policy; _aspectRatioPolicy = policy;
fixAspectRatio(); fixAspectRatio();
return static_cast<typename Object<dimensions>::CameraType*>(this); return static_cast<typename AbstractObject<dimensions>::CameraType*>(this);
} }
template<size_t dimensions> void Camera<dimensions>::setViewport(const Math::Vector2<GLsizei>& size) { template<size_t dimensions> void AbstractCamera<dimensions>::setViewport(const Math::Vector2<GLsizei>& size) {
_viewport = size; _viewport = size;
fixAspectRatio(); fixAspectRatio();
} }
template<size_t dimensions> void Camera<dimensions>::clean(const typename Object<dimensions>::MatrixType& absoluteTransformation) { template<size_t dimensions> void AbstractCamera<dimensions>::clean(const typename AbstractObject<dimensions>::MatrixType& absoluteTransformation) {
Object<dimensions>::ObjectType::clean(absoluteTransformation); AbstractObject<dimensions>::ObjectType::clean(absoluteTransformation);
_cameraMatrix = absoluteTransformation.inverted(); _cameraMatrix = absoluteTransformation.inverted();
} }
template<size_t dimensions> void Camera<dimensions>::draw() { template<size_t dimensions> void AbstractCamera<dimensions>::draw() {
typename Object<dimensions>::SceneType* s = this->scene(); typename AbstractObject<dimensions>::SceneType* s = this->scene();
CORRADE_ASSERT(s, "Camera: cannot draw without camera attached to scene", ); CORRADE_ASSERT(s, "Camera: cannot draw without camera attached to scene", );
/* Recursively draw child objects */ /* Recursively draw child objects */
drawChildren(s, cameraMatrix()); drawChildren(s, cameraMatrix());
} }
template<size_t dimensions> void Camera<dimensions>::drawChildren(typename Object<dimensions>::ObjectType* object, const typename Object<dimensions>::MatrixType& transformationMatrix) { template<size_t dimensions> void AbstractCamera<dimensions>::drawChildren(typename AbstractObject<dimensions>::ObjectType* object, const typename AbstractObject<dimensions>::MatrixType& transformationMatrix) {
for(typename Object<dimensions>::ObjectType* i = object->firstChild(); i; i = i->nextSibling()) { for(typename AbstractObject<dimensions>::ObjectType* i = object->firstChild(); i; i = i->nextSibling()) {
/* Transformation matrix for the object */ /* Transformation matrix for the object */
typename Object<dimensions>::MatrixType matrix = transformationMatrix*i->transformation(); typename AbstractObject<dimensions>::MatrixType matrix = transformationMatrix*i->transformation();
/* Draw the object and its children */ /* Draw the object and its children */
i->draw(matrix, static_cast<typename Object<dimensions>::CameraType*>(this)); i->draw(matrix, static_cast<typename AbstractObject<dimensions>::CameraType*>(this));
drawChildren(i, matrix); drawChildren(i, matrix);
} }
} }
@ -128,7 +128,7 @@ Camera3D* Camera3D::setPerspective(GLfloat fov, GLfloat near, GLfloat far) {
} }
/* Explicitly instantiate the templates */ /* Explicitly instantiate the templates */
template class Camera<2>; template class AbstractCamera<2>;
template class Camera<3>; template class AbstractCamera<3>;
}} }}

44
src/SceneGraph/Camera.h

@ -16,7 +16,7 @@
*/ */
/** @file /** @file
* @brief Class Magnum::SceneGraph::Camera, Magnum::SceneGraph::Camera2D, Magnum::SceneGraph::Camera3D * @brief Class Magnum::SceneGraph::AbstractCamera, Magnum::SceneGraph::Camera2D, Magnum::SceneGraph::Camera3D
*/ */
#include "Object.h" #include "Object.h"
@ -49,7 +49,7 @@ namespace Implementation {
/** /**
@brief %Camera object @brief %Camera object
*/ */
template<size_t dimensions> class SCENEGRAPH_EXPORT Camera: public Object<dimensions>::ObjectType { template<size_t dimensions> class SCENEGRAPH_EXPORT AbstractCamera: public AbstractObject<dimensions>::ObjectType {
public: public:
/** /**
* @brief Aspect ratio policy * @brief Aspect ratio policy
@ -66,8 +66,10 @@ template<size_t dimensions> class SCENEGRAPH_EXPORT Camera: public Object<dimens
}; };
#endif #endif
/** @copydoc Object::Object */ /** @copydoc AbstractObject::AbstractObject() */
Camera(typename Object<dimensions>::ObjectType* parent = nullptr); AbstractCamera(typename AbstractObject<dimensions>::ObjectType* parent = nullptr);
virtual ~AbstractCamera() = 0;
/** @brief Aspect ratio policy */ /** @brief Aspect ratio policy */
inline AspectRatioPolicy aspectRatioPolicy() const { return _aspectRatioPolicy; } inline AspectRatioPolicy aspectRatioPolicy() const { return _aspectRatioPolicy; }
@ -76,7 +78,7 @@ template<size_t dimensions> class SCENEGRAPH_EXPORT Camera: public Object<dimens
* @brief Set aspect ratio policy * @brief Set aspect ratio policy
* @return Pointer to self (for method chaining) * @return Pointer to self (for method chaining)
*/ */
typename Object<dimensions>::CameraType* setAspectRatioPolicy(AspectRatioPolicy policy); typename AbstractObject<dimensions>::CameraType* setAspectRatioPolicy(AspectRatioPolicy policy);
/** /**
* @brief Camera matrix * @brief Camera matrix
@ -84,7 +86,7 @@ template<size_t dimensions> class SCENEGRAPH_EXPORT Camera: public Object<dimens
* Camera matrix describes world position relative to the camera and is * Camera matrix describes world position relative to the camera and is
* applied as first. * applied as first.
*/ */
inline typename Object<dimensions>::MatrixType cameraMatrix() { inline typename AbstractObject<dimensions>::MatrixType cameraMatrix() {
this->setClean(); this->setClean();
return _cameraMatrix; return _cameraMatrix;
} }
@ -96,7 +98,7 @@ template<size_t dimensions> class SCENEGRAPH_EXPORT Camera: public Object<dimens
* as last. * as last.
* @see projectionSize() * @see projectionSize()
*/ */
inline typename Object<dimensions>::MatrixType projectionMatrix() const { return _projectionMatrix; } inline typename AbstractObject<dimensions>::MatrixType projectionMatrix() const { return _projectionMatrix; }
/** /**
* @brief Size of (near) XY plane in current projection * @brief Size of (near) XY plane in current projection
@ -127,41 +129,43 @@ template<size_t dimensions> class SCENEGRAPH_EXPORT Camera: public Object<dimens
*/ */
virtual void draw(); virtual void draw();
using Object<dimensions>::ObjectType::draw; /* Don't hide Object's draw() */ using AbstractObject<dimensions>::ObjectType::draw; /* Don't hide Object's draw() */
protected: protected:
/** /**
* Recalculates camera matrix. * Recalculates camera matrix.
*/ */
void clean(const typename Object<dimensions>::MatrixType& absoluteTransformation); void clean(const typename AbstractObject<dimensions>::MatrixType& absoluteTransformation);
/** /**
* @brief Draw object children * @brief Draw object children
* *
* Recursively draws all children of the object. * Recursively draws all children of the object.
*/ */
void drawChildren(typename Object<dimensions>::ObjectType* object, const typename Object<dimensions>::MatrixType& transformationMatrix); void drawChildren(typename AbstractObject<dimensions>::ObjectType* object, const typename AbstractObject<dimensions>::MatrixType& transformationMatrix);
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
inline void fixAspectRatio() { inline void fixAspectRatio() {
_projectionMatrix = Implementation::aspectRatioFix<typename Object<dimensions>::MatrixType>(_aspectRatioPolicy, {rawProjectionMatrix[0].x(), rawProjectionMatrix[1].y()}, _viewport)*rawProjectionMatrix; _projectionMatrix = Implementation::aspectRatioFix<typename AbstractObject<dimensions>::MatrixType>(_aspectRatioPolicy, {rawProjectionMatrix[0].x(), rawProjectionMatrix[1].y()}, _viewport)*rawProjectionMatrix;
} }
typename Object<dimensions>::MatrixType rawProjectionMatrix; typename AbstractObject<dimensions>::MatrixType rawProjectionMatrix;
AspectRatioPolicy _aspectRatioPolicy; AspectRatioPolicy _aspectRatioPolicy;
#endif #endif
private: private:
typename Object<dimensions>::MatrixType _projectionMatrix; typename AbstractObject<dimensions>::MatrixType _projectionMatrix;
typename Object<dimensions>::MatrixType _cameraMatrix; typename AbstractObject<dimensions>::MatrixType _cameraMatrix;
Math::Vector2<GLsizei> _viewport; Math::Vector2<GLsizei> _viewport;
}; };
template<size_t dimensions> inline AbstractCamera<dimensions>::~AbstractCamera() {}
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* These templates are instantiated in source file */ /* These templates are instantiated in source file */
extern template class SCENEGRAPH_EXPORT Camera<2>; extern template class SCENEGRAPH_EXPORT AbstractCamera<2>;
extern template class SCENEGRAPH_EXPORT Camera<3>; extern template class SCENEGRAPH_EXPORT AbstractCamera<3>;
namespace Implementation { namespace Implementation {
template<> class Camera<2> { template<> class Camera<2> {
@ -180,7 +184,7 @@ namespace Implementation {
#endif #endif
/** @brief %Camera for two-dimensional scenes */ /** @brief %Camera for two-dimensional scenes */
class SCENEGRAPH_EXPORT Camera2D: public Camera<2> { class SCENEGRAPH_EXPORT Camera2D: public AbstractCamera<2> {
public: public:
/** /**
* @brief Constructor * @brief Constructor
@ -189,7 +193,7 @@ class SCENEGRAPH_EXPORT Camera2D: public Camera<2> {
* Sets orthographic projection to the default OpenGL cube (range @f$ [-1; 1] @f$ in all directions). * Sets orthographic projection to the default OpenGL cube (range @f$ [-1; 1] @f$ in all directions).
* @see setOrthographic() * @see setOrthographic()
*/ */
inline Camera2D(Object2D* parent = nullptr): Camera(parent) {} inline Camera2D(Object2D* parent = nullptr): AbstractCamera(parent) {}
/** /**
* @brief Set projection * @brief Set projection
@ -203,7 +207,7 @@ class SCENEGRAPH_EXPORT Camera2D: public Camera<2> {
}; };
/** @brief %Camera for three-dimensional scenes */ /** @brief %Camera for three-dimensional scenes */
class SCENEGRAPH_EXPORT Camera3D: public Camera<3> { class SCENEGRAPH_EXPORT Camera3D: public AbstractCamera<3> {
public: public:
/** /**
* @brief Constructor * @brief Constructor
@ -212,7 +216,7 @@ class SCENEGRAPH_EXPORT Camera3D: public Camera<3> {
* Sets orthographic projection to the default OpenGL cube (range @f$ [-1; 1] @f$ in all directions). * Sets orthographic projection to the default OpenGL cube (range @f$ [-1; 1] @f$ in all directions).
* @see setOrthographic(), setPerspective() * @see setOrthographic(), setPerspective()
*/ */
inline Camera3D(Object3D* parent = nullptr): Camera(parent), _near(0.0f), _far(0.0f) {} inline Camera3D(Object3D* parent = nullptr): AbstractCamera(parent), _near(0.0f), _far(0.0f) {}
/** /**
* @brief Set orthographic projection * @brief Set orthographic projection

2
src/SceneGraph/Light.cpp

@ -18,7 +18,7 @@
namespace Magnum { namespace SceneGraph { namespace Magnum { namespace SceneGraph {
void Light::clean(const Matrix4& absoluteTransformation) { void Light::clean(const Matrix4& absoluteTransformation) {
Object::clean(absoluteTransformation); Object3D::clean(absoluteTransformation);
_position = absoluteTransformation[3]; _position = absoluteTransformation[3];
} }

16
src/SceneGraph/Object.cpp

@ -25,7 +25,7 @@ using namespace Magnum::Math;
namespace Magnum { namespace SceneGraph { namespace Magnum { namespace SceneGraph {
template<size_t dimensions> typename Object<dimensions>::ObjectType* Object<dimensions>::setParent(ObjectType* parent) { template<size_t dimensions> typename AbstractObject<dimensions>::ObjectType* AbstractObject<dimensions>::setParent(ObjectType* parent) {
/* Skip if nothing to do or this is scene */ /* Skip if nothing to do or this is scene */
if(this->parent() == parent || isScene()) return static_cast<ObjectType*>(this); if(this->parent() == parent || isScene()) return static_cast<ObjectType*>(this);
@ -49,7 +49,7 @@ template<size_t dimensions> typename Object<dimensions>::ObjectType* Object<dime
return static_cast<ObjectType*>(this); return static_cast<ObjectType*>(this);
} }
template<size_t dimensions> typename Object<dimensions>::MatrixType Object<dimensions>::absoluteTransformation(CameraType* camera) { template<size_t dimensions> typename AbstractObject<dimensions>::MatrixType AbstractObject<dimensions>::absoluteTransformation(CameraType* camera) {
/* Shortcut for absolute transformation of camera relative to itself */ /* Shortcut for absolute transformation of camera relative to itself */
if(camera == this) return MatrixType(); if(camera == this) return MatrixType();
@ -77,7 +77,7 @@ template<size_t dimensions> typename Object<dimensions>::MatrixType Object<dimen
return t; return t;
} }
template<size_t dimensions> typename Object<dimensions>::SceneType* Object<dimensions>::scene() { template<size_t dimensions> typename AbstractObject<dimensions>::SceneType* AbstractObject<dimensions>::scene() {
/* Goes up the family tree until it finds object which is parent of itself /* Goes up the family tree until it finds object which is parent of itself
(that's the scene) */ (that's the scene) */
ObjectType* p = parent(); ObjectType* p = parent();
@ -89,7 +89,7 @@ template<size_t dimensions> typename Object<dimensions>::SceneType* Object<dimen
return nullptr; return nullptr;
} }
template<size_t dimensions> typename Object<dimensions>::ObjectType* Object<dimensions>::setTransformation(const MatrixType& transformation) { template<size_t dimensions> typename AbstractObject<dimensions>::ObjectType* AbstractObject<dimensions>::setTransformation(const MatrixType& transformation) {
/* Setting transformation is forbidden for the scene */ /* Setting transformation is forbidden for the scene */
/** @todo Assert for this? */ /** @todo Assert for this? */
if(isScene()) return static_cast<ObjectType*>(this); if(isScene()) return static_cast<ObjectType*>(this);
@ -99,7 +99,7 @@ template<size_t dimensions> typename Object<dimensions>::ObjectType* Object<dime
return static_cast<ObjectType*>(this); return static_cast<ObjectType*>(this);
} }
template<size_t dimensions> void Object<dimensions>::setDirty() { template<size_t dimensions> void AbstractObject<dimensions>::setDirty() {
/* The object (and all its children) are already dirty, nothing to do */ /* The object (and all its children) are already dirty, nothing to do */
if(dirty) return; if(dirty) return;
@ -110,7 +110,7 @@ template<size_t dimensions> void Object<dimensions>::setDirty() {
i->setDirty(); i->setDirty();
} }
template<size_t dimensions> void Object<dimensions>::setClean() { template<size_t dimensions> void AbstractObject<dimensions>::setClean() {
/* The object (and all its parents) are already clean, nothing to do */ /* The object (and all its parents) are already clean, nothing to do */
if(!dirty) return; if(!dirty) return;
@ -141,7 +141,7 @@ template<size_t dimensions> void Object<dimensions>::setClean() {
} }
/* Explicitly instantiate the templates */ /* Explicitly instantiate the templates */
template class Object<2>; template class AbstractObject<2>;
template class Object<3>; template class AbstractObject<3>;
}} }}

38
src/SceneGraph/Object.h

@ -16,7 +16,7 @@
*/ */
/** @file /** @file
* @brief Class Magnum::SceneGraph::Object, Magnum::SceneGraph::Object2D, Magnum::SceneGraph::Object3D * @brief Class Magnum::SceneGraph::AbstractObject, Magnum::SceneGraph::Object2D, Magnum::SceneGraph::Object3D
*/ */
#include <Containers/LinkedList.h> #include <Containers/LinkedList.h>
@ -76,12 +76,12 @@ namespace Implementation {
* @todo Transform transformation when changing parent, so the object stays in * @todo Transform transformation when changing parent, so the object stays in
* place. * place.
*/ */
template<size_t dimensions> class SCENEGRAPH_EXPORT Object: public Corrade::Containers::LinkedList<typename Implementation::ObjectDimensionTraits<dimensions>::ObjectType>, public Corrade::Containers::LinkedListItem<typename Implementation::ObjectDimensionTraits<dimensions>::ObjectType, typename Implementation::ObjectDimensionTraits<dimensions>::ObjectType> { template<size_t dimensions> class SCENEGRAPH_EXPORT AbstractObject: public Corrade::Containers::LinkedList<typename Implementation::ObjectDimensionTraits<dimensions>::ObjectType>, public Corrade::Containers::LinkedListItem<typename Implementation::ObjectDimensionTraits<dimensions>::ObjectType, typename Implementation::ObjectDimensionTraits<dimensions>::ObjectType> {
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Object(const Object<dimensions>& other) = delete; AbstractObject(const AbstractObject<dimensions>& other) = delete;
Object(Object<dimensions>&& other) = delete; AbstractObject(AbstractObject<dimensions>&& other) = delete;
Object<dimensions>& operator=(const Object<dimensions>& other) = delete; AbstractObject<dimensions>& operator=(const AbstractObject<dimensions>& other) = delete;
Object<dimensions>& operator=(Object<dimensions>&& other) = delete; AbstractObject<dimensions>& operator=(AbstractObject<dimensions>&& other) = delete;
#endif #endif
public: public:
@ -108,7 +108,7 @@ template<size_t dimensions> class SCENEGRAPH_EXPORT Object: public Corrade::Cont
* *
* Sets all transformations to their default values. * Sets all transformations to their default values.
*/ */
inline Object(ObjectType* parent = nullptr): dirty(true) { inline AbstractObject(ObjectType* parent = nullptr): dirty(true) {
setParent(parent); setParent(parent);
} }
@ -118,7 +118,7 @@ template<size_t dimensions> class SCENEGRAPH_EXPORT Object: public Corrade::Cont
* Removes itself from parent's children list and destroys all own * Removes itself from parent's children list and destroys all own
* children. * children.
*/ */
virtual inline ~Object() {} virtual ~AbstractObject() = 0;
/** @{ @name Scene hierarchy */ /** @{ @name Scene hierarchy */
@ -309,21 +309,23 @@ template<size_t dimensions> class SCENEGRAPH_EXPORT Object: public Corrade::Cont
bool dirty; bool dirty;
}; };
template<size_t dimensions> inline AbstractObject<dimensions>::~AbstractObject() {}
/* Implementations for inline functions with unused parameters */ /* Implementations for inline functions with unused parameters */
template<size_t dimensions> inline void Object<dimensions>::draw(const MatrixType&, CameraType*) {} template<size_t dimensions> inline void AbstractObject<dimensions>::draw(const MatrixType&, CameraType*) {}
template<size_t dimensions> inline void Object<dimensions>::clean(const MatrixType&) { dirty = false; } template<size_t dimensions> inline void AbstractObject<dimensions>::clean(const MatrixType&) { dirty = false; }
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* These templates are instantiated in source file */ /* These templates are instantiated in source file */
extern template class SCENEGRAPH_EXPORT Object<2>; extern template class SCENEGRAPH_EXPORT AbstractObject<2>;
extern template class SCENEGRAPH_EXPORT Object<3>; extern template class SCENEGRAPH_EXPORT AbstractObject<3>;
#endif #endif
/** @brief Two-dimensional object */ /** @brief Two-dimensional object */
class SCENEGRAPH_EXPORT Object2D: public Object<2> { class SCENEGRAPH_EXPORT Object2D: public AbstractObject<2> {
public: public:
/** @copydoc Object::Object */ /** @copydoc AbstractObject::AbstractObject() */
inline Object2D(Object2D* parent = nullptr): Object(parent) {} inline Object2D(Object2D* parent = nullptr): AbstractObject(parent) {}
/** /**
* @brief Translate object * @brief Translate object
@ -371,10 +373,10 @@ class SCENEGRAPH_EXPORT Object2D: public Object<2> {
}; };
/** @brief Three-dimensional object */ /** @brief Three-dimensional object */
class SCENEGRAPH_EXPORT Object3D: public Object<3> { class SCENEGRAPH_EXPORT Object3D: public AbstractObject<3> {
public: public:
/** @copydoc Object::Object */ /** @copydoc AbstractObject::AbstractObject() */
inline Object3D(Object3D* parent = nullptr): Object(parent) {} inline Object3D(Object3D* parent = nullptr): AbstractObject(parent) {}
/** /**
* @brief Translate object * @brief Translate object

18
src/SceneGraph/Scene.h

@ -24,23 +24,23 @@
namespace Magnum { namespace SceneGraph { namespace Magnum { namespace SceneGraph {
/** @brief %Scene */ /** @brief %Scene */
template<size_t dimensions> class SCENEGRAPH_EXPORT Scene: public Object<dimensions>::ObjectType { template<size_t dimensions> class SCENEGRAPH_EXPORT Scene: public AbstractObject<dimensions>::ObjectType {
public: public:
/** @copydoc Object::isScene() */ /** @copydoc AbstractObject::isScene() */
inline bool isScene() const { return true; } inline bool isScene() const { return true; }
/** @todo Some deleted functions belong only to Scene2D, some only to Scene3D - what to do? */ /** @todo Some deleted functions belong only to Scene2D, some only to Scene3D - what to do? */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
void setParent(typename Object<dimensions>::ObjectType* parent) = delete; void setParent(typename AbstractObject<dimensions>::ObjectType* parent) = delete;
void setTransformation(const typename Object<dimensions>::MatrixType& transformation) = delete; void setTransformation(const typename AbstractObject<dimensions>::MatrixType& transformation) = delete;
void multiplyTransformation(const typename Object<dimensions>::MatrixType& transformation, typename Object<dimensions>::Transformation type = Object<dimensions>::Transformation::Global) = delete; void multiplyTransformation(const typename AbstractObject<dimensions>::MatrixType& transformation, typename AbstractObject<dimensions>::Transformation type = AbstractObject<dimensions>::Transformation::Global) = delete;
void translate(const typename Object<dimensions>::VectorType& vec, typename Object<dimensions>::Transformation type = Object<dimensions>::Transformation::Global) = delete; void translate(const typename AbstractObject<dimensions>::VectorType& vec, typename AbstractObject<dimensions>::Transformation type = AbstractObject<dimensions>::Transformation::Global) = delete;
void scale(const typename Object<dimensions>::VectorType& vec, typename Object<dimensions>::Transformation type = Object<dimensions>::Transformation::Global) = delete; void scale(const typename AbstractObject<dimensions>::VectorType& vec, typename AbstractObject<dimensions>::Transformation type = AbstractObject<dimensions>::Transformation::Global) = delete;
void rotate(GLfloat angle, const typename Object<dimensions>::VectorType& vec, typename Object<dimensions>::Transformation type = Object<dimensions>::Transformation::Global) = delete; void rotate(GLfloat angle, const typename AbstractObject<dimensions>::VectorType& vec, typename AbstractObject<dimensions>::Transformation type = AbstractObject<dimensions>::Transformation::Global) = delete;
#endif #endif
private: private:
inline void draw(const typename Object<dimensions>::MatrixType&, typename Object<dimensions>::CameraType*) {} inline void draw(const typename AbstractObject<dimensions>::MatrixType&, typename AbstractObject<dimensions>::CameraType*) {}
}; };
/** @brief Two-dimensional scene */ /** @brief Two-dimensional scene */

Loading…
Cancel
Save