<commit_before>#ifndef DRAWERINTERFACE_H
#define DRAWERINTERFACE_H

#include <memory>
#include <QColor>
#include <GL/gl.h>
#include <QVector3D>
#include "ilwiscoreui_global.h"
#include <math.h>
#include "kernel.h"
#include "geos/geom/Coordinate.h"
#include "coordinate.h"
#include "location.h"
#include "ilwisdata.h"
#include "representation.h"
#include "identityinterface.h"
#include "iooptions.h"

class QOpenGLContext;

namespace Ilwis {

class IOOptions;

namespace Geodrawer{

struct ILWISCOREUISHARED_EXPORT VertexIndex {
    VertexIndex(quint32 start=0, quint32 count=0, quint32 oglType=GL_LINE_STRIP, Raw vid=iUNDEF) :
        _start(start),
        _count(count),
        _oglType(oglType),
        _objectid(vid){}

    quint32 _start;
    quint32 _count;
    quint32 _oglType;
    Raw _objectid = iUNDEF;
};

struct FeatureDrawing{
        FeatureDrawing(IlwisTypes ilwtype=itUNKNOWN) : _geomtype(ilwtype) {}
        IlwisTypes _geomtype;
        QVector3D _center;
        std::vector<VertexIndex> _indices;
        VertexIndex operator[](quint32 index) const{
            if ( index < _indices.size())
                return _indices[index];
            return VertexIndex();
        }
        VertexIndex& operator[](quint32 index) {
            if ( index < _indices.size())
                return _indices[index];
            throw ErrorObject(TR("Requested illegal vertex index fro drawing feature"));
        }

};

struct ILWISCOREUISHARED_EXPORT VertexColor {
    VertexColor(float r=0, float g=0, float b = 0, float a = 1.0) : _c1(r), _c2(g), _c3(b), _c4(a){}
    VertexColor(const QColor& clr) : _c1(clr.redF()), _c2(clr.greenF()), _c3(clr.blueF()), _c4(clr.alphaF()) {}
    float _c1=0, _c2=0, _c3=0, _c4=1.0;
};

class RootDrawer;
class DrawerInterface;<commit_msg>variant of vertexcolor with integer colors; for textures<commit_after>#ifndef DRAWERINTERFACE_H
#define DRAWERINTERFACE_H

#include <memory>
#include <QColor>
#include <GL/gl.h>
#include <QVector3D>
#include "ilwiscoreui_global.h"
#include <math.h>
#include "kernel.h"
#include "geos/geom/Coordinate.h"
#include "coordinate.h"
#include "location.h"
#include "ilwisdata.h"
#include "representation.h"
#include "identityinterface.h"
#include "iooptions.h"

class QOpenGLContext;

namespace Ilwis {

class IOOptions;

namespace Geodrawer{

struct ILWISCOREUISHARED_EXPORT VertexIndex {
    VertexIndex(quint32 start=0, quint32 count=0, quint32 oglType=GL_LINE_STRIP, Raw vid=iUNDEF) :
        _start(start),
        _count(count),
        _oglType(oglType),
        _objectid(vid){}

    quint32 _start;
    quint32 _count;
    quint32 _oglType;
    Raw _objectid = iUNDEF;
};

struct FeatureDrawing{
        FeatureDrawing(IlwisTypes ilwtype=itUNKNOWN) : _geomtype(ilwtype) {}
        IlwisTypes _geomtype;
        QVector3D _center;
        std::vector<VertexIndex> _indices;
        VertexIndex operator[](quint32 index) const{
            if ( index < _indices.size())
                return _indices[index];
            return VertexIndex();
        }
        VertexIndex& operator[](quint32 index) {
            if ( index < _indices.size())
                return _indices[index];
            throw ErrorObject(TR("Requested illegal vertex index fro drawing feature"));
        }

};

struct ILWISCOREUISHARED_EXPORT VertexColor {
    VertexColor(float r=0, float g=0, float b = 0, float a = 1.0) : _c1(r), _c2(g), _c3(b), _c4(a){}
    VertexColor(const QColor& clr) : _c1(clr.redF()), _c2(clr.greenF()), _c3(clr.blueF()), _c4(clr.alphaF()) {}
    float _c1=0, _c2=0, _c3=0, _c4=1.0;
};

struct ILWISCOREUISHARED_EXPORT VertexColorI {
    VertexColorI(byte r=0, byte g=0, byte b = 0, byte a = 1.0) : _c1(r), _c2(g), _c3(b), _c4(a){}
    VertexColorI(const QColor& clr) : _c1(clr.red()), _c2(clr.green()), _c3(clr.blue()), _c4(clr.alpha()) {}
    byte _c1=0, _c2=0, _c3=0, _c4=1.0;
};

class RootDrawer;
class DrawerInterface;
{'fraction_non_alphanumeric': 0.13016845329249618, 'fraction_numerical': 0.027054619703930576, 'mean_word_length': 3.572928821470245, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 15, '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': '3382968', 'n_tokens_mistral': 1514, 'n_tokens_neox': 1456, 'n_words': 305}