Browse Source

C++11 way of disabling access to irrelevant functions in Scene.

pull/279/head
Vladimír Vondruš 15 years ago
parent
commit
777f8e3ba2
  1. 2
      src/Object.h
  2. 17
      src/Scene.h

2
src/Object.h

@ -70,7 +70,7 @@ class Object {
inline const std::set<Object*>& children() const { return _children; } inline const std::set<Object*>& children() const { return _children; }
/** @brief Set parent object */ /** @brief Set parent object */
virtual void setParent(Object* parent); void setParent(Object* parent);
/** /**
* @brief Transformation matrix * @brief Transformation matrix

17
src/Scene.h

@ -26,13 +26,16 @@ namespace Magnum {
/** @brief %Scene */ /** @brief %Scene */
class Scene: public Object { class Scene: public Object {
private: private:
virtual void setParent(Object* parent) {} void setParent(Object* parent) = delete;
Object::setTransformation; void setTransformation(const Matrix4& transformation) = delete;
Object::multiplyTransformation; void multiplyTransformation(const Matrix4& transformation, bool global = true) = delete;
Object::setTransformationFrom; void setTransformationFrom(Object* another) = delete;
Object::translate; void translate(Vector3 vec, bool global = true) = delete;
Object::scale; void translate(GLfloat x, GLfloat y, GLfloat z, bool global = true) = delete;
Object::rotate; void scale(Vector3 vec, bool global = true) = delete;
void scale(GLfloat x, GLfloat y, GLfloat z, bool global = true) = delete;
void rotate(GLfloat angle, Vector3 vec, bool global = true) = delete;
void rotate(GLfloat angle, GLfloat x, GLfloat y, GLfloat z, bool global = true) = delete;
public: public:
/** @brief Features */ /** @brief Features */

Loading…
Cancel
Save