include/raytracermodule.h
author Radek Brich <radek.brich@devl.cz>
Mon, 19 May 2008 22:59:04 +0200
branchpyrit
changeset 98 64638385798a
parent 97 2a853d284a6a
permissions -rw-r--r--
add sections about demos to README update doxygen comments
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
98
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 97
diff changeset
     1
/**
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 97
diff changeset
     2
 * @file  raytracermodule.h
64638385798a add sections about demos to README
Radek Brich <radek.brich@devl.cz>
parents: 97
diff changeset
     3
 * @brief Ray tracer module for Python
96
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     4
 *
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     5
 * 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
     6
 *
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     7
 * Copyright 2006, 2007, 2008  Radek Brich
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     8
 *
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     9
 * 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
    10
 * 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
    11
 * 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
    12
 * 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
    13
 * 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
    14
 * 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
    15
 *
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    16
 * 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
    17
 * 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
    18
 *
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    19
 * 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
    20
 * 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
    21
 * 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
    22
 * 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
    23
 * 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
    24
 * 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
    25
 * THE SOFTWARE.
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
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    28
#ifndef RAYTRACERMODULE_H
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    29
#define RAYTRACERMODULE_H
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    30
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    31
#include <Python.h>
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    32
#include "raytracer.h"
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    33
#include "octree.h"
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    34
#include "kdtree.h"
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
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    37
#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
    38
{ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    39
	PyObject_HEAD_INIT(NULL) \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    40
	0,                          /* ob_size */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    41
	(name),                     /* tp_name */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    42
	(basicsize),                /* tp_basicsize*/ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    43
	0,                          /* tp_itemsize*/ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    44
	(dealloc),                  /* tp_dealloc*/ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    45
	0,                          /* tp_print*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    46
	0,                          /* tp_getattr*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    47
	0,                          /* tp_setattr*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    48
	0,                          /* tp_compare*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    49
	0,                          /* tp_repr*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    50
	0,                          /* tp_as_number*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    51
	0,                          /* tp_as_sequence*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    52
	0,                          /* tp_as_mapping*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    53
	0,                          /* tp_hash */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    54
	0,                          /* tp_call*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    55
	0,                          /* tp_str*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    56
	PyObject_GenericGetAttr,    /* tp_getattro*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    57
	0,                          /* tp_setattro*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    58
	0,                          /* tp_as_buffer*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    59
	(flags),                    /* tp_flags*/\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    60
	(doc),                      /* tp_doc */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    61
	0,                          /* tp_traverse */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    62
	0,                          /* tp_clear */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    63
	0,                          /* tp_richcompare */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    64
	0,                          /* tp_weaklistoffset */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    65
	0,                          /* tp_iter */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    66
	0,                          /* tp_iternext */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    67
	(methods),                  /* tp_methods */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    68
	(members),                  /* tp_members */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    69
	0,                          /* tp_getset */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    70
	(base),                     /* tp_base */\
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    71
	0,                          /* tp_dict */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    72
	0,                          /* tp_descr_get */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    73
	0,                          /* tp_descr_set */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    74
	0,                          /* tp_dictoffset */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    75
	(init),                     /* tp_init */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    76
	0,                          /* tp_alloc */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    77
	0,                          /* tp_new */ \
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    78
	0,                          /* tp_free */ \
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
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    81
/** Light object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    82
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    83
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    84
	Light *light;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    85
} LightObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    86
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    87
/** Camera object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    88
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    89
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    90
	Camera *camera;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    91
} CameraObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    92
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    93
/** Pixmap object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    94
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    95
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    96
	const Pixmap *pixmap;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    97
} PixmapObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    98
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    99
/** abstract TextureMap object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   100
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   101
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   102
	TextureMap *texturemap;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   103
} TextureMapObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   104
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   105
/** PlanarMap object - inherits TextureMap */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   106
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   107
	TextureMapObject texturemap;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   108
} PlanarMapObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   109
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   110
/** CubicMap object - inherits TextureMap */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   111
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   112
	TextureMapObject texturemap;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   113
} CubicMapObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   114
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   115
/** CylinderMap object - inherits TextureMap */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   116
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   117
	TextureMapObject texturemap;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   118
} CylinderMapObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   119
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   120
/** SphereMap object - inherits TextureMap */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   121
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   122
	TextureMapObject texturemap;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   123
} SphereMapObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   124
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   125
/** abstract ColourMap object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   126
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   127
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   128
	ColourMap *colourmap;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   129
} ColourMapObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   130
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   131
/** LinearColourMap object - inherits ColourMap */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   132
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   133
	ColourMapObject colourmap;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   134
} LinearColourMapObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   135
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   136
/** BoundColourMap object - inherits ColourMap */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   137
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   138
	ColourMapObject colourmap;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   139
	Float *bounds;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   140
	Colour *colours;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   141
} BoundColourMapObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   142
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   143
/** abstract Texture object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   144
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   145
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   146
	Texture *texture;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   147
} TextureObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   148
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   149
/** ImageTexture object - inherits Texture */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   150
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   151
	TextureObject texture;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   152
} ImageTextureObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   153
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   154
/** CheckersTexture object - inherits Texture */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   155
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   156
	TextureObject texture;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   157
} CheckersTextureObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   158
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   159
/** CloudTexture object - inherits Texture */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   160
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   161
	TextureObject texture;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   162
} CloudTextureObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   163
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   164
/** Material object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   165
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   166
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   167
	Material *material;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   168
} MaterialObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   169
97
2a853d284a6a added bench.py demo which prints tree build and render times
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   170
/** Vertex object */
96
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   171
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   172
	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
   173
	Vertex *vertex;
2a853d284a6a added bench.py demo which prints tree build and render times
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   174
} VertexObject;
2a853d284a6a added bench.py demo which prints tree build and render times
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   175
2a853d284a6a added bench.py demo which prints tree build and render times
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   176
/** 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
   177
typedef struct {
2a853d284a6a added bench.py demo which prints tree build and render times
Radek Brich <radek.brich@devl.cz>
parents: 96
diff changeset
   178
	VertexObject vertex;
96
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   179
} NormalVertexObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   180
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   181
/** abstract Shape object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   182
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   183
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   184
	Shape *shape;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   185
} ShapeObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   186
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   187
/** Triangle object - inherits Shape */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   188
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   189
	ShapeObject shape;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   190
} TriangleObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   191
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   192
/** Sphere object - inherits Shape */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   193
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   194
	ShapeObject shape;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   195
} SphereObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   196
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   197
/** Box object - inherits Shape */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   198
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   199
	ShapeObject shape;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   200
} BoxObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   201
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   202
/** abstract Sampler object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   203
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   204
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   205
	Sampler *sampler;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   206
} SamplerObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   207
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   208
/** DefaultSampler object - inherits Sampler */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   209
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   210
	SamplerObject sampler;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   211
} DefaultSamplerObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   212
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   213
/** Container object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   214
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   215
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   216
	Container *container;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   217
} ContainerObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   218
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   219
/** Octree object - inherits Container */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   220
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   221
	ContainerObject container;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   222
} OctreeObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   223
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   224
/** KdTree object - inherits Container */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   225
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   226
	ContainerObject container;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   227
} KdTreeObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   228
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   229
/** main Raytracer object */
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   230
typedef struct {
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   231
	PyObject_HEAD
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   232
	Raytracer *raytracer;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   233
	vector<PyObject*> *children;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   234
} RaytracerObject;
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   235
9eb71e76c7fd added Python binding for material.h classes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
   236
#endif