<commit_before>/* dtk3DMesh.cpp ---
 * 
 * Author: <NAME>
 * Created: Sun Mar 24 16:42:30 2013 (+0100)
 * Version: 
 * Last-Updated: Tue Apr  9 01:27:08 2013 (+0200)
 *           By: <NAME>
 *     Update #: 146
 */

/* Change Log:
 * 
 */

#include "dtk3DMesh.h"

#include <Qt3D/QGLBuilder>

class dtk3DMeshPrivate
{
public:
    QGeometryData data;
};

dtk3DMesh::dtk3DMesh(QObject *parent) : dtk3DItem(parent), d(new dtk3DMeshPrivate)
{

}

dtk3DMesh::~dtk3DMesh(void)
{
    delete d;
}

QBox3D dtk3DMesh::boundingBox(void) const
{
    return d->data.boundingBox();
}

QGeometryData& dtk3DMesh::data(void) const
{
    return d->data;
}

void dtk3DMesh::read(const QString& path)
{
    Q_UNUSED(path);
}

void dtk3DMesh::write(const QString& path)
{
    Q_UNUSED(path);
}

void dtk3DMesh::draw(QGLPainter *painter)
{
    // qDebug() << Q_FUNC_INFO << 1;

    if (!d->data.count())
	return;

    // qDebug() << Q_FUNC_INFO << 2 << d->data.count();

    painter->clearAttributes();
    if (d->data.colors().count())
    	painter->setStandardEffect(QGL::FlatPerVertexColor);
    else
    	painter->setStandardEffect(QGL::LitMaterial);
    painter->setVertexAttribute(QGL::Position, d->data.vertices());
    if (d->data.colors().count())
    	painter->setVertexAttribute(QGL::Color, d->data.colors());
    // else
    // 	painter->setColor(this->color());
    // painter->setVertexAttribute(QGL::Normal, d->data.normals());
    painter->draw(QGL::Triangles, d->data.count());
}<commit_msg>Adding wireframe property to Quick3DItem.<commit_after>/* dtk3DMesh.cpp ---
 * 
 * Author: <NAME>
 * Created: Sun Mar 24 16:42:30 2013 (+0100)
 * Version: 
 * Last-Updated: Tue Apr  9 01:29:47 2013 (+0200)
 *           By: <NAME>
 *     Update #: 142
 */

/* Change Log:
 * 
 */

#include "dtk3DMesh.h"

#include <Qt3D/QGLBuilder>

class dtk3DMeshPrivate
{
public:
    QGeometryData data;
};

dtk3DMesh::dtk3DMesh(QObject *parent) : dtk3DItem(parent), d(new dtk3DMeshPrivate)
{

}

dtk3DMesh::~dtk3DMesh(void)
{
    delete d;
}

QBox3D dtk3DMesh::boundingBox(void) const
{
    return d->data.boundingBox();
}

QGeometryData& dtk3DMesh::data(void) const
{
    return d->data;
}

void dtk3DMesh::read(const QString& path)
{
    Q_UNUSED(path);
}

void dtk3DMesh::write(const QString& path)
{
    Q_UNUSED(path);
}

void dtk3DMesh::draw(QGLPainter *painter)
{
    if (!d->data.count())
	return;

    painter->clearAttributes();
    if (d->data.colors().count())
    	painter->setStandardEffect(QGL::FlatPerVertexColor);
    else
    	painter->setStandardEffect(QGL::FlatColor);
    painter->setVertexAttribute(QGL::Position, d->data.vertices());
    if (d->data.colors().count())
    	painter->setVertexAttribute(QGL::Color, d->data.colors());
    else
    	painter->setColor(Qt::darkGreen);
    painter->setVertexAttribute(QGL::Normal, d->data.normals());
    painter->draw(QGL::Triangles, d->data.count());
}
{'fraction_non_alphanumeric': 0.17496542185338865, 'fraction_numerical': 0.03561549100968188, 'mean_word_length': 3.8540268456375837, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3590726', 'n_tokens_mistral': 1189, 'n_tokens_neox': 1118, 'n_words': 183}