~baltix/+junk/irrlicht-test

« back to all changes in this revision

Viewing changes to include/irrlicht.h

  • Committer: Mantas Kriaučiūnas
  • Date: 2011-07-18 13:06:25 UTC
  • Revision ID: mantas@akl.lt-20110718130625-c5pvifp61e7kj1ol
Included whole irrlicht SVN libraries to work around launchpad recipe issue with quilt, see https://answers.launchpad.net/launchpad/+question/165193

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* irrlicht.h -- interface of the 'Irrlicht Engine'
 
2
 
 
3
  Copyright (C) 2002-2011 Nikolaus Gebhardt
 
4
 
 
5
  This software is provided 'as-is', without any express or implied
 
6
  warranty.  In no event will the authors be held liable for any damages
 
7
  arising from the use of this software.
 
8
 
 
9
  Permission is granted to anyone to use this software for any purpose,
 
10
  including commercial applications, and to alter it and redistribute it
 
11
  freely, subject to the following restrictions:
 
12
 
 
13
  1. The origin of this software must not be misrepresented; you must not
 
14
     claim that you wrote the original software. If you use this software
 
15
     in a product, an acknowledgment in the product documentation would be
 
16
     appreciated but is not required.
 
17
  2. Altered source versions must be plainly marked as such, and must not be
 
18
     misrepresented as being the original software.
 
19
  3. This notice may not be removed or altered from any source distribution.
 
20
 
 
21
  Please note that the Irrlicht Engine is based in part on the work of the
 
22
  Independent JPEG Group, the zlib and the libPng. This means that if you use
 
23
  the Irrlicht Engine in your product, you must acknowledge somewhere in your
 
24
  documentation that you've used the IJG code. It would also be nice to mention
 
25
  that you use the Irrlicht Engine, the zlib and libPng. See the README files
 
26
  in the jpeglib, the zlib and libPng for further informations.
 
27
*/
 
28
 
 
29
#ifndef __IRRLICHT_H_INCLUDED__
 
30
#define __IRRLICHT_H_INCLUDED__
 
31
 
 
32
#include "IrrCompileConfig.h"
 
33
#include "aabbox3d.h"
 
34
#include "CDynamicMeshBuffer.h"
 
35
#include "CIndexBuffer.h"
 
36
#include "CMeshBuffer.h"
 
37
#include "coreutil.h"
 
38
#include "CVertexBuffer.h"
 
39
#include "dimension2d.h"
 
40
#include "ECullingTypes.h"
 
41
#include "EDebugSceneTypes.h"
 
42
#include "EDriverFeatures.h"
 
43
#include "EDriverTypes.h"
 
44
#include "EGUIAlignment.h"
 
45
#include "EGUIElementTypes.h"
 
46
#include "EHardwareBufferFlags.h"
 
47
#include "EMaterialFlags.h"
 
48
#include "EMaterialTypes.h"
 
49
#include "EMeshWriterEnums.h"
 
50
#include "EMessageBoxFlags.h"
 
51
#include "ESceneNodeAnimatorTypes.h"
 
52
#include "ESceneNodeTypes.h"
 
53
#include "ETerrainElements.h"
 
54
#include "fast_atof.h"
 
55
#include "heapsort.h"
 
56
#include "IAnimatedMesh.h"
 
57
#include "IAnimatedMeshMD2.h"
 
58
#include "IAnimatedMeshMD3.h"
 
59
#include "IAnimatedMeshSceneNode.h"
 
60
#include "IAttributeExchangingObject.h"
 
61
#include "IAttributes.h"
 
62
#include "IBillboardSceneNode.h"
 
63
#include "IBillboardTextSceneNode.h"
 
64
#include "IBoneSceneNode.h"
 
65
#include "ICameraSceneNode.h"
 
66
#include "ICursorControl.h"
 
67
#include "IDummyTransformationSceneNode.h"
 
68
#include "IDynamicMeshBuffer.h"
 
69
#include "IEventReceiver.h"
 
70
#include "IFileList.h"
 
71
#include "IFileSystem.h"
 
72
#include "IGeometryCreator.h"
 
73
#include "IGPUProgrammingServices.h"
 
74
#include "IGUIButton.h"
 
75
#include "IGUICheckBox.h"
 
76
#include "IGUIColorSelectDialog.h"
 
77
#include "IGUIComboBox.h"
 
78
#include "IGUIContextMenu.h"
 
79
#include "IGUIEditBox.h"
 
80
#include "IGUIElement.h"
 
81
#include "IGUIElementFactory.h"
 
82
#include "IGUIEnvironment.h"
 
83
#include "IGUIFileOpenDialog.h"
 
84
#include "IGUIFont.h"
 
85
#include "IGUIFontBitmap.h"
 
86
#include "IGUIImage.h"
 
87
#include "IGUIInOutFader.h"
 
88
#include "IGUIListBox.h"
 
89
#include "IGUIMeshViewer.h"
 
90
#include "IGUIScrollBar.h"
 
91
#include "IGUISkin.h"
 
92
#include "IGUISpinBox.h"
 
93
#include "IGUISpriteBank.h"
 
94
#include "IGUIStaticText.h"
 
95
#include "IGUITabControl.h"
 
96
#include "IGUITable.h"
 
97
#include "IGUIToolbar.h"
 
98
#include "IGUIWindow.h"
 
99
#include "IGUITreeView.h"
 
100
#include "IImage.h"
 
101
#include "IImageLoader.h"
 
102
#include "IImageWriter.h"
 
103
#include "IIndexBuffer.h"
 
104
#include "ILightSceneNode.h"
 
105
#include "ILogger.h"
 
106
#include "IMaterialRenderer.h"
 
107
#include "IMaterialRendererServices.h"
 
108
#include "IMesh.h"
 
109
#include "IMeshBuffer.h"
 
110
#include "IMeshCache.h"
 
111
#include "IMeshLoader.h"
 
112
#include "IMeshManipulator.h"
 
113
#include "IMeshSceneNode.h"
 
114
#include "IMeshWriter.h"
 
115
#include "IColladaMeshWriter.h"
 
116
#include "IMetaTriangleSelector.h"
 
117
#include "IOSOperator.h"
 
118
#include "IParticleSystemSceneNode.h" // also includes all emitters and attractors
 
119
#include "IQ3LevelMesh.h"
 
120
#include "IQ3Shader.h"
 
121
#include "IReadFile.h"
 
122
#include "IReferenceCounted.h"
 
123
#include "irrArray.h"
 
124
#include "IrrlichtDevice.h"
 
125
#include "irrList.h"
 
126
#include "irrMap.h"
 
127
#include "irrMath.h"
 
128
#include "irrString.h"
 
129
#include "irrTypes.h"
 
130
#include "path.h"
 
131
#include "irrXML.h"
 
132
#include "ISceneCollisionManager.h"
 
133
#include "ISceneLoader.h"
 
134
#include "ISceneManager.h"
 
135
#include "ISceneNode.h"
 
136
#include "ISceneNodeAnimator.h"
 
137
#include "ISceneNodeAnimatorCameraFPS.h"
 
138
#include "ISceneNodeAnimatorCameraMaya.h"
 
139
#include "ISceneNodeAnimatorCollisionResponse.h"
 
140
#include "ISceneNodeAnimatorFactory.h"
 
141
#include "ISceneNodeFactory.h"
 
142
#include "ISceneUserDataSerializer.h"
 
143
#include "IShaderConstantSetCallBack.h"
 
144
#include "IShadowVolumeSceneNode.h"
 
145
#include "ISkinnedMesh.h"
 
146
#include "ITerrainSceneNode.h"
 
147
#include "ITextSceneNode.h"
 
148
#include "ITexture.h"
 
149
#include "ITimer.h"
 
150
#include "ITriangleSelector.h"
 
151
#include "IVertexBuffer.h"
 
152
#include "IVideoDriver.h"
 
153
#include "IVideoModeList.h"
 
154
#include "IVolumeLightSceneNode.h"
 
155
#include "IWriteFile.h"
 
156
#include "IXMLReader.h"
 
157
#include "IXMLWriter.h"
 
158
#include "ILightManager.h"
 
159
#include "Keycodes.h"
 
160
#include "line2d.h"
 
161
#include "line3d.h"
 
162
#include "matrix4.h"
 
163
#include "plane3d.h"
 
164
#include "position2d.h"
 
165
#include "quaternion.h"
 
166
#include "rect.h"
 
167
#include "S3DVertex.h"
 
168
#include "SAnimatedMesh.h"
 
169
#include "SceneParameters.h"
 
170
#include "SColor.h"
 
171
#include "SExposedVideoData.h"
 
172
#include "SIrrCreationParameters.h"
 
173
#include "SKeyMap.h"
 
174
#include "SLight.h"
 
175
#include "SMaterial.h"
 
176
#include "SMesh.h"
 
177
#include "SMeshBuffer.h"
 
178
#include "SMeshBufferLightMap.h"
 
179
#include "SMeshBufferTangents.h"
 
180
#include "SParticle.h"
 
181
#include "SSharedMeshBuffer.h"
 
182
#include "SSkinMeshBuffer.h"
 
183
#include "SVertexIndex.h"
 
184
#include "SViewFrustum.h"
 
185
#include "triangle3d.h"
 
186
#include "vector2d.h"
 
187
#include "vector3d.h"
 
188
 
 
189
/*! \mainpage Irrlicht Engine 1.7 API documentation
 
190
 *
 
191
 * <div align="center"><img src="logobig.png" ></div>
 
192
 *
 
193
 * \section intro Introduction
 
194
 *
 
195
 * Welcome to the Irrlicht Engine API documentation.
 
196
 * Here you'll find any information you'll need to develop applications with
 
197
 * the Irrlicht Engine. If you are looking for a tutorial on how to start, you'll
 
198
 * find some on the homepage of the Irrlicht Engine at
 
199
 * <A HREF="http://irrlicht.sourceforge.net" >irrlicht.sourceforge.net</A>
 
200
 * or inside the SDK in the examples directory.
 
201
 *
 
202
 * The Irrlicht Engine is intended to be an easy-to-use 3d engine, so
 
203
 * this documentation is an important part of it. If you have any questions or
 
204
 * suggestions, just send a email to the author of the engine, Nikolaus Gebhardt
 
205
 * (niko (at) irrlicht3d.org).
 
206
 *
 
207
 *
 
208
 * \section links Links
 
209
 *
 
210
 * <A HREF="namespaces.html">Namespaces</A>: A very good place to start reading
 
211
 * the documentation.<BR>
 
212
 * <A HREF="annotated.html">Class list</A>: List of all classes with descriptions.<BR>
 
213
 * <A HREF="functions.html">Class members</A>: Good place to find forgotten features.<BR>
 
214
 *
 
215
 * \section irrexample Short example
 
216
 *
 
217
 * A simple application, starting up the engine, loading a Quake 2 animated
 
218
 * model file and the corresponding texture, animating and displaying it
 
219
 * in front of a blue background and placing a user controlable 3d camera
 
220
 * would look like the following code. I think this example shows the usage
 
221
 * of the engine quite well:
 
222
 *
 
223
 * \code
 
224
 * #include <irrlicht.h>
 
225
 * using namespace irr;
 
226
 *
 
227
 * int main()
 
228
 * {
 
229
 *      // start up the engine
 
230
 *      IrrlichtDevice *device = createDevice(video::EDT_DIRECT3D8,
 
231
 *              core::dimension2d<u32>(640,480));
 
232
 *
 
233
 *      video::IVideoDriver* driver = device->getVideoDriver();
 
234
 *      scene::ISceneManager* scenemgr = device->getSceneManager();
 
235
 *
 
236
 *      device->setWindowCaption(L"Hello World!");
 
237
 *
 
238
 *      // load and show quake2 .md2 model
 
239
 *      scene::ISceneNode* node = scenemgr->addAnimatedMeshSceneNode(
 
240
 *              scenemgr->getMesh("quake2model.md2"));
 
241
 *
 
242
 *      // if everything worked, add a texture and disable lighting
 
243
 *      if (node)
 
244
 *      {
 
245
 *              node->setMaterialTexture(0, driver->getTexture("texture.bmp"));
 
246
 *              node->setMaterialFlag(video::EMF_LIGHTING, false);
 
247
 *      }
 
248
 *
 
249
 *      // add a first person shooter style user controlled camera
 
250
 *      scenemgr->addCameraSceneNodeFPS();
 
251
 *
 
252
 *      // draw everything
 
253
 *      while(device->run() && driver)
 
254
 *      {
 
255
 *              driver->beginScene(true, true, video::SColor(255,0,0,255));
 
256
 *              scenemgr->drawAll();
 
257
 *              driver->endScene();
 
258
 *      }
 
259
 *
 
260
 *      // delete device
 
261
 *      device->drop();
 
262
 *      return 0;
 
263
 * }
 
264
 * \endcode
 
265
 *
 
266
 * Irrlicht can load a lot of file formats automaticly, see irr::scene::ISceneManager::getMesh()
 
267
 * for a detailed list. So if you would like to replace the simple blue screen background by
 
268
 * a cool Quake 3 Map, optimized by an octree, just insert this code
 
269
 * somewhere before the while loop:
 
270
 *
 
271
 * \code
 
272
 *      // add .pk3 archive to the file system
 
273
 *      device->getFileSystem()->addZipFileArchive("quake3map.pk3");
 
274
 *
 
275
 *      // load .bsp file and show it using an octree
 
276
 *      scenemgr->addOctreeSceneNode(
 
277
 *              scenemgr->getMesh("quake3map.bsp"));
 
278
 * \endcode
 
279
 *
 
280
 * As you can see, the engine uses namespaces. Everything in the engine is
 
281
 * placed into the namespace 'irr', but there are also 5 sub namespaces.
 
282
 * You can find a list of all namespaces with descriptions at the
 
283
 * <A HREF="namespaces.html"> namespaces page</A>.
 
284
 * This is also a good place to start reading the documentation. If you
 
285
 * don't want to write the namespace names all the time, just use all namespaces like
 
286
 * this:
 
287
 * \code
 
288
 * using namespace core;
 
289
 * using namespace scene;
 
290
 * using namespace video;
 
291
 * using namespace io;
 
292
 * using namespace gui;
 
293
 * \endcode
 
294
 *
 
295
 * There is a lot more the engine can do, but I hope this gave a short
 
296
 * overview over the basic features of the engine. For more examples, please take
 
297
 * a look into the examples directory of the SDK.
 
298
 */
 
299
 
 
300
#include "SIrrCreationParameters.h"
 
301
 
 
302
//! Everything in the Irrlicht Engine can be found in this namespace.
 
303
namespace irr
 
304
{
 
305
        //! Creates an Irrlicht device. The Irrlicht device is the root object for using the engine.
 
306
        /** If you need more parameters to be passed to the creation of the Irrlicht Engine device,
 
307
        use the createDeviceEx() function.
 
308
        \param deviceType: Type of the device. This can currently be video::EDT_NULL,
 
309
        video::EDT_SOFTWARE, video::EDT_BURNINGSVIDEO, video::EDT_DIRECT3D8, video::EDT_DIRECT3D9 and video::EDT_OPENGL.
 
310
        \param windowSize: Size of the window or the video mode in fullscreen mode.
 
311
        \param bits: Bits per pixel in fullscreen mode. Ignored if windowed mode.
 
312
        \param fullscreen: Should be set to true if the device should run in fullscreen. Otherwise
 
313
                the device runs in windowed mode.
 
314
        \param stencilbuffer: Specifies if the stencil buffer should be enabled. Set this to true,
 
315
        if you want the engine be able to draw stencil buffer shadows. Note that not all
 
316
        devices are able to use the stencil buffer. If they don't no shadows will be drawn.
 
317
        \param vsync: Specifies vertical syncronisation: If set to true, the driver will wait
 
318
        for the vertical retrace period, otherwise not.
 
319
        \param receiver: A user created event receiver.
 
320
        \return Returns pointer to the created IrrlichtDevice or null if the
 
321
        device could not be created.
 
322
        */
 
323
        extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDevice(
 
324
                video::E_DRIVER_TYPE deviceType = video::EDT_SOFTWARE,
 
325
                // parantheses are necessary for some compilers
 
326
                const core::dimension2d<u32>& windowSize = (core::dimension2d<u32>(640,480)),
 
327
                u32 bits = 16,
 
328
                bool fullscreen = false,
 
329
                bool stencilbuffer = false,
 
330
                bool vsync = false,
 
331
                IEventReceiver* receiver = 0);
 
332
 
 
333
        //! typedef for Function Pointer
 
334
        typedef IrrlichtDevice* (IRRCALLCONV *funcptr_createDevice )(
 
335
                        video::E_DRIVER_TYPE deviceType,
 
336
                        const core::dimension2d<u32>& windowSize,
 
337
                        u32 bits,
 
338
                        bool fullscreen,
 
339
                        bool stencilbuffer,
 
340
                        bool vsync,
 
341
                        IEventReceiver* receiver);
 
342
 
 
343
 
 
344
        //! Creates an Irrlicht device with the option to specify advanced parameters.
 
345
        /** Usually you should used createDevice() for creating an Irrlicht Engine device.
 
346
        Use this function only if you wish to specify advanced parameters like a window
 
347
        handle in which the device should be created.
 
348
        \param parameters: Structure containing advanced parameters for the creation of the device.
 
349
        See irr::SIrrlichtCreationParameters for details.
 
350
        \return Returns pointer to the created IrrlichtDevice or null if the
 
351
        device could not be created. */
 
352
        extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDeviceEx(
 
353
                const SIrrlichtCreationParameters& parameters);
 
354
 
 
355
        //! typedef for Function Pointer
 
356
        typedef IrrlichtDevice* (IRRCALLCONV *funcptr_createDeviceEx )( const SIrrlichtCreationParameters& parameters );
 
357
 
 
358
 
 
359
        // THE FOLLOWING IS AN EMPTY LIST OF ALL SUB NAMESPACES
 
360
        // EXISTING ONLY FOR THE DOCUMENTATION SOFTWARE DOXYGEN.
 
361
 
 
362
        //! Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.
 
363
        namespace core
 
364
        {
 
365
        }
 
366
 
 
367
        //! The gui namespace contains useful classes for easy creation of a graphical user interface.
 
368
        namespace gui
 
369
        {
 
370
        }
 
371
 
 
372
        //! This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...
 
373
        namespace io
 
374
        {
 
375
        }
 
376
 
 
377
        //! All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...
 
378
        namespace scene
 
379
        {
 
380
        }
 
381
 
 
382
        //! The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.
 
383
        namespace video
 
384
        {
 
385
        }
 
386
}
 
387
 
 
388
/*! \file irrlicht.h
 
389
        \brief Main header file of the irrlicht, the only file needed to include.
 
390
*/
 
391
 
 
392
#endif
 
393