<commit_before>#include "../back.h"
#include "../basics.h"

#define WIDTH 640
#define HEIGHT 480
static unsigned char pixels[WIDTH * HEIGHT * 3] = {0}; 

void back_start(void)
{
}

void back_stop(void)
{
}

unsigned char* back_pixels(void)
{
  debug("pixels\n");
  return pixels;
}

unsigned back_width(void)
{
  return WIDTH;
}

unsigned back_height(void)
{
  return HEIGHT;
}

void back_mouse_down(double x, double y)
{
  debug("mouse_down(%f, %f)\n", x, y);
}

void back_mouse_up(double x, double y)
{
  debug("mouse_up(%f, %f)\n", x, y);
}

void back_key_down(char k)
{
  debug("key_down(%c)\n", k);
}

void back_key_up(void)
{
  debug("key_up\n");
}<commit_msg>first test of mesh viewing<commit_after>#include "../back.h"
#include "../view_mesh.h"
#include "../mesh_bbox.h"

#define WIDTH 640
#define HEIGHT 480
static view* global_view;
static mesh* global_mesh;

static void render(void)
{
  view_mesh_wireframe(global_view, global_mesh);
}

void back_start(void)
{
  bbox b = {{0,0,0},{1,1,1}};
  ment bv[MAX_BBOX_VERTS];
  ment be[MAX_BBOX_SIMPLICES];
  global_view = view_new(WIDTH, HEIGHT);
  global_mesh = mesh_new();
  mesh_gen_bbox(global_mesh, b, DIM3, bv, be);
  view_focus(global_view, mesh_bbox(global_mesh));
  render();
}

void back_stop(void)
{
  mesh_free(global_mesh);
  view_free(global_view);
}

unsigned char* back_pixels(void)
{
  return (unsigned char*)(view_image(global_view)->p[0]);
}

unsigned back_width(void)
{
  return WIDTH;
}

unsigned back_height(void)
{
  return HEIGHT;
}

void back_mouse_down(double x, double y)
{
  (void)x;
  (void)y;
}

void back_mouse_up(double x, double y)
{
  (void)x;
  (void)y;
}

void back_key_down(char k)
{
  (void)k;
}

void back_key_up(void)
{
}
{'fraction_non_alphanumeric': 0.1590909090909091, 'fraction_numerical': 0.01282051282051282, 'mean_word_length': 4.860068259385666, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '7163617', 'n_tokens_mistral': 741, 'n_tokens_neox': 720, 'n_words': 148}