include/raytracermodule.h
author Radek Brich <radek.brich@devl.cz>
Thu, 15 May 2008 19:15:57 +0200
branchpyrit
changeset 97 2a853d284a6a
parent 96 9eb71e76c7fd
child 98 64638385798a
permissions -rw-r--r--
added bench.py demo which prints tree build and render times added Vertex to python binding, NormalVertex is now its subclass
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
96
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     1
/*
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     2
 * raytracermodule.h: raytracer module for Python
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     3
 *
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     4
 * This file is part of Pyrit Ray Tracer.
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     5
 *
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     6
 * Copyright 2006, 2007, 2008  Radek Brich
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     7
 *
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     8
 * Permission is hereby granted, free of charge, to any person obtaining a copy
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     9
 * of this software and associated documentation files (the "Software"), to deal
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    10
 * in the Software without restriction, including without limitation the rights
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    11
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    12
 * copies of the Software, and to permit persons to whom the Software is
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    13
 * furnished to do so, subject to the following conditions:
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    14
 *
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    15
 * The above copyright notice and this permission notice shall be included in
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    16
 * all copies or substantial portions of the Software.
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    17
 *
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    18
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    19
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    20
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    21
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    22
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    23
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    24
 * THE SOFTWARE.
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    25
 */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    26
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    27
#ifndef RAYTRACERMODULE_H
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    28
#define RAYTRACERMODULE_H
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    29
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    30
#include <Python.h>
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    31
#include "raytracer.h"
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    32
#include "octree.h"
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    33
#include "kdtree.h"
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    34
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    35
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    36
#define TYPE_OBJECT(name, basicsize, dealloc, flags, doc, methods, members, base, init) \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    37
{ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    38
	PyObject_HEAD_INIT(NULL) \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    39
	0,                          /* ob_size */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    40
	(name),                     /* tp_name */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    41
	(basicsize),                /* tp_basicsize*/ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    42
	0,                          /* tp_itemsize*/ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    43
	(dealloc),                  /* tp_dealloc*/ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    44
	0,                          /* tp_print*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    45
	0,                          /* tp_getattr*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    46
	0,                          /* tp_setattr*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    47
	0,                          /* tp_compare*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    48
	0,                          /* tp_repr*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    49
	0,                          /* tp_as_number*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    50
	0,                          /* tp_as_sequence*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    51
	0,                          /* tp_as_mapping*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    52
	0,                          /* tp_hash */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    53
	0,                          /* tp_call*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    54
	0,                          /* tp_str*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    55
	PyObject_GenericGetAttr,    /* tp_getattro*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    56
	0,                          /* tp_setattro*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    57
	0,                          /* tp_as_buffer*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    58
	(flags),                    /* tp_flags*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    59
	(doc),                      /* tp_doc */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    60
	0,                          /* tp_traverse */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    61
	0,                          /* tp_clear */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    62
	0,                          /* tp_richcompare */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    63
	0,                          /* tp_weaklistoffset */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    64
	0,                          /* tp_iter */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    65
	0,                          /* tp_iternext */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    66
	(methods),                  /* tp_methods */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    67
	(members),                  /* tp_members */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    68
	0,                          /* tp_getset */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    69
	(base),                     /* tp_base */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    70
	0,                          /* tp_dict */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    71
	0,                          /* tp_descr_get */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    72
	0,                          /* tp_descr_set */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    73
	0,                          /* tp_dictoffset */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    74
	(init),                     /* tp_init */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    75
	0,                          /* tp_alloc */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    76
	0,                          /* tp_new */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    77
	0,                          /* tp_free */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    78
}
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    79
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    80
/** Light object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    81
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    82
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    83
	Light *light;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    84
} LightObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    85
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    86
/** Camera object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    87
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    88
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    89
	Camera *camera;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    90
} CameraObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    91
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    92
/** Pixmap object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    93
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    94
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    95
	const Pixmap *pixmap;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    96
} PixmapObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    97
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    98
/** abstract TextureMap object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    99
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   100
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   101
	TextureMap *texturemap;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   102
} TextureMapObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   103
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   104
/** PlanarMap object - inherits TextureMap */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   105
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   106
	TextureMapObject texturemap;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   107
} PlanarMapObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   108
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   109
/** CubicMap object - inherits TextureMap */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   110
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   111
	TextureMapObject texturemap;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   112
} CubicMapObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   113
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   114
/** CylinderMap object - inherits TextureMap */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   115
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   116
	TextureMapObject texturemap;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   117
} CylinderMapObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   118
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   119
/** SphereMap object - inherits TextureMap */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   120
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   121
	TextureMapObject texturemap;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   122
} SphereMapObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   123
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   124
/** abstract ColourMap object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   125
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   126
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   127
	ColourMap *colourmap;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   128
} ColourMapObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   129
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   130
/** LinearColourMap object - inherits ColourMap */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   131
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   132
	ColourMapObject colourmap;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   133
} LinearColourMapObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   134
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   135
/** BoundColourMap object - inherits ColourMap */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   136
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   137
	ColourMapObject colourmap;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   138
	Float *bounds;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   139
	Colour *colours;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   140
} BoundColourMapObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   141
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   142
/** abstract Texture object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   143
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   144
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   145
	Texture *texture;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   146
} TextureObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   147
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   148
/** ImageTexture object - inherits Texture */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   149
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   150
	TextureObject texture;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   151
} ImageTextureObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   152
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   153
/** CheckersTexture object - inherits Texture */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   154
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   155
	TextureObject texture;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   156
} CheckersTextureObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   157
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   158
/** CloudTexture object - inherits Texture */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   159
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   160
	TextureObject texture;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   161
} CloudTextureObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   162
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   163
/** Material object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   164
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   165
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   166
	Material *material;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   167
} MaterialObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   168
97
2a853d284a6a added bench.py demo which prints tree build and render times
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   169
/** Vertex object */
96
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   170
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   171
	PyObject_HEAD
97
2a853d284a6a added bench.py demo which prints tree build and render times
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   172
	Vertex *vertex;
2a853d284a6a added bench.py demo which prints tree build and render times
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   173
} VertexObject;
2a853d284a6a added bench.py demo which prints tree build and render times
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   174
2a853d284a6a added bench.py demo which prints tree build and render times
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   175
/** NormalVertex object - inherits Vertex*/
2a853d284a6a added bench.py demo which prints tree build and render times
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   176
typedef struct {
2a853d284a6a added bench.py demo which prints tree build and render times
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   177
	VertexObject vertex;
96
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   178
} NormalVertexObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   179
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   180
/** abstract Shape object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   181
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   182
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   183
	Shape *shape;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   184
} ShapeObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   185
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   186
/** Triangle object - inherits Shape */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   187
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   188
	ShapeObject shape;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   189
} TriangleObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   190
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   191
/** Sphere object - inherits Shape */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   192
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   193
	ShapeObject shape;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   194
} SphereObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   195
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   196
/** Box object - inherits Shape */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   197
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   198
	ShapeObject shape;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   199
} BoxObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   200
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   201
/** abstract Sampler object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   202
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   203
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   204
	Sampler *sampler;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   205
} SamplerObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   206
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   207
/** DefaultSampler object - inherits Sampler */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   208
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   209
	SamplerObject sampler;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   210
} DefaultSamplerObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   211
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   212
/** Container object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   213
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   214
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   215
	Container *container;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   216
} ContainerObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   217
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   218
/** Octree object - inherits Container */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   219
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   220
	ContainerObject container;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   221
} OctreeObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   222
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   223
/** KdTree object - inherits Container */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   224
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   225
	ContainerObject container;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   226
} KdTreeObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   227
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   228
/** main Raytracer object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   229
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   230
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   231
	Raytracer *raytracer;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   232
	vector<PyObject*> *children;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   233
} RaytracerObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   234
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   235
#endif