Loading...
Searching...
No Matches
IrrlichtDevice.h
Go to the documentation of this file.
// Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __I_IRRLICHT_DEVICE_H_INCLUDED__
#define __I_IRRLICHT_DEVICE_H_INCLUDED__
#include "IReferenceCounted.h"
#include "dimension2d.h"
#include "IVideoDriver.h"
#include "EDriverTypes.h"
#include "EDeviceTypes.h"
#include "IEventReceiver.h"
#include "ICursorControl.h"
#include "IVideoModeList.h"
#include "ITimer.h"
#include "IOSOperator.h"
namespace irr
{
class ILogger;
class IEventReceiver;
class IRandomizer;
namespace io {
class IFileSystem;
} // end namespace io
namespace gui {
class IGUIEnvironment;
} // end namespace gui
namespace scene {
class ISceneManager;
} // end namespace scene
class IrrlichtDevice : public virtual IReferenceCounted
{
public:
virtual bool run() = 0;
virtual void yield() = 0;
virtual void sleep(u32 timeMs, bool pauseTimer=false) = 0;
virtual video::IVideoDriver* getVideoDriver() = 0;
virtual io::IFileSystem* getFileSystem() = 0;
virtual gui::IGUIEnvironment* getGUIEnvironment() = 0;
virtual scene::ISceneManager* getSceneManager() = 0;
virtual gui::ICursorControl* getCursorControl() = 0;
virtual ILogger* getLogger() = 0;
virtual video::IVideoModeList* getVideoModeList() = 0;
virtual IOSOperator* getOSOperator() = 0;
virtual ITimer* getTimer() = 0;
virtual IRandomizer* getRandomizer() const =0;
virtual void setRandomizer(IRandomizer* r) =0;
virtual IRandomizer* createDefaultRandomizer() const =0;
virtual void setWindowCaption(const wchar_t* text) = 0;
virtual bool isWindowActive() const = 0;
virtual bool isWindowFocused() const = 0;
virtual bool isWindowMinimized() const = 0;
virtual bool isFullscreen() const = 0;
virtual video::ECOLOR_FORMAT getColorFormat() const = 0;
virtual void closeDevice() = 0;
virtual const c8* getVersion() const = 0;
virtual void setEventReceiver(IEventReceiver* receiver) = 0;
virtual IEventReceiver* getEventReceiver() = 0;
virtual bool postEventFromUser(const SEvent& event) = 0;
virtual void setInputReceivingSceneManager(scene::ISceneManager* sceneManager) = 0;
virtual void setResizable(bool resize=false) = 0;
virtual void minimizeWindow() =0;
virtual void maximizeWindow() =0;
virtual void restoreWindow() =0;
virtual bool activateJoysticks(core::array<SJoystickInfo>& joystickInfo) =0;
virtual bool setGammaRamp(f32 red, f32 green, f32 blue,
f32 relativebrightness, f32 relativecontrast) =0;
virtual bool getGammaRamp(f32 &red, f32 &green, f32 &blue,
f32 &brightness, f32 &contrast) =0;
virtual void clearSystemMessages() = 0;
virtual E_DEVICE_TYPE getType() const = 0;
static bool isDriverSupported(video::E_DRIVER_TYPE driver)
{
switch (driver)
{
case video::EDT_NULL:
return true;
case video::EDT_SOFTWARE:
#ifdef _IRR_COMPILE_WITH_SOFTWARE_
return true;
#else
return false;
#endif
case video::EDT_BURNINGSVIDEO:
#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_
return true;
#else
return false;
#endif
case video::EDT_DIRECT3D8:
#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_
return true;
#else
return false;
#endif
case video::EDT_DIRECT3D9:
#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_
return true;
#else
return false;
#endif
case video::EDT_OPENGL:
#ifdef _IRR_COMPILE_WITH_OPENGL_
return true;
#else
return false;
#endif
default:
return false;
}
}
};
} // end namespace irr
#endif
EDeviceTypes.h
EDriverTypes.h
ICursorControl.h
IEventReceiver.h
IOSOperator.h
IReferenceCounted.h
ITimer.h
IVideoDriver.h
IVideoModeList.h
irr::IEventReceiver
Interface of an object which can receive events.
Definition IEventReceiver.h:434
irr::ILogger
Interface for logging messages, warnings and errors.
Definition ILogger.h:39
irr::IOSOperator
The Operating system operator provides operation system specific methods and informations.
Definition IOSOperator.h:16
irr::IRandomizer
Interface for generating random numbers.
Definition IRandomizer.h:15
irr::IReferenceCounted::IReferenceCounted
IReferenceCounted()
Constructor.
Definition IReferenceCounted.h:46
irr::ITimer
Interface for getting and manipulating the virtual time.
Definition ITimer.h:15
irr::IrrlichtDevice
The Irrlicht device. You can create it with createDevice() or createDeviceEx().
Definition IrrlichtDevice.h:44
irr::IrrlichtDevice::run
virtual bool run()=0
Runs the device.
irr::IrrlichtDevice::closeDevice
virtual void closeDevice()=0
Notifies the device that it should close itself.
irr::IrrlichtDevice::getEventReceiver
virtual IEventReceiver * getEventReceiver()=0
Provides access to the current event receiver.
irr::IrrlichtDevice::setInputReceivingSceneManager
virtual void setInputReceivingSceneManager(scene::ISceneManager *sceneManager)=0
Sets the input receiving scene manager.
irr::IrrlichtDevice::minimizeWindow
virtual void minimizeWindow()=0
Minimizes the window if possible.
irr::IrrlichtDevice::maximizeWindow
virtual void maximizeWindow()=0
Maximizes the window if possible.
irr::IrrlichtDevice::getType
virtual E_DEVICE_TYPE getType() const =0
Get the type of the device.
irr::IrrlichtDevice::getLogger
virtual ILogger * getLogger()=0
Provides access to the message logger.
irr::IrrlichtDevice::getGammaRamp
virtual bool getGammaRamp(f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast)=0
Get the current Gamma Value for the Display.
irr::IrrlichtDevice::getRandomizer
virtual IRandomizer * getRandomizer() const =0
Provides access to the engine's currently set randomizer.
irr::IrrlichtDevice::setWindowCaption
virtual void setWindowCaption(const wchar_t *text)=0
Sets the caption of the window.
irr::IrrlichtDevice::getCursorControl
virtual gui::ICursorControl * getCursorControl()=0
Provides access to the cursor control.
irr::IrrlichtDevice::isFullscreen
virtual bool isFullscreen() const =0
Checks if the Irrlicht window is running in fullscreen mode.
irr::IrrlichtDevice::setResizable
virtual void setResizable(bool resize=false)=0
Sets if the window should be resizable in windowed mode.
irr::IrrlichtDevice::restoreWindow
virtual void restoreWindow()=0
Restore the window to normal size if possible.
irr::IrrlichtDevice::isDriverSupported
static bool isDriverSupported(video::E_DRIVER_TYPE driver)
Check if a driver type is supported by the engine.
Definition IrrlichtDevice.h:277
irr::IrrlichtDevice::isWindowMinimized
virtual bool isWindowMinimized() const =0
Checks if the Irrlicht window is minimized.
irr::IrrlichtDevice::yield
virtual void yield()=0
Cause the device to temporarily pause execution and let other processes run.
irr::IrrlichtDevice::getSceneManager
virtual scene::ISceneManager * getSceneManager()=0
Provides access to the scene manager.
irr::IrrlichtDevice::sleep
virtual void sleep(u32 timeMs, bool pauseTimer=false)=0
Pause execution and let other processes to run for a specified amount of time.
irr::IrrlichtDevice::getTimer
virtual ITimer * getTimer()=0
Provides access to the engine's timer.
irr::IrrlichtDevice::isWindowFocused
virtual bool isWindowFocused() const =0
Checks if the Irrlicht window has the input focus.
irr::IrrlichtDevice::getColorFormat
virtual video::ECOLOR_FORMAT getColorFormat() const =0
Get the current color format of the window.
irr::IrrlichtDevice::clearSystemMessages
virtual void clearSystemMessages()=0
Remove messages pending in the system message loop.
irr::IrrlichtDevice::setGammaRamp
virtual bool setGammaRamp(f32 red, f32 green, f32 blue, f32 relativebrightness, f32 relativecontrast)=0
Set the current Gamma Value for the Display.
irr::IrrlichtDevice::getOSOperator
virtual IOSOperator * getOSOperator()=0
Provides access to the operation system operator object.
irr::IrrlichtDevice::createDefaultRandomizer
virtual IRandomizer * createDefaultRandomizer() const =0
Creates a new default randomizer.
irr::IrrlichtDevice::getVideoModeList
virtual video::IVideoModeList * getVideoModeList()=0
Gets a list with all video modes available.
irr::IrrlichtDevice::isWindowActive
virtual bool isWindowActive() const =0
Returns if the window is active.
irr::IrrlichtDevice::setEventReceiver
virtual void setEventReceiver(IEventReceiver *receiver)=0
Sets a new user event receiver which will receive events from the engine.
irr::IrrlichtDevice::postEventFromUser
virtual bool postEventFromUser(const SEvent &event)=0
Sends a user created event to the engine.
irr::IrrlichtDevice::getVideoDriver
virtual video::IVideoDriver * getVideoDriver()=0
Provides access to the video driver for drawing 3d and 2d geometry.
irr::IrrlichtDevice::getGUIEnvironment
virtual gui::IGUIEnvironment * getGUIEnvironment()=0
Provides access to the 2d user interface environment.
irr::IrrlichtDevice::getFileSystem
virtual io::IFileSystem * getFileSystem()=0
Provides access to the virtual file system.
irr::IrrlichtDevice::activateJoysticks
virtual bool activateJoysticks(core::array< SJoystickInfo > &joystickInfo)=0
Activate any joysticks, and generate events for them.
irr::IrrlichtDevice::getVersion
virtual const c8 * getVersion() const =0
Get the version of the engine.
irr::IrrlichtDevice::setRandomizer
virtual void setRandomizer(IRandomizer *r)=0
Sets a new randomizer.
irr::core::array
Self reallocating template array (like stl vector) with additional features.
Definition irrArray.h:23
irr::gui::ICursorControl
Interface to manipulate the mouse cursor.
Definition ICursorControl.h:98
irr::gui::IGUIEnvironment
GUI Environment. Used as factory and manager of all other GUI elements.
Definition IGUIEnvironment.h:71
irr::io::IFileSystem
The FileSystem manages files and archives and provides access to them.
Definition IFileSystem.h:33
irr::scene::ISceneManager
The Scene Manager manages scene nodes, mesh recources, cameras and all the other stuff.
Definition ISceneManager.h:151
irr::video::IVideoDriver
Interface to driver which is able to perform 2d and 3d graphics functions.
Definition IVideoDriver.h:257
irr::video::IVideoModeList
A list of all available video modes.
Definition IVideoModeList.h:24
dimension2d.h
irr::gui
The gui namespace contains useful classes for easy creation of a graphical user interface.
Definition EGUIAlignment.h:11
irr::io
This namespace provides interfaces for input/output: Reading and writing files, accessing zip archive...
Definition EAttributes.h:11
irr::scene
All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees a...
Definition CDynamicMeshBuffer.h:16
irr::video::ECOLOR_FORMAT
ECOLOR_FORMAT
An enum for the color format of textures used by the Irrlicht Engine.
Definition SColor.h:18
irr::video::E_DRIVER_TYPE
E_DRIVER_TYPE
An enum for all types of drivers the Irrlicht Engine supports.
Definition EDriverTypes.h:15
irr::video::EDT_SOFTWARE
@ EDT_SOFTWARE
The Irrlicht Engine Software renderer.
Definition EDriverTypes.h:26
irr::video::EDT_OPENGL
@ EDT_OPENGL
OpenGL device, available on most platforms.
Definition EDriverTypes.h:53
irr::video::EDT_DIRECT3D9
@ EDT_DIRECT3D9
Direct3D 9 device, only available on Win32 platforms.
Definition EDriverTypes.h:48
irr::video::EDT_DIRECT3D8
@ EDT_DIRECT3D8
Direct3D8 device, only available on Win32 platforms.
Definition EDriverTypes.h:43
irr::video::EDT_NULL
@ EDT_NULL
Null driver, useful for applications to run the engine without visualisation.
Definition EDriverTypes.h:19
irr::video::EDT_BURNINGSVIDEO
@ EDT_BURNINGSVIDEO
The Burning's Software Renderer, an alternative software renderer.
Definition EDriverTypes.h:38
irr
Everything in the Irrlicht Engine can be found in this namespace.
Definition aabbox3d.h:13
irr::f32
float f32
32 bit floating point variable.
Definition irrTypes.h:104
irr::u32
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.h:58
irr::c8
char c8
8 bit character variable.
Definition irrTypes.h:31
irr::E_DEVICE_TYPE
E_DEVICE_TYPE
An enum for the different device types supported by the Irrlicht Engine.
Definition EDeviceTypes.h:13
irr::SEvent
SEvents hold information about an event. See irr::IEventReceiver for details on event handling.
Definition IEventReceiver.h:263
- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0