git-svn-id: svn://db.shs.com.ru/libs@421 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2018-09-07 08:37:44 +00:00
parent 38bb2244d5
commit b6bad7a921
12 changed files with 174 additions and 41 deletions

View File

@@ -40,7 +40,7 @@ public:
enum RenderMode {View = 0, Point = GL_POINT, Line = GL_LINE, Fill = GL_FILL};
GLObjectBase();
virtual ~GLObjectBase() {;}
virtual ~GLObjectBase();
virtual GLObjectBase * clone(bool withChildren = true);
@@ -66,7 +66,7 @@ public:
bool hasChildren() const {return children_.size() != 0;}
void setView(QGLView * v);
void addChild(GLObjectBase * o) {if (o == this) return; if (o->parent_ != 0) o->parent_->children_.removeAll(o); children_ << o; o->parent_ = this; o->buildTransform(); if (view_ != 0) view_->collectLights();}
void addChild(GLObjectBase * o);
void removeChild(GLObjectBase * o) {if (o == this) return; children_.removeAll(o); o->parent_ = 0; o->buildTransform(); if (view_ != 0) view_->collectLights();}
void removeChild(int index) {children_[index]->parent_ = 0; children_[index]->buildTransform(); children_.removeAt(index); if (view_ != 0) view_->collectLights();}
void clearChildren(bool deleteAll = false);
@@ -177,6 +177,11 @@ public:
void calculateBoundingBox();
void setProperty(const QString & pn, const QVariant & v);
QVariant property(const QString & pn, bool * exists = 0) const;
bool hasProperty(const QString & pn) const;
void removeProperty(const QString & pn);
QVector3D pos_h;
QVector<Vector3d> points, puvws;
QVector<Vector3i> faces, uvws, norms;
@@ -214,6 +219,7 @@ protected:
GLObjectBase * parent_;
QGLViewBase * view_;
GLVBO vbo;
QVariantMap meta;
};