Browse Source

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

vectorfields
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; }
/** @brief Set parent object */
virtual void setParent(Object* parent);
void setParent(Object* parent);
/**
* @brief Transformation matrix

17
src/Scene.h

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

Loading…
Cancel
Save