~ubuntu-branches/ubuntu/utopic/slic3r/utopic

« back to all changes in this revision

Viewing changes to xs/src/myinit.h

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2014-06-17 01:27:26 UTC
  • Revision ID: package-import@ubuntu.com-20140617012726-2wrs4zdo251nr4vg
Tags: upstream-1.1.4+dfsg
ImportĀ upstreamĀ versionĀ 1.1.4+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _myinit_h_
 
2
#define _myinit_h_
 
3
 
 
4
// this needs to be included early for MSVC (listing it in Build.PL is not enough)
 
5
#undef read
 
6
#undef seekdir
 
7
#include <ostream>
 
8
#include <iostream>
 
9
#include <sstream>
 
10
 
 
11
#ifdef SLIC3RXS
 
12
extern "C" {
 
13
#include "EXTERN.h"
 
14
#include "perl.h"
 
15
#include "XSUB.h"
 
16
#include "ppport.h"
 
17
#undef do_open
 
18
#undef do_close
 
19
}
 
20
#include "perlglue.hpp"
 
21
#endif
 
22
 
 
23
#define EPSILON 1e-4
 
24
#define SCALING_FACTOR 0.000001
 
25
#define PI 3.141592653589793238
 
26
#define scale_(val) (val / SCALING_FACTOR)
 
27
#define unscale(val) (val * SCALING_FACTOR)
 
28
#define SCALED_EPSILON scale_(EPSILON)
 
29
typedef long coord_t;
 
30
typedef double coordf_t;
 
31
 
 
32
namespace Slic3r {}
 
33
using namespace Slic3r;
 
34
 
 
35
/* Implementation of CONFESS("foo"): */
 
36
#define CONFESS(...) confess_at(__FILE__, __LINE__, __func__, __VA_ARGS__)
 
37
void confess_at(const char *file, int line, const char *func, const char *pat, ...);
 
38
/* End implementation of CONFESS("foo"): */
 
39
 
 
40
#endif