--- a/src/raytracermodule.cc Fri Nov 30 00:44:51 2007 +0100
+++ b/src/raytracermodule.cc Mon Dec 03 01:49:23 2007 +0100
@@ -53,8 +53,8 @@
LightObject *v;
static char *kwdlist[] = {"position", "colour", NULL};
PyObject *TPos, *TCol = NULL;
- float px, py, pz;
- float cr = 1.0, cg = 1.0, cb = 1.0;
+ Float px, py, pz;
+ Float cr = 1.0, cg = 1.0, cb = 1.0;
if (!PyArg_ParseTupleAndKeywords(args, kwd, "O!|O!", kwdlist,
&PyTuple_Type, &TPos, &PyTuple_Type, &TCol))
@@ -133,7 +133,7 @@
MaterialObject *v;
static char *kwdlist[] = {"colour", NULL};
PyObject *TCol = NULL;
- float cr=1.0, cg=1.0, cb=1.0;
+ Float cr=1.0, cg=1.0, cb=1.0;
if (!PyArg_ParseTupleAndKeywords(args, kwd, "|O!", kwdlist,
&PyTuple_Type, &TCol))
@@ -198,7 +198,7 @@
MaterialObject *material;
static char *kwdlist[] = {"centre", "radius", "material", NULL};
PyObject *TCentre = NULL;
- float cx, cy, cz, radius;
+ Float cx, cy, cz, radius;
if (!PyArg_ParseTupleAndKeywords(args, kwd, "O!fO!", kwdlist,
&PyTuple_Type, &TCentre, &radius, &MaterialType, &material))
@@ -265,7 +265,7 @@
static char *kwdlist[] = {"L", "H", "material", NULL};
PyObject *TL = NULL;
PyObject *TH = NULL;
- float lx, ly, lz, hx, hy, hz;
+ Float lx, ly, lz, hx, hy, hz;
if (!PyArg_ParseTupleAndKeywords(args, kwd, "O!O!O!", kwdlist,
&PyTuple_Type, &TL, &PyTuple_Type, &TH, &MaterialType, &material))
@@ -334,7 +334,7 @@
MaterialObject *material;
static char *kwdlist[] = {"A", "B", "C", "material", NULL};
PyObject *A = NULL, *B = NULL, *C = NULL;
- float ax, ay, az, bx, by, bz, cx, cy, cz;
+ Float ax, ay, az, bx, by, bz, cx, cy, cz;
if (!PyArg_ParseTupleAndKeywords(args, kwd, "O!O!O!O!", kwdlist,
&PyTuple_Type, &A, &PyTuple_Type, &B, &PyTuple_Type, &C,
@@ -447,7 +447,7 @@
{
int w = 0, h = 0;
char *chardata;
- float *data;
+ Float *data;
PyObject *o;
if (!PyArg_ParseTuple(args, "(ii)", &w, &h))
@@ -455,7 +455,7 @@
printf("[pyrit] Raytracing...\n");
((RaytracerObject *)self)->raytracer->getTop()->optimize();
- data = (float *) malloc(w*h*3*sizeof(float));
+ data = (Float *) malloc(w*h*3*sizeof(Float));
((RaytracerObject *)self)->raytracer->render(w, h, data);
if (!data) {
Py_INCREF(Py_None);
@@ -465,7 +465,7 @@
// convert data to char
printf("[pyrit] Converting image data (float to char)...\n");
chardata = (char *) malloc(w*h*3);
- float *d = data;
+ Float *d = data;
for (char *c = chardata; c != chardata + w*h*3; c++, d++) {
if (*d > 1.0)
*c = 255;
@@ -511,7 +511,7 @@
static PyObject* Raytracer_ambientocclusion(PyObject* self, PyObject* args, PyObject *kwd)
{
int samples = 0;
- float distance = 0.0, angle = 0.0;
+ Float distance = 0.0, angle = 0.0;
static char *kwdlist[] = {"samples", "distance", "angle", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwd, "iff", kwdlist,