git-svn-id: svn://db.shs.com.ru/libs@319 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -36,7 +36,7 @@ void GLVBO::init() {
|
||||
#if QT_VERSION >= 0x050600
|
||||
initializeOpenGLFunctions();
|
||||
#endif
|
||||
if (!isIinit()) {
|
||||
if (!isInit()) {
|
||||
//glGenVertexArrays(1, &va_);
|
||||
glGenBuffers(1, &buffer_);
|
||||
}
|
||||
@@ -289,8 +289,9 @@ bool GLVBO::loadFromFile(const QString & filename) {
|
||||
}
|
||||
|
||||
|
||||
Box3D GLVBO::boundingBox() const {
|
||||
Box3D GLVBO::boundingBox(const QMatrix4x4 & mat) const {
|
||||
if (vertices_.size() < 3) return Box3D();
|
||||
bool mi = mat.isIdentity();
|
||||
int vcnt = vertices_.size() / 3;
|
||||
//qDebug() << "calculateBinormals" << vcnt << tcnt << vertices_.size() << texcoords_.size() << "...";
|
||||
GLfloat mix, miy, miz, max, may, maz;
|
||||
@@ -309,9 +310,9 @@ Box3D GLVBO::boundingBox() const {
|
||||
if (miz > v.z) miz = v.z;
|
||||
if (maz < v.z) maz = v.z;
|
||||
}
|
||||
bound.x = (mix + max) / 2.;
|
||||
bound.y = (miy + may) / 2.;
|
||||
bound.z = (miz + maz) / 2.;
|
||||
bound.x = mix;
|
||||
bound.y = miy;
|
||||
bound.z = miz;
|
||||
bound.length = max - mix;
|
||||
bound.width = may - miy;
|
||||
bound.height = maz - miz;
|
||||
|
||||
Reference in New Issue
Block a user